>>>>> I just realized you're working with a MBIM modem. So the "No AT
>>>>> port available to run command" may actually mean there is no AT
>>>>> port detected in the modem. Are you able to see a TTY listed in the
>>>>> "System/ports" entry when you do "mmcli -m 0"?
>>>
>>> No, I do not see TTY listed. Snippet of "mmcli -m 0" below -
>>>
>>>   Hardware |   manufacturer: 'Generic'
>>>            |              model: 'MBIM [1BC7:1204]'
>>>            |            revision: '17.01.571'
>>>            |       supported: 'gsm-umts, lte'
>>>            |             current: 'gsm-umts, lte'
>>>            | equipment id: '35323806113733'
>>>   -------------------------
>>>   System   |         device: 
>>> '/sys/devices/platform/soc/soc:internal-regs/d005e000.usb/usb1/1-1'
>>>            |              drivers: 'cdc_mbim'
>>>            |                plugin: 'Generic'
>>>            |   primary port: 'cdc-wdm0'
>>>            |                  ports: 'cdc-wdm0 (mbim), wwan0 (net)'
>>>
>>
>> So the modem doesn't expose any AT capable TTY in this mode? Is there
>> any /dev/ttyUSBX exposed that we may not be probing correctly?
>>
>>>
>>>>Also, we'd generally discourage enabling custom AT commands in most 
>>>>situations.  Instead, we'd like to learn more about your use-case and see 
>>>>if we can come up with a more >generic way to do >what you want to do.  It 
>>>>may well be the case that what you want to do has an analogue in the other 
>>>>protocols like MBIM and QMI, and thus we could expose >that functionality 
>>>>generically via D-Bus >rather than doing one-off things for specific modems.
>>>
>>> One of the custom (vendor) AT commands is to switch the firmware (i.e. 
>>> reboot using a different firmware) on the LTE modem based on the SIM card 
>>> information (operator type).  Another one (#USBCFG) is to change the USB 
>>> configuration mode (such as, enable MBIM) on the modem device.
>>>
>>
>>> Is there a configuration mode that has MBIM+AT? You may want to use
>>> that one instead of the one you currently have, which doesn't seem to
>>> expose any AT capable TTY.
>
>>1204 composition indeed has serial ports, but the PID is missing in option 
>>kernel driver.
>
> I tried this manually -  echo 1bc7 1204 > 
> /sys/bus/usb-serial/drivers/option1/new_id  -
> and this exposes the tty ports for AT.
>
> mmcli -m 0 (snippet)
>   -------------------------
>   System   |         device: 
> '/sys/devices/platform/soc/soc:internal-regs/d005e000.usb/usb1/1-1'
>            |                 drivers: 'option, cdc_mbim'
>            |                   plugin: 'Generic'
>            |      primary port: 'cdc-wdm0'
>            |                     ports: 'ttyUSB0 (qcdm), ttyUSB3 (at), 
> ttyUSB4 (at), wwan0 (net), cdc-wdm0 (mbim)'
>   -------------------------
>
> However, I have to restart ModemManager with --debug option to be able to 
> send AT commands via mmcli (mmcli -m 0 --command="AT").
> Is debug mode always required?
>

We currently enforce that, yes. The Command() API is only enabled in debug mode.

-- 
Aleksander
https://aleksander.es
_______________________________________________
ModemManager-devel mailing list
ModemManager-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel

Reply via email to