How to use sierra linux QMI sdk function to select SIM card to use for EM7565

Hello,

How to use sierra linux QMI sdk function to select the SIM card to use for EM7565?

EM7565 supports dual SIM card. Currently, we are selecting the SIM card to use by AT!UIMS=0 or 1 AT command, and it works.

But we prefer to use Sierra Linux QMI SDK function to select the SIM card. Which function to use and how to use it?

There is one for question regarding EM7565:
at!usbcomp? shows 0000050D (diag,nmea,modem,rmnet0,rmnet1)
So it looks like it should have 2 network interfaces for this modem(5 usb interfaces in total). But we only see 1 network interface (4 usb interfaces).
We are using quite recent GobiNet driver version “2018-02-28/SWI_2.50”.
Should EM7565 with usbcomp=50D has 2 network interfaces? If so, why I can only see one?

If we got the second network interface shows up, how to use it? Can the second interface be used for the second SIM card? e.g. get two cell connection concurrently, one for each network interface that uses each SIM card.

Regards,
Shuo

Hi Shuo,

Make sure to use the latest posted EM7565 FW, we fixed a few issues in the new release.
The latest driver is N2.53

About dual SIM:
https://source.sierrawireless.com/resources/airprime/application_notes_and_code_samples/airprime---em74xx---dual-sim-feature---technical-note/

Did you change the USB composition?
Mine is set to one RMNET by default:

at!entercnd=“A710”
OK
at!usbcomp?
Config Index: 1
Config Type: 3 (Generic)
Interface bitmask: 0000010D (diag,nmea,modem,rmnet0)

OK

You can only use one active SIM at a time.

EM7565 supports multi PDN (mPDN) with QMAP mode.
You can enable multiple PDN sessions with one carrier.

To enable QMAP mode:
=== Netnum sets the number of sessions

at!entercnd=“A710”
OK
at!netnum=4
OK
At!reset

== compile the GobiNet driver with ipalias=0

I’m attaching a doc explaining how to bringup mPDN datasessions with the SDK in QMAP mode.

Thanks,
James
SDKlite_QMAP_MPDN_example.docx (17.7 KB)

Hi James,

Thanks for your reply. The firmware on my EM7565 is very old. 1.0.2 version. I am trying to upgrade to the latest 1.8.4 version.

I am using SLQS 4.0.16 version. And I am upgrade EM7565 firmware under Linux using “fwdldhostx86_64” binary tool under “SampleApps/Firmware_Download/bin”

I execute “./fwdldhostx86_64 -s /sbin/slqssdk -d 9x50 -p ./firmware -u 2-2 -m 0”

I placed firmware .cwe and .nvu file under ./firmware.

When I run fwdldhostx86_64 tool, it shows “Switching to firmware download mode … Done”, then “Downloading the firmware …”

However, the “Downloading the firmware” process takes forever!!! I has been running for 2 hours, and still not finished.

Why it take forever, is there any bug in firmware upgrade tool?
How can I upgrade EM7565 firmware under Linux?

Thanks,
Shuo

@sdong
You can try stopping the firmware download process and trying it again. If that fails too can you please post the outputs of ATI, AT!ENTERCND=“A710” and AT!FLOG?

ATI shows firmware version of 1.0.2.
AT!FLOG? shows:
00000,1980/01/06 00:00:00.000,C0060600,COMMENT=Log created,LOG_VERSION=1.0
00000,1980/01/06 00:00:00.000,C0060600,BOOTFATAL=boot_elf_loader.c,line=1444,DOWNLOADER=boot,VERSION=INTERNAL_?SWI9X50C_00.06.06.00???_?,TYPE=SPKG,STATUS=PASS
00001,1980/01/06 00:00:00.000,C0060600,NV_REBUILD=START,COMMENT=FW ver: SWI9X50C_00.06.06.00 4bceaf jenkins 2017/09/19 17:41:12,FILE=DEFAULTS
00001,1980/01/06 00:00:00.000,C0060600,NV_REBUILD=COMPLETE,COMMENT=defaulted 250, restored 0, skipped 0, failed 0,STATUS=PASS
00033,1980/01/06 00:00:00.000,C0060600,CRASH=MPSS,FILE=memheap.c,LINE=1494,STR=In task 0xc1c8e108, Assertion 0 failed,TASK=AMSS,VER=SWI9X50C_00.06.06.00

I think firmware on my EM7565 is very old and may have issue in upgrading firmware.

Also, I found this:

As described in above, I am able to upgrade to version 1.7.2, but only under Windows. Upgrading in Linux still does not work. But I think it doesn’t matter at this point.

Thanks,
Shuo

Hi James,

I tried on two Linux versions:
4.1.27-rt30
3.14.34
None of them works.

I tried both the lite version firmware download tool “fwdwl-litearm” and the regular version that uses SDK “fwdldarm”. The SLQS SDK that I tried are 4.0.15 and 4.0.16. None of them works.

