httpGet not working, cm data connect failing

Hi, I’m trying to run the httpGet application (and curl as well) with no success so far. My sim provider is aeris.

My cm info is:

Device:                        FX30S(WP7702)
IMEI:                          354723090692947
IMEISV:                        8
FSN:                           VU252600491010
Firmware Version:              SWI9X06Y_02.36.08.09 c094f4 jenkins 2022/06/24 03:14:28
Bootloader Version:            SWI9X06Y_02.36.08.09 c094f4 jenkins 2022/06/24 03:14:28
MCU Version:                   002.015
PRI Part Number (PN):          9907957
PRI Revision:                  001.000 
Carrier PRI Name:              SIERRA
Carrier PRI Revision:          001.049_000
SKU:                           1103882
Last Reset Cause:              Power Down
Resets Count:                  Expected: 37     Unexpected: 1
FX30 Version:                  R15.1.0.004

My cm radio output is:

root@fx30s:~# cm radio
Power:                         ON
Current Network Operator:      TELCEL
Current RAT:                   GSM network (LE_MRC_RAT_GSM)
Status:                        Registered to a roaming network (LE_MRC_REG_ROAMING)
Signal:                        Good signal strength (3)
PS:                            Packet Switched Registered to a roaming network (LE_MRC_REG_ROAMING)

My cm data is:

root@fx30s:~# cm data
Index:                         1
APN:                           lp.swir
PDP Type:                      IPV4V6
Connected:                     no

My cm data connect is:

root@fx30s:~# curl https://www.google.com
curl: (6) Could not resolve host: www.google.com
root@fx30s:~# cm data connect
Setting up profile 1
Connecting ... ok
No interface, cannot proceed.

curl gives:

root@fx30s:~# curl https://www.google.com
curl: (6) Could not resolve host: www.google.com

httpGet logread gives:

