As the title says… I’m trying to use an external SIM to establish a TCP connection to my server to send/receive dummy data.
I have verified that the external SIM card is enabled and got able to send text messages via cm sms send
when I check if the radio is connected to the LTE network it seems fine to me
root@swi-mdm9x28-wp:~# cm radio
Power: ON
Current Network Operator: TELCEL
Current RAT: LTE network (LE_MRC_RAT_LTE)
Status: Registered, home network (LE_MRC_REG_HOME)
Signal: Strong signal strength (4)
PS: Packet Switched Registered, home network (LE_MRC_REG_HOME)
I have set the APN authentication parameters and verified those with the network provider.
What I am missing here is where is the starting point to write a simple application in which I can indicate to which server send/received data, I’m not using Octave or airvantage.
I have seen this guide:
In which you disable Octave at build time, but then where does this connects to then?
I tried that and it failed… I did check the log but I am not sure what is happening there, I see some errors but don’t know how to address them… log is below as reference. Any help is appreciated.
root@swi-mdm9x28-wp:~# cm data connect &
root@swi-mdm9x28-wp:~# Setting up profile 2
Connecting … failed
Thu May 21 10:04:48 -07 2020 - Connection Failure: LE_FAULT
[1]+ Done(1) cm data connect
root@swi-mdm9x28-wp:~#
root@swi-mdm9x28-wp:~# logread -f
May 21 10:04:47 swi-mdm9x28-wp user.info Legato: INFO | supervisor[925]/supervisor T=main | app.c app_Create() 3258 | Creating app ‘tools’
May 21 10:04:47 swi-mdm9x28-wp user.warn Legato: -WRN- | supervisor[925]/supervisor T=main | proc.c GetWatchdogAction() 362 | cm@0 watchdogAction ‘’ in proc section
May 21 10:04:47 swi-mdm9x28-wp user.info Legato: INFO | supervisor[925]/supervisor T=main | app.c app_Start() 3471 | Starting app ‘tools’
May 21 10:04:47 swi-mdm9x28-wp user.info Legato: INFO | supervisor[925]/supervisor T=main | app.c CreateFileLink() 2084 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/lib/libComponent_uartMode.so’ to '/legato/systems/current/appsWriteable/tools/lib/libCom
May 21 10:04:47 swi-mdm9x28-wp user.info Legato: INFO | supervisor[925]/supervisor T=main | app.c CreateFileLink() 2084 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/lib/libComponent_secstore.so’ to '/legato/systems/current/appsWriteable/tools/lib/libCom
May 21 10:04:47 swi-mdm9x28-wp user.info Legato: INFO | supervisor[925]/supervisor T=main | app.c CreateFileLink() 2084 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/lib/libComponent_cm.so’ to '/legato/systems/current/appsWriteable/tools/lib/libComponent
May 21 10:04:47 swi-mdm9x28-wp user.info Legato: INFO | supervisor[925]/supervisor T=main | app.c CreateFileLink() 2084 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/lib/libComponent_moduleLoad.so’ to '/legato/systems/current/appsWriteable/tools/lib/libC
May 21 10:04:47 swi-mdm9x28-wp user.info Legato: INFO | supervisor[925]/supervisor T=main | app.c CreateFileLink() 2084 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/lib/libComponent_fwupdate.so’ to '/legato/systems/current/appsWriteable/tools/lib/libCom
May 21 10:04:47 swi-mdm9x28-wp user.info Legato: INFO | supervisor[925]/supervisor T=main | app.c CreateFileLink() 2084 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/lib/libComponent_pmtool.so’ to '/legato/systems/current/appsWriteable/tools/lib/libCompo
May 21 10:04:47 swi-mdm9x28-wp user.info Legato: INFO | supervisor[925]/supervisor T=main | app.c CreateFileLink() 2084 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/lib/libComponent_le_pa_uartMode_default.so’ to '/legato/systems/current/appsWriteable/to
May 21 10:04:47 swi-mdm9x28-wp user.info Legato: INFO | supervisor[925]/supervisor T=main | app.c CreateFileLink() 2084 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/lib/libComponent_swiQmi.so’ to '/legato/systems/current/appsWriteable/tools/lib/libCompo
May 21 10:04:47 swi-mdm9x28-wp user.info Legato: INFO | supervisor[925]/supervisor T=main | app.c CreateFileLink() 2084 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/lib/libComponent_le_pa_uartMode.so’ to '/legato/systems/current/appsWriteable/tools/lib/
May 21 10:04:47 swi-mdm9x28-wp user.info Legato: INFO | supervisor[925]/supervisor T=main | app.c CreateFileLink() 2084 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/lib/libComponent_gnss.so’ to '/legato/systems/current/appsWriteable/tools/lib/libCompone
May 21 10:04:47 swi-mdm9x28-wp user.info Legato: INFO | supervisor[925]/supervisor T=main | app.c CreateFileLink() 2084 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/bin/cm’ to ‘/legato/systems/current/appsWriteable/tools/bin/cm’: Already exists
May 21 10:04:47 swi-mdm9x28-wp user.info Legato: INFO | supervisor[925]/supervisor T=main | app.c CreateFileLink() 2084 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/bin/gnss’ to ‘/legato/systems/current/appsWriteable/tools/bin/gnss’: Already exists
May 21 10:04:47 swi-mdm9x28-wp user.info Legato: INFO | supervisor[925]/supervisor T=main | app.c CreateFileLink() 2084 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/bin/kmod’ to ‘/legato/systems/current/appsWriteable/tools/bin/kmod’: Already exists
May 21 10:04:47 swi-mdm9x28-wp user.info Legato: INFO | supervisor[925]/supervisor T=main | app.c CreateFileLink() 2084 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/bin/fwupdate’ to ‘/legato/systems/current/appsWriteable/tools/bin/fwupdate’: Already exi
May 21 10:04:47 swi-mdm9x28-wp user.info Legato: INFO | supervisor[925]/supervisor T=main | app.c CreateFileLink() 2084 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/bin/secstore’ to ‘/legato/systems/current/appsWriteable/tools/bin/secstore’: Already exi
May 21 10:04:47 swi-mdm9x28-wp user.info Legato: INFO | supervisor[925]/supervisor T=main | app.c CreateFileLink() 2084 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/bin/uartMode’ to ‘/legato/systems/current/appsWriteable/tools/bin/uartMode’: Already exi
May 21 10:04:47 swi-mdm9x28-wp user.info Legato: INFO | supervisor[925]/supervisor T=main | app.c CreateFileLink() 2084 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/bin/pmtool’ to ‘/legato/systems/current/appsWriteable/tools/bin/pmtool’: Already exists
May 21 10:04:47 swi-mdm9x28-wp user.info Legato: INFO | supervisor[925]/supervisor T=main | app.c CreateFileLink() 2084 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/scripts/cm’ to ‘/legato/systems/current/appsWriteable/tools/scripts/cm’: Already exists
May 21 10:04:47 swi-mdm9x28-wp user.info Legato: INFO | supervisor[925]/supervisor T=main | proc.c proc_Start() 1403 | Starting process ‘cm@0’ with pid 12205
May 21 10:04:47 swi-mdm9x28-wp user.info Legato: INFO | supervisor[925]/supervisor T=main | supervisor.c SigChildHandler() 899 | Reaping unconfigured child process 12201.
May 21 10:04:47 swi-mdm9x28-wp user.info Legato: INFO | supervisor[12205]/supervisor T=main | proc.c proc_Start() 1363 | Execing ‘scripts/cm’
May 21 10:04:47 swi-mdm9x28-wp user.info Legato: INFO | supervisor[12205]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxCoreDumpFileBytes to value 8192.
May 21 10:04:47 swi-mdm9x28-wp user.info Legato: INFO | supervisor[12205]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxFileBytes to value 90112.
May 21 10:04:47 swi-mdm9x28-wp user.info Legato: INFO | supervisor[12205]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxLockedMemoryBytes to value 8192.
May 21 10:04:47 swi-mdm9x28-wp user.info Legato: INFO | supervisor[12205]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxFileDescriptors to value 256.
May 21 10:04:47 swi-mdm9x28-wp user.info Legato: INFO | supervisor[12205]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxMQueueBytes to value 512.
May 21 10:04:47 swi-mdm9x28-wp user.info Legato: INFO | supervisor[12205]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxThreads to value 20.
May 21 10:04:47 swi-mdm9x28-wp user.info Legato: INFO | supervisor[12205]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxQueuedSignals to value 100.
May 21 10:04:47 swi-mdm9x28-wp user.warn Legato: -WRN- | UNKNOWN[12208]/framework T=main | safeRef.c le_ref_CreateRef() 547 | Safe reference map maximum exceeded for refFdMonitors, new size 42
May 21 10:04:47 swi-mdm9x28-wp user.warn Legato: -WRN- | cellNetService[1520]/framework T=main | safeRef.c le_ref_CreateRef() 547 | Safe reference map maximum exceeded for refFdMonitors, new size 42
May 21 10:04:47 swi-mdm9x28-wp user.info Legato: INFO | modemDaemon[1576]/modemDaemon T=main | le_mdc.c CloseSessionEventHandler() 961 | SessionRef 0x7f5fcd48 has been closed
May 21 10:04:47 swi-mdm9x28-wp user.err Legato: =ERR= | modemDaemon[1576]/modemDaemon T=main | le_sms.c CloseSessionEventHandler() 2203 | SessionRef (0x7f5fd138) has been closed
May 21 10:04:47 swi-mdm9x28-wp user.warn Legato: -WRN- | UNKNOWN[12221]/framework T=main | safeRef.c le_ref_CreateRef() 547 | Safe reference map maximum exceeded for refFdMonitors, new size 42
May 21 10:04:47 swi-mdm9x28-wp user.info Legato: INFO | cm[12221]/cm T=main | cm_data.c cm_data_ProcessDataCommand() 1164 | dataParam is NULL
May 21 10:04:48 swi-mdm9x28-wp user.err Legato: =ERR= | modemDaemon[1576]/swiQmi T=main | swiQmi.c swiQmi_CheckResponse() 799 | Sending QMI_WDS_START_NETWORK_INTERFACE_REQ_V01 failed: rc=0 (), resp.result=1.[0x01], resp.error=14.[0x0e]
May 21 10:04:48 swi-mdm9x28-wp user.err Legato: =ERR= | modemDaemon[1576]/le_pa T=main | pa_mdc_qmi.c StartSession() 1978 | Data connection failure Call End provided 45, Code 1
May 21 10:04:48 swi-mdm9x28-wp user.err Legato: =ERR= | modemDaemon[1576]/le_pa T=main | pa_mdc_qmi.c StartSession() 1989 | Data connection failure Verbose Call End provided Type 6, Verbose 55
May 21 10:04:48 swi-mdm9x28-wp user.err Legato: =ERR= | modemDaemon[1576]/modemDaemon T=main | le_mdc.c le_mdc_StartSession() 1270 | Get Async Connection failure 45, 1, 6, 55
May 21 10:04:48 swi-mdm9x28-wp user.info Legato: INFO | modemDaemon[1576]/modemDaemon T=main | le_mdc.c CloseSessionEventHandler() 961 | SessionRef 0x7f5fd728 has been closed
May 21 10:04:48 swi-mdm9x28-wp user.err Legato: =ERR= | modemDaemon[1576]/modemDaemon T=main | le_sms.c CloseSessionEventHandler() 2203 | SessionRef (0x7f5fd4c8) has been closed
May 21 10:04:48 swi-mdm9x28-wp user.info Legato: INFO | supervisor[925]/supervisor T=main | proc.c proc_SigChildHandler() 2079 | Process ‘cm@0’ (PID: 12205) has exited with exit code 1.
May 21 10:04:48 swi-mdm9x28-wp user.warn Legato: -WRN- | supervisor[925]/supervisor T=main | app.c app_SigChildHandler() 4066 | Process ‘cm@0’ in app ‘tools’ faulted: Ignored.
May 21 10:04:48 swi-mdm9x28-wp user.info Legato: INFO | supervisor[925]/supervisor T=main | app.c app_StopComplete() 4753 | app ‘tools’ has stopped.
May 21 10:04:48 swi-mdm9x28-wp user.info Legato: INFO | supervisor[925]/supervisor T=main | apps.c DeactivateAppContainer() 374 | Application ‘tools’ has stopped.
Ok, so I changed the APN of my network provider to be in profile 1 (instead of being in profile 2) and tried to connect, which was successful…
After that I though that it might be profile 1 that works and 2 just does not for any reason?
So I tried setting a random typed APN in profile 1 and after connect, it just worked… so, my conclusions are that connection supports only one profile (the index 1) and that it does not matter what APN you have configured neither if security has been set…
I have check the sim card info and it says it is using the external sim
root@swi-mdm9x28-wp:~# cm sim info
Type: EXTERNAL_SLOT_1
ICCID: xxxxxxxxx
Home Network Operator: TELCEL
EID:
IMSI: xxxxxxxxx
Phone Number: +xxxxxx
I really do not understand what is happening here, can someone clarify this?
I just need to know that that I am using the external sim card and that I can interface directly to my server without passing through octave/sierra.
I don’t need the second profile… probably I ended setting it by mistake. Right now I am only using profile 1, which seems to connect as I have ping google and other pages.
I have set the APN in profile 1 to be my networks provided and works, but if I set it to something else it still works, so what is the APN setting for?
I have contacted my network provider and they have confirmed that I have been using the data from the SIM card they provided, so as you say, it seems the APN configuration does not matter…
I am now struggling creating an app that can do the same as cm data connect, I have configured the modem as follows:
If I run this app, and check the connection status, it seems connected, but I cannot ping any server… I have to use command line to disconnect and then to connect again and then I can ping, as shown below… am I missing something ?
root@swi-mdm9x28-wp:~# cm data
Index: 1
APN: internet.itelcel.com
PDP Type: IPV4V6
Connected: yes
Auth type: PAP
User name: webgpr
Password: webgprs2002
Interface: rmnet_data0
Family[IPv4]: inet
IP[IPv4]: 10.18.81.121
Gateway[IPv4]: 10.18.81.122
Dns1[IPv4]: 10.233.16.4
Dns2[IPv4]: 10.182.35.36
root@swi-mdm9x28-wp:~# ping google.com
ping: bad address ‘google.com’
root@swi-mdm9x28-wp:~# cm disconnect
Service ‘disconnect’ does not exist.
root@swi-mdm9x28-wp:~# cm data disconnect
Disconnecting … ok
root@swi-mdm9x28-wp:~# cm data connect
Checking if device ‘rmnet_data0’ is up … ok
Routing inet … ok
Updating /etc/resolv.conf … ok
Updating /etc/resolv.conf … ok
Testing connection … root@swi-mdm9x28-wp:~# cm data
Index: 1
APN: internet.itelcel.com
PDP Type: IPV4V6
Connected: yes
Auth type: PAP
User name: webgpr
Password: webgprs2002
Interface: rmnet_data0
Family[IPv4]: inet
IP[IPv4]: 10.18.81.121
Gateway[IPv4]: 10.18.81.122
Dns1[IPv4]: 10.233.16.4
Dns2[IPv4]: 10.182.35.36
root@swi-mdm9x28-wp:~# ping google.com
PING google.com (172.217.5.78): 56 data bytes
64 bytes from 172.217.5.78: seq=0 ttl=55 time=80.150 ms
^C
— google.com ping statistics —
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 80.150/80.150/80.150 ms
root@swi-mdm9x28-wp:~#
I tried running the demo with the same results…
I think it would help me more to know what exactly “cm data connect” does…
where can I see the application that parses the terminal input to know what cm data connect does?