When upgrading from 1.0.2 to 1.5.3 using lite version:
“litefw version :lite-fwSLQS04.00.15
INFO: QDL Port : /dev/ttyUSB0
INFO: Device Path: /dev/qcqmi0
INFO: FW Path : ./fw151/
Package Info:
Carrier :GENERIC
FW Version :01.05.01.00
Model ID :SWI9X50C
Package ID :000
PRI Version:001.028
SKU :9999999
file_type : 6
CWE+NVU
Set pref ImageTypesSize: 2
Modem Needs FW
Modem Needs PRI
QMI current modem power 3
Waiting for modem to disconnect from the host after reset command is issued …
Modem disconnected from host.
Waiting for modem to come up in BOOT and HOLD mode …
BOOT and HOLD Mode. Downloading firmware …
iFWImageType:6
eFW_TYPE_CWE_NVU
Tx:”

Then it stalled at “Tx:”

When upgrading from 1.0.2 to 1.5.3 using SDK binary version:
“Detecting USB of the target
DONE
Communicating with the target
DONE
Switching to firmware download mode
…DONE
Downloading the firmware
…”

Then it get stalled at “Downloading the firmware…”

Thanks,
Shuo

Hi @sdong
The modem you have is an earlier one based on the FW version from !FLOG. Please reach out to your SWI distributor or official channels for support. Thanks
Regards
Alan

Hi James,

I got dual SIM working by using “SLQSUIMSwitchSlot” SDK function.

For multi PDN, this is what I did:
at!netnum=4
echo 0 > /sys/module/GobiNet/parameters/iIPAlias
reset modem.

dmesg:
[ 4167.033264] GobiSerial 1-1.1:1.0: GobiSerial converter detected
[ 4167.043152] usb 1-1.1: GobiSerial converter now attached to ttyUSB0
[ 4167.064373] GobiSerial 1-1.1:1.2: GobiSerial converter detected
[ 4167.072922] usb 1-1.1: GobiSerial converter now attached to ttyUSB1
[ 4167.096634] GobiSerial 1-1.1:1.3: GobiSerial converter detected
[ 4167.104184] usb 1-1.1: GobiSerial converter now attached to ttyUSB2
[ 4167.129247] GobiNet 1-1.1:1.8 eth1: register ‘GobiNet’ at usb-xhci-hcd.0.auto-1.1, GobiNet Ethernet Device, ce:c7:0e:3e:ca:28
[ 4167.141780] QMAP Enabled
[ 4167.151194] USB Speed : USB 2.0
[ 4177.268448] creating qcqmi0
[ 4177.271630] RawIP mode

And I can see 1+4 network interface for cell modem: eth1 + gobi-0-0, gobi-0-1, gobi-0-2, gobi-0-3.
ifconfig -a
eth1 Link encap:Ethernet HWaddr CE:C7:0E:3E:CA:08
BROADCAST NOARP MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

gobi-0-0 Link encap:Ethernet HWaddr AE:23:EB:EE:17:70
NOARP MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

gobi-0-1 Link encap:Ethernet HWaddr CA:57:00:66:0F:8E
NOARP MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

gobi-0-2 Link encap:Ethernet HWaddr 8A:98:3E:0B:46:33
NOARP MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

gobi-0-3 Link encap:Ethernet HWaddr C6:A2:FC:6A:F2:A6
NOARP MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

However, the example demo you gave me uses lite-sdk. We are using regular SDK. Can you give me some sample code which uses regular SDK for mPDN?

To get data session, we are using “SLQSStartStopDataSession()” SDK function. In mPDN case, the SLQSStartStopDataSession function returns no error. And it got an session ID.
However, I cannot get dhcp address on it:
ifconfig eth1 up
ifconfig gobi-0-0 up
ifconfig gobi-0-1 up
ifconfig gobi-0-2 up
ifconfig gobi-0-3 up
udhcpc -i eth1
udhcpc -i gobi-0-0
udhcpc -i gobi-0-1
udhcpc -i gobi-0-2
udhcpc -i gobi-0-3

None of the 5 interfaces is able to get an DHCP address.

One more thing I should mention is that, for this test, we are using GobiNet version 2.50, and SDK version 4.0.11.
I will try to use an newer GobiNet version 2.53, and SDK version 4.0.15 later.

Thanks,

Hi Alan,

Thanks for your reply. We are not using these old EM7565 any more.
Now we switched to use new version that has 1.7.2 firmware on it.

Thanks,
Shuo

Hi Shuo,

In QMAP mode you have to bind the interface first with QmapBindMuxID()
Do you have access to qatestapp?
if yes you can use QmapBindMuxID followed by QmapStartStopDataSession

Thanks,
James

Hi James,

I only have the binary tool called qatestarm, qatesthostx86_64, … under pkgs/qa directory of SDK.
But I don’t have the source code for it. Can you provide me the source code of qatestapp? So that I can see how to use SDK function to setup multi PDN.

Thanks,
Shuo

Hi Shuo,

Sharing SDK source requires an NDA.
Do you have NDA with us?

Thanks,
James

Hi James,

I don’t think I have an NDA. How could I get it?
Some one in other department of my employer is working to get an assigned SLA. But it hasn’t done yet :joy:
That why I only have the binary version of SDK.

Thanks,
Shuo