Nov  1 00:32:13 fx30s user.info Legato:  INFO | httpGet[23506] | HTTP Get!
Nov  1 00:32:13 fx30s user.info Legato:  INFO | httpGet[23506]/httpGetComponent T=main | httpGet.c _httpGetComponent_COMPONENT_INIT() 125 | Requesting connection...
Nov  1 00:32:43 fx30s user.err Legato: =ERR= | httpGet[23506]/httpGetComponent T=main | httpGet.c TimeoutHandler() 47 | Couldn't establish connection after 30 seconds
Nov  1 00:32:43 fx30s user.info Legato:  INFO | dcsDaemon[1342]/dcsDaemon T=main | dcsServer.c CloseSessionEventHandler() 1461 | Client 0x23217a8 killed, remove allocated resources
Nov  1 00:32:43 fx30s user.info Legato:  INFO | supervisor[1260]/supervisor T=main | proc.c proc_SigChildHandler() 2094 | Process 'httpGet' (PID: 23506) has exited with exit code 1.
Nov  1 00:32:43 fx30s user.warn Legato: -WRN- | supervisor[1260]/supervisor T=main | app.c app_SigChildHandler() 4182 | Process 'httpGet' in app 'httpGet' faulted: Ignored.
Nov  1 00:32:43 fx30s user.info Legato:  INFO | supervisor[1260]/supervisor T=main | app.c app_StopComplete() 4881 | app 'httpGet' has stopped.
Nov  1 00:32:43 fx30s user.info Legato:  INFO | supervisor[1260]/supervisor T=main | apps.c DeactivateAppContainer() 374 | Application 'httpGet' has stopped.
Nov  1 00:39:09 fx30s user.info Legato:  INFO | avcDaemon[1318]/avcDaemon T=main | avcClient.c StopBearer() 826 | Stop bearer 0xe5
Nov  1 00:39:09 fx30s user.info Legato:  INFO | avcDaemon[1318]/avcDaemon T=main | avcClient.c StartBearer() 1083 | Start Bearer
Nov  1 00:39:09 fx30s user.info Legato:  INFO | avcDaemon[1318]/avcDaemon T=main | avcClient.c avcClient_Connect() 1304 | Starting retry timer of 60 min at index 1
Nov  1 00:39:09 fx30s user.info Legato:  INFO | dcsDaemon[1342]/dcsDaemon T=main | dcsTechRank.c dcsTechRank_SelectDataChannel() 229 | Selected channel name 1
Nov  1 00:39:09 fx30s user.info Legato:  INFO | dcsDaemon[1342]/dcs T=main | dcs.c dcs_AddEventHandler() 694 | Adding channel handler for channel 1 of technology cellular
Nov  1 00:39:09 fx30s user.info Legato:  INFO | dcsDaemon[1342]/dcs T=main | dcs.c dcs_AddEventHandler() 737 | Event handler with reference 0xb1b and event ID 0x4171 added
Nov  1 00:39:09 fx30s user.info Legato:  INFO | dcsDaemon[1342]/dcs T=main | dcs.c dcs_Start() 455 | Starting channel 1 of technology cellular by app session with reference (nil)
Nov  1 00:39:09 fx30s user.info Legato:  INFO | dcsDaemon[1342]/dcs T=main | dcs.c dcs_Start() 513 | Initiating technology to start channel 1 for app session (nil), request reference 0x2e5
Nov  1 00:39:09 fx30s user.info Legato:  INFO | dcsDaemon[1342]/dcsDaemon T=main | dcsServer.c TryStartTechSession() 1235 | Successfully initiated data channel 1 of technology 1
Nov  1 00:39:09 fx30s user.info Legato:  INFO | dcsDaemon[1342]/dcs T=main | dcsTech.c dcsTech_Start() 336 | Request to start channel 1 of technology cellular
Nov  1 00:39:09 fx30s user.err Legato: =ERR= | modemDaemon[1376]/swiQmi T=main | swiQmi.c swiQmi_CheckResponse() 947 | Sending QMI_WDS_START_NETWORK_INTERFACE_REQ_V01 failed: rc=0 (), resp.result=1.[0x01], resp.error=14.[0x0e]
Nov  1 00:39:09 fx30s user.err Legato: =ERR= | modemDaemon[1376]/le_pa T=main | pa_mdc_qmi.c StartSession() 1975 | Data connection failure Call End provided 11, Code 1018
Nov  1 00:39:09 fx30s user.err Legato: =ERR= | modemDaemon[1376]/le_pa T=main | pa_mdc_qmi.c StartSession() 1986 | Data connection failure Verbose Call End provided Type 6, Verbose 33
Nov  1 00:39:16 fx30s user.err Legato: =ERR= | modemDaemon[1376]/swiQmi T=main | swiQmi.c swiQmi_CheckResponse() 947 | Sending QMI_WDS_START_NETWORK_INTERFACE_REQ_V01 failed: rc=0 (), resp.result=1.[0x01], resp.error=14.[0x0e]
Nov  1 00:39:16 fx30s user.err Legato: =ERR= | modemDaemon[1376]/le_pa T=main | pa_mdc_qmi.c StartSession() 1975 | Data connection failure Call End provided 11, Code 1018                                                                                           
Nov  1 00:39:16 fx30s user.err Legato: =ERR= | modemDaemon[1376]/le_pa T=main | pa_mdc_qmi.c StartSession() 1986 | Data connection failure Verbose Call End provided Type 6, Verbose 33
Nov  1 00:39:16 fx30s user.err Legato: =ERR= | modemDaemon[1376]/modemDaemon T=main | le_mdc.c le_mdc_StartSession() 1284 | Get IPv4v6 Async Connection failureV4 11, 1018, 6, 33
Nov  1 00:39:16 fx30s user.err Legato: =ERR= | modemDaemon[1376]/modemDaemon T=main | le_mdc.c le_mdc_StartSession() 1297 | Get IPv4v6 Async Connection failureV6 11, 1018, 6, 33
Nov  1 00:39:16 fx30s user.err Legato: =ERR= | dcsDaemon[1342]/dcsCellular T=main | dcsCellular.c le_dcsCellular_Start() 1097 | Failed to start cellular connection 1; error: -6
Nov  1 00:39:16 fx30s user.err Legato: =ERR= | dcsDaemon[1342]/dcsCellular T=main | dcsCellular.c le_dcsCellular_Start() 1107 | IPV4 failure reason 11, code 1018
Nov  1 00:39:16 fx30s user.err Legato: =ERR= | dcsDaemon[1342]/dcsCellular T=main | dcsCellular.c le_dcsCellular_Start() 1112 | IPV6 failure reason 11, code 1018
Nov  1 00:39:16 fx30s user.info Legato:  INFO | dcsDaemon[1342]/dcsCellular T=main | dcsCellular.c le_dcsCellular_RetryConn() 1311 | Cellular connection 1 already maxed out retry allowed (4)
Nov  1 00:39:16 fx30s user.err Legato: =ERR= | dcsDaemon[1342]/dcs T=main | dcsTech.c dcsTech_Start() 369 | Failed to start channel 1; error: -6
Nov  1 00:39:16 fx30s user.info Legato:  INFO | dcsDaemon[1342]/dcsDaemon T=main | dcsServer.c ChannelEventHandler() 909 | Received for channel reference 0x4d event Down
Nov  1 00:39:16 fx30s user.info Legato:  INFO | dcsDaemon[1342]/dcs T=main | dcs.c dcs_Stop() 586 | Stopping channel 1 of technology cellular
Nov  1 00:39:16 fx30s user.info Legato:  INFO | dcsDaemon[1342]/dcs T=main | dcs.c dcs_Stop() 612 | Channel 1 requested to be stopped
Nov  1 00:39:16 fx30s user.info Legato:  INFO | dcsDaemon[1342]/dcsDaemon T=main | dcsServer.c TryStopTechSession() 1286 | Successfully initiated stopping active data connection 1 of technology 1
Nov  1 00:39:16 fx30s user.info Legato:  INFO | dcsDaemon[1342]/dcsDaemon T=main | dcsServer.c UpdateTechnologyStatus() 1155 | Technology retry timer is already running; wait for next retry
Nov  1 00:39:16 fx30s user.info Legato:  INFO | dcsDaemon[1342]/dcs T=main | dcsTech.c dcsTech_Stop() 406 | Request to stop channel 1 of technology cellular
Nov  1 00:39:16 fx30s user.err Legato: =ERR= | modemDaemon[1376]/swiQmi T=main | swiQmi.c swiQmi_CheckResponse() 947 | Sending QMI_WDS_GET_PKT_STATISTICS_REQ_V01 failed: rc=0 (), resp.result=1.[0x01], resp.error=70.[0x46]
Nov  1 00:39:16 fx30s user.err Legato: =ERR= | modemDaemon[1376]/le_pa T=main | pa_mdc_qmi.c pa_mdc_StopSession() 2821 | Bad input parameter
Nov  1 00:39:16 fx30s user.err Legato: =ERR= | modemDaemon[1376]/modemDaemon T=main | le_mdc.c le_mdc_StopSession() 1411 | conFailurePtr is NULL
Nov  1 00:39:16 fx30s user.warn Legato: -WRN- | dcsDaemon[1342]/dcsCellular T=main | dcsCellular.c le_dcsCellular_Stop() 1189 | Failed to stop cellular connection 1; error: -6
Nov  1 00:39:16 fx30s user.warn Legato: -WRN- | dcsDaemon[1342]/dcs T=main | dcsTech.c dcsTech_Stop() 430 | Failed to stop channel 1; error: -6
Nov  1 00:39:16 fx30s user.warn Legato: -WRN- | avcDaemon[1318]/avcDaemon T=main | avcClient.c ConnectionStateHandler() 544 | Disconnected from data connection service, current state 0
Nov  1 00:39:16 fx30s user.warn Legato: -WRN- | avcDaemon[1318]/avcDaemon T=main | avcClient.c ConnectionStateHandler() 570 | AVC: Disconnected even though we are not connected

