QMI interface unresponsive for first command

Hi,
While using EM7431 module, we encounter the QMI interface to be unresponsive in few conditions.

  1. After power cycling, leaving the module for ~20 second, the first QMI request to the module is giving timeout
    “error: couldn’t create client for the ‘nas’ service: CID allocation failed in the CTL client: Transaction timed out”.
    From second command inwards, it working properly
  2. After continuously using for 2 days, the internet is stopped, QMI and AT command interfaces are unresponsive. We had to manually reset the module to make it work.

For the first issue, i would like to know if the module is going to some sleep or power saving mode because of inactivity. For second, How to debug this issue.
I am using qmicli command for checking.
Firmware version of module : [/dev/cdc-wdm0] Software version: S.AT.2.5.1-00666-9655_GEN_PACK-1
Revision: ‘SWI9X50C_01.14.03.00 b06bd3 jenkins 2020/09/23 10:53:35’

are you using the MBPL USB driver?

Thanks for the quick reply. I am using generic driver of qmi_wwan from mainline kernel version 4.14. The driver in MBPL R20 and this looks same.
From the commands, where to specify the APN name. Does the module detects APN name automatically after calling the “AT!SCACT=1,1” command.

seems cannot use the default qmi_wwan, you need to use the driver of MBPL.

To enter APN, you can use AT+CGDCONT.

e.g.
AT+CGDCONT=1,“IP”,“APN”

Hi, Let me try this and comeback

Hi,
I tried the default driver. it’s also showing the same issue for the first command.
I would like to know why the first command to the device failed. Any methods to get the debug info from the module.

as said before, you should not use the default driver.

BTW, does it work if you enter “sudo qmicli --device=/dev/cdc-wdm0 --wds-noop --client-no-release-cid” first?

Hi,
I used the driver from MBPL SDK
Still, The first qmi command is giving timeout. This is if i wait for sometime after power cycling the module. If the qmi command was given immediately after the power cycling, there no issue.
That’s why i want to know whether the module is going to some power saving mode or something.

You can disable the usb selective suspend mode of your platform to verify

Hi,
I could only see below command to make the module in suspend/active mode
AT+CFUN=1 for active and AT+CFUN=0 for suspend.
i could see the SIM registration getting disabled with the AT+CFUN=1=0 command.
Still, the first QMI command is still failing.

BTW, does it work if you enter “sudo qmicli --device=/dev/cdc-wdm0 --wds-noop --client-no-release-cid” first?

No, having same result

If you keep typing AT command, the usb will be always turned on, you can check whether it is due to sleep mode

Thanks, Let me check this

Does anybody have answer to this issue? I’m seeing the save behavior with when using the qmicli for the first time with a EM7590 modem the first time after a reboot, but the subsequent commands are OK.

have you disabled selective suspend mode?
If you keep typing AT command, the usb will be always turned on, you can check whether it is due to sleep mode

How do I disable the selective suspend mode? I tried issuing an AT command followed immediately by the qmicli command, but still gets the timeout:

root@sar:~# echo -e ‘at+cfun?\r\n’ > /dev/ttyUSB2
root@sar:~# at+cfun?
+CFUN: 1

OK

root@sar:~# qmicli -p --device=/dev/cdc-wdm0 --dms-get-model
error: couldn’t create client for the ‘dms’ service: CID allocation failed in the CTL client: Transaction timed out

I tried selective suspend setting on other module SL808x.
see if this document can be reused:
How to test the sleep mode for SL808X under Linux.docx (13.2 KB)

The EM7590 doesn’t seem to have the same suspend setting, but thanks for the info anyways.

root@sar:/sys/bus/usb/devices/1-1# ls
1-1:1.0 authorized bDeviceProtocol bNumConfigurations busnum dev driver ltm_capable product rx_lanes tx_lanes
1-1:1.2 avoid_reset_quirk bDeviceSubClass bNumInterfaces configuration devnum ep_00 manufacturer quirks speed uevent
1-1:1.3 bConfigurationValue bMaxPacketSize0 bcdDevice consumers devpath idProduct maxchild removable subsystem urbnum
1-1:1.8 bDeviceClass bMaxPower bmAttributes descriptors devspec idVendor port remove suppliers version