Re: ModemManager and Quectel RM520N-GL

2023-03-15 Thread Aleksander Morgado
On Fri, Mar 3, 2023 at 12:45 PM Patrick Kosiol  wrote:
>
> Hi,
>
> It appears my ModemManager cannot initialize the Quectel RM520N-GL modem with 
> the messages
>  [01775.270989] [modem0] couldn't start parent initialization: 
> Couldn't open ports during modem initialization: Couldn't get primary port
>  [01775.275716] [modem0] modem couldn't be initialized: Failed to 
> load current capabilities: Couldn't peek client for service ‘nas'
>
> Perhaps someone has an idea what the reason might be? That would help me very 
> much.
>

>From the debug log:

 [01775.005392] [/dev/cdc-wdm0] received generic response
(translated)...
<< QMUX:
<<   length  = 18
<<   flags   = 0x80
<<   service = "ctl"
<<   client  = 0
<< QMI:
<<   flags   = "response"
<<   transaction = 6
<<   tlv_length  = 7
<<   message = "Allocate CID" (0x0022)
<< TLV:
<<   type   = "Result" (0x02)
<<   length = 4
<<   value  = 01:00:05:00
<<   translated = FAILURE: ClientIdsExhausted

 [01775.006317] [modem0] couldn't allocate client for service
'nas': Couldn't create client for service 'nas': QMI protocol error
(5): 'ClientIdsExhausted'

Do you have any other process attempting to use QMI in the system?
E.g. are you running some qmicli commands or something at the same
time?

The error above shows how a NAS client allocation fails with
ClientIdsExhausted, which indicates that there are unreleased NAS
clients around. ModemManager takes care of allocating clients and
releasing them properly when they're no longer used.

If no other processes are running QMI operations, could it be that MM
is not being cleanly shutdown at some point and then restarted?

-- 
Aleksander


Re: ModemManager and Quectel RM520N-GL

2023-03-15 Thread Aleksander Morgado
On Wed, Mar 15, 2023 at 12:28 PM Peter Naulls  wrote:
>
> On 3/6/23 02:40, Patrick Kosiol wrote:
> > Hi Peter,
> >
> > Thanks for the info.
> >
> > Actually, the lsusb output was incomplete. It looks like the one attached 
> > so the
> > device is actually there. Yet, you are right, the /dev/ttyUSB device is not
> > present.
> >
> > I checked the state of the usb device and it appears to be loaded with the
> > qmi_wwan driver, which seems correct:
> >
> 80M
> >
> > Do you happen to have any other suggestion?
>
> I did, in the bit you didn't quote - this is why good quoting is always good
> practice:
>
>
> "I'm not seeing the USB serial devices for your modem, i.e, /dev/ttyUSBx.  It
> may be that you need a usb_modeswtich invocation.  ModemManager won't pick it 
> up
> until these exist."
>

There is no need for USB modeswitch in this case though, that's
totally unrelated.

The TTYs are exposed in the USB layout (interfaces 0-3), but they are
not bound to any kernel driver. Likely the option kernel driver in use
doesn't have them defined for this specific vid:pid.
The missing TTYs are not a real issue though, if the modem has a QMI
port, the QMI port should be responsive.

-- 
Aleksander


Re: ModemManager and Quectel RM520N-GL

2023-03-15 Thread Peter Naulls

On 3/6/23 02:40, Patrick Kosiol wrote:

Hi Peter,

Thanks for the info.

Actually, the lsusb output was incomplete. It looks like the one attached so the 
device is actually there. Yet, you are right, the /dev/ttyUSB device is not 
present.


I checked the state of the usb device and it appears to be loaded with the 
qmi_wwan driver, which seems correct:



80M


Do you happen to have any other suggestion?


I did, in the bit you didn't quote - this is why good quoting is always good
practice:


"I'm not seeing the USB serial devices for your modem, i.e, /dev/ttyUSBx.  It 
may be that you need a usb_modeswtich invocation.  ModemManager won't pick it up 
until these exist."






Re: ModemManager and Quectel RM520N-GL

2023-03-15 Thread Patrick Kosiol
Hi Peter,Thanks for the info.Actually, the lsusb output was incomplete. It looks like the one attached so the device is actually there. Yet, you are right, the /dev/ttyUSB device is not present. I checked the state of the usb device and it appears to be loaded with the qmi_wwan driver, which seems correct:# lsusb -t/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=dwc_otg/1p, 480M    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/5p, 480M        |__ Port 1: Dev 3, If 0, Class=Vendor Specific Class, Driver=smsc95xx, 480M        |__ Port 2: Dev 4, If 0, Class=Human Interface Device, Driver=usbhid, 12M        |__ Port 3: Dev 5, If 0, Class=Vendor Specific Class, Driver=rtl88XXau, 480M        |__ Port 4: Dev 6, If 0, Class=Mass Storage, Driver=usb-storage, 480M        |__ Port 5: Dev 7, If 0, Class=Vendor Specific Class, Driver=, 480M        |__ Port 5: Dev 7, If 1, Class=Vendor Specific Class, Driver=, 480M        |__ Port 5: Dev 7, If 2, Class=Vendor Specific Class, Driver=, 480M        |__ Port 5: Dev 7, If 3, Class=Vendor Specific Class, Driver=, 480M        |__ Port 5: Dev 7, If 4, Class=Vendor Specific Class, Driver=qmi_wwan, 480MDo you happen to have any other suggestion?With regards,Patrick KosiolBus 001 Device 007: ID 2c7c:0801 Quectel Wireless Solutions Co., Ltd. RM520N-GL
Bus 001 Device 006: ID 0781:5571 SanDisk Corp. Cruzer Fit
Bus 001 Device 005: ID 0846:9052 NetGear, Inc. A6100 AC600 DB Wireless Adapter 
[Realtek RTL8811AU]
Bus 001 Device 004: ID 04d8:0c02 Microchip Technology, Inc. AR1100 HID-MOUSE
Bus 001 Device 003: ID 0424:ec00 Microchip Technology, Inc. (formerly SMSC) 
SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Microchip Technology, Inc. (formerly SMSC) 
SMC9514 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


Re: ModemManager and Quectel RM520N-GL

2023-03-03 Thread Peter Naulls

On 3/2/23 14:21, Patrick Kosiol wrote:

Hi,

It appears my ModemManager cannot initialize the Quectel RM520N-GL modem with 
the messages
 [01775.270989] [modem0] couldn't start parent initialization: 
Couldn't open ports during modem initialization: Couldn't get primary port
 [01775.275716] [modem0] modem couldn't be initialized: Failed to load 
current capabilities: Couldn't peek client for service ‘nas'

Perhaps someone has an idea what the reason might be? That would help me very 
much.



I'm not seeing the USB serial devices for your modem, i.e, /dev/ttyUSBx.  It may 
be that you need a usb_modeswtich invocation.  ModemManager won't pick it up 
until these exist.