Are you able to ping google server?

Seems the data establishment was not successful

Nov 1 00:39:09 fx30s user.err Legato: =ERR= | modemDaemon[1376]/swiQmi T=main | swiQmi.c swiQmi_CheckResponse() 947 | Sending QMI_WDS_START_NETWORK_INTERFACE_REQ_V01 failed: rc=0 (), resp.result=1.[0x01], resp.error=14.[0x0e]
Nov 1 00:39:09 fx30s user.err Legato: =ERR= | modemDaemon[1376]/le_pa T=main | pa_mdc_qmi.c StartSession() 1975 | Data connection failure Call End provided 11, Code 1018
Nov 1 00:39:09 fx30s user.err Legato: =ERR= | modemDaemon[1376]/le_pa T=main | pa_mdc_qmi.c StartSession() 1986 | Data connection failure Verbose Call End provided Type 6, Verbose 33
Nov 1 00:39:16 fx30s user.err Legato: =ERR= | modemDaemon[1376]/swiQmi T=main | swiQmi.c swiQmi_CheckResponse() 947 | Sending QMI_WDS_START_NETWORK_INTERFACE_REQ_V01 failed: rc=0 (), resp.result=1.[0x01], resp.error=14.[0x0e]
Nov 1 00:39:16 fx30s user.err Legato: =ERR= | modemDaemon[1376]/le_pa T=main | pa_mdc_qmi.c StartSession() 1975 | Data connection failure Call End provided 11, Code 1018

No it cannot, I tried to ping 8.8.8.8 but it says network is unreachable

Then seems to be sim card or nerwork issue
Maybe you can test the sim card with a phone first

It does work on a phone. The problem I’ve found out is the apn is set to lp.swir when it should be set to iot.aer.net

What can I do to change it?

you can type “cm data apn iot.aer.net

I’ve changed the apn, but cm data connect kept failing. Needed to do an AT+COPS=3
then cm data connect and then things worked.
What api should I use to make this changes from code? Or how can I automate this changes in a script (cm documentation says that is not advisable tho)

you can try


echo -ne "AT+COPS=3\\xd\\xa" > /dev/ttyAT

You can see here on how to send AT command in unsandboxed legato application: