HttpGet example via modem does not work on WP7702

I tried to run the httpGet sample module inside Legato AF on WP7702 with NBIOT. The httpGet will fail with the error message as below. I had connect the NBIOT network and set the DNS into /etc/resolv.conf. But it still can not run correctly.

root@swi-mdm9x28-wp:~/sdcard# app start httpGet && logread -f 
Jul 11 08:39:06 swi-mdm9x28-wp user.warn Legato: -WRN- | _UNKNOWN_[4720]/framework T=main | fdMonitor.c le_fdMonitor_Create() 451 | FD Monitor object name 'httpGet.httpGetComponent.le_data' truncated to 'httpGet.httpGetComponent.le_dat'.
Jul 11 16:39:06 swi-mdm9x28-wp user.info Legato:  INFO | httpGet[4720] | HTTP Get!
Jul 11 08:39:06 swi-mdm9x28-wp user.info Legato:  INFO | httpGet[4720]/httpGetComponent T=main | httpGet.c _httpGetComponent_COMPONENT_INIT() 133 | Requesting connection...
Jul 11 16:39:06 swi-mdm9x28-wp user.warn Legato: -WRN- | dcsDaemon[1011]/dcsDaemon T=main | dcsTechRank.c RetrieveWifiCfgSsid() 147 | No value set for 'SSID'!
Jul 11 16:39:06 swi-mdm9x28-wp user.err Legato: =ERR= | dcsDaemon[1011]/dcsDaemon T=main | dcsTechRank.c dcsTechRank_SelectDataChannel() 234 | Failed to retrieve wifi config SSID
Jul 11 16:39:06 swi-mdm9x28-wp user.err Legato: =ERR= | dcsDaemon[1011]/dcsDaemon T=main | dcsServer.c TryStartTechSession() 1097 | Failed to pick technology 0 to start a data connection
Jul 11 16:39:06 swi-mdm9x28-wp user.info Legato:  INFO | dcsDaemon[1011]/dcsDaemon T=main | dcsServer.c UpdateTechnologyStatus() 1065 | Technology retry timer is already running; wait for next retry
Jul 11 16:39:06 swi-mdm9x28-wp user.notice kernel: [ 1127.194117] audit: type=1400 audit(1594456746.588:29): lsm=SMACK fn=smack_inode_getattr action=denied subject="app.httpGet" object="admin" requested=r pid=4720 comm="httpGet" path="pipe:[16062]" dev="pipefs" ino=16062
Jul 11 16:39:20 swi-mdm9x28-wp user.info Legato:  INFO | dcsDaemon[1011]/dcsDaemon T=main | dcsTechRank.c dcsTechRank_SelectDataChannel() 228 | Selected channel name 1
Jul 11 16:39:20 swi-mdm9x28-wp user.info Legato:  INFO | dcsDaemon[1011]/dcs T=main | dcs.c dcs_AddEventHandler() 696 | Adding channel handler for channel 1 of technology cellular
Jul 11 16:39:20 swi-mdm9x28-wp user.info Legato:  INFO | dcsDaemon[1011]/dcs T=main | dcs.c dcs_AddEventHandler() 736 | Event handler with reference 0xb8d and event ID 0x1459 added
Jul 11 16:39:20 swi-mdm9x28-wp user.info Legato:  INFO | dcsDaemon[1011]/dcs T=main | dcs.c dcs_Start() 459 | Starting channel 1 of technology cellular by app session with reference (nil)
Jul 11 16:39:20 swi-mdm9x28-wp user.info Legato:  INFO | dcsDaemon[1011]/dcs T=main | dcs.c dcs_Start() 516 | Initiating technology to start channel 1 for app session (nil), request reference 0x329
Jul 11 16:39:20 swi-mdm9x28-wp user.info Legato:  INFO | dcsDaemon[1011]/dcsDaemon T=main | dcsServer.c TryStartTechSession() 1145 | Successfully initiated data channel 1 of technology 1
Jul 11 16:39:20 swi-mdm9x28-wp user.info Legato:  INFO | dcsDaemon[1011]/dcs T=main | dcsTech.c dcsTech_Start() 338 | Request to start channel 1 of technology cellular
Jul 11 16:39:20 swi-mdm9x28-wp user.err Legato: =ERR= | modemDaemon[1047]/le_pa T=main | pa_mdc_qmi.c pa_mdc_StartSessionIPV4() 2501 | Data session is already connected
Jul 11 16:39:20 swi-mdm9x28-wp user.info Legato:  INFO | dcsDaemon[1011]/dcsCellular T=main | dcsCellular.c le_dcsCellular_Start() 1084 | Succeeded starting cellular connection 1
Jul 11 16:39:20 swi-mdm9x28-wp user.info Legato:  INFO | dcsDaemon[1011]/dcsDaemon T=main | dcsServer.c ChannelEventHandler() 820 | Received for channel reference 0x28d event Up
Jul 11 16:39:20 swi-mdm9x28-wp user.info Legato:  INFO | dcsDaemon[1011]/dcsDaemon T=main | dcsServer.c SetDefaultGWConfiguration() 456 | Setting default GW address on device
Jul 11 16:39:20 swi-mdm9x28-wp user.info Legato:  INFO | dcsDaemon[1011]/dcsNet T=main | dcsNet.c net_SetDefaultGW() 821 | Succeeded to set default GW addr on interface rmnet_data0 for channel 1 of technology cellular
Jul 11 16:39:20 swi-mdm9x28-wp user.info Legato:  INFO | dcsDaemon[1011]/dcsDaemon T=main | dcsServer.c SetDnsConfiguration() 620 | Setting DNS server addresses on device
Jul 11 16:39:20 swi-mdm9x28-wp user.err Legato: =ERR= | dcsDaemon[1011]/dcsCellular T=main | dcsCellular.c le_dcsCellular_GetDNSAddrs() 966 | Failed to retrieve DNS addresses for connection 1
Jul 11 16:39:20 swi-mdm9x28-wp user.info Legato:  INFO | dcsDaemon[1011]/dcsNet T=main | dcsNet.c net_SetDNS() 1220 | Given channel 1 of technology cellular got no DNS server address assigned
Jul 11 16:39:20 swi-mdm9x28-wp user.err Legato: =ERR= | dcsDaemon[1011]/dcsDaemon T=main | dcsServer.c SetDnsConfiguration() 646 | Failed to set DNS server addresses; error -6
Jul 11 16:39:20 swi-mdm9x28-wp user.info Legato:  INFO | dcsDaemon[1011]/dcsDaemon T=main | dcsServer.c SetDefaultRouteAndDns() 707 | Failed to set DNS configuration
Jul 11 16:39:20 swi-mdm9x28-wp user.info Legato:  INFO | dcsDaemon[1011]/dcsDaemon T=main | dcsServer.c SetDefaultRouteAndDns() 721 | Wait for next retry to set DNS configuration
Jul 11 16:39:30 swi-mdm9x28-wp user.info Legato:  INFO | dcsDaemon[1011]/dcsDaemon T=main | dcsServer.c SetDnsConfiguration() 620 | Setting DNS server addresses on device
Jul 11 16:39:30 swi-mdm9x28-wp user.err Legato: =ERR= | dcsDaemon[1011]/dcsCellular T=main | dcsCellular.c le_dcsCellular_GetDNSAddrs() 966 | Failed to retrieve DNS addresses for connection 1
Jul 11 16:39:30 swi-mdm9x28-wp user.info Legato:  INFO | dcsDaemon[1011]/dcsNet T=main | dcsNet.c net_SetDNS() 1220 | Given channel 1 of technology cellular got no DNS server address assigned
Jul 11 16:39:30 swi-mdm9x28-wp user.err Legato: =ERR= | dcsDaemon[1011]/dcsDaemon T=main | dcsServer.c SetDnsConfiguration() 646 | Failed to set DNS server addresses; error -6
Jul 11 16:39:30 swi-mdm9x28-wp user.err Legato: =ERR= | dcsDaemon[1011]/dcsDaemon T=main | dcsServer.c SetDNSConfigTimerHandler() 766 | Releasing data channel upon failure to retry setting DNS configuration; error -6
Jul 11 16:39:30 swi-mdm9x28-wp user.info Legato:  INFO | dcsDaemon[1011]/dcsNet T=main | dcsNet.c net_RestoreDefaultGW() 653 | Default IPv4 GW address 10.25.20.70 on interface rmnet_data0 restored
Jul 11 16:39:30 swi-mdm9x28-wp user.info Legato:  INFO | dcsDaemon[1011]/dcs T=main | dcs.c dcs_Stop() 588 | Stopping channel 1 of technology cellular
Jul 11 16:39:30 swi-mdm9x28-wp user.info Legato:  INFO | dcsDaemon[1011]/dcs T=main | dcs.c dcs_Stop() 613 | Channel 1 requested to be stopped
Jul 11 16:39:30 swi-mdm9x28-wp user.info Legato:  INFO | dcsDaemon[1011]/dcsDaemon T=main | dcsServer.c TryStopTechSession() 1197 | Successfully initiated stopping active data connection 1 of technology 1
Jul 11 16:39:30 swi-mdm9x28-wp user.info Legato:  INFO | dcsDaemon[1011]/dcsDaemon T=main | dcsServer.c UpdateTechnologyStatus() 1080 | Technology retry to connect will happen after 128 sec
Jul 11 16:39:30 swi-mdm9x28-wp user.info Legato:  INFO | dcsDaemon[1011]/dcs T=main | dcsTech.c dcsTech_Stop() 399 | Request to stop channel 1 of technology cellular
Jul 11 16:39:30 swi-mdm9x28-wp user.info Legato:  INFO | dcsDaemon[1011]/dcsCellular T=main | dcsCellular.c le_dcsCellular_Stop() 1184 | Succeeded stopping cellular connection 1
Jul 11 16:39:30 swi-mdm9x28-wp user.info Legato:  INFO | dcsDaemon[1011]/dcsCellular T=main | dcsCellular.c DcsCellularConnEventStateHandler() 256 | State of connection 1 transitioned from up to down
Jul 11 16:39:30 swi-mdm9x28-wp user.info Legato:  INFO | dcsDaemon[1011]/dcsDaemon T=main | dcsServer.c ChannelEventHandler() 820 | Received for channel reference 0x28d event Down
Jul 11 16:39:30 swi-mdm9x28-wp user.info Legato:  INFO | dcsDaemon[1011]/dcsDaemon T=main | dcsServer.c UpdateTechnologyStatus() 1065 | Technology retry timer is already running; wait for next retry
Jul 11 08:39:30 swi-mdm9x28-wp user.info Legato:  INFO | httpGet[4720]/httpGetComponent T=main | httpGet.c ConnectionStateHandler() 116 | Interface  disconnected.
Jul 11 08:39:36 swi-mdm9x28-wp user.err Legato: =ERR= | httpGet[4720]/httpGetComponent T=main | httpGet.c TimeoutHandler() 55 | Couldn't establish connection after 30 seconds
Jul 11 16:39:36 swi-mdm9x28-wp user.info Legato:  INFO | dcsDaemon[1011]/dcsDaemon T=main | dcsServer.c CloseSessionEventHandler() 1371 | Client 0x7f5ac108 killed, remove allocated resources
Jul 11 16:39:36 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[886]/supervisor T=main | proc.c proc_SigChildHandler() 2079 | Process 'httpGet' (PID: 4720) has exited with exit code 1.
Jul 11 16:39:36 swi-mdm9x28-wp user.warn Legato: -WRN- | supervisor[886]/supervisor T=main | app.c app_SigChildHandler() 4067 | Process 'httpGet' in app 'httpGet' faulted: Ignored.
Jul 11 16:39:36 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[886]/supervisor T=main | app.c app_StopComplete() 4764 | app 'httpGet' has stopped.
Jul 11 16:39:36 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[886]/supervisor T=main | apps.c DeactivateAppContainer() 374 | Application 'httpGet' has stopped.

I used the 20.04 of Legato AF.

I remember it works on R9, you can give a try on that.

Besides, some user can run the httpget sample in legato 20.04.

I had test the R9 release. But it still not work.

Seems you need to modify the adef file, please see below:

I just tried on WP77 R12, no problem is found, maybe you can use my httpget sample attached.

http_get_WP77.rar (414.5 KB)

Please attach data connection by “cm data connect &” before running the app.


root@swi-mdm9x28-wp:~# cm info
Device: WP7702
IMEI: 352653090002775
IMEISV: 4
FSN: VU735370350701
Firmware Version: SWI9X06Y_02.32.02.00 c2e98c jenkins 2019/08/30 07:28:21
Bootloader Version: SWI9X06Y_02.32.02.00 c2e98c jenkins 2019/08/30 07:28:21
MCU Version: 002.013
PRI Part Number (PN): 9907365
PRI Revision: 001.001
Carrier PRI Name: GENERIC
Carrier PRI Revision: 001.055_000
SKU: 1103530
Last Reset Cause: Reset, User Requested
Resets Count: Expected: 66 Unexpected: 0
root@swi-mdm9x28-wp:~# legato version
19.07.0_6ebfa306dc802a91d515da9361145709_modified
root@swi-mdm9x28-wp:~# cm data
Index: 1
APN: hkcsl
PDP Type: IPV4
Connected: yes
Interface: rmnet_data0
Family[IPv4]: inet
IP[IPv4]: 10.178.215.57
Gateway[IPv4]: 10.178.215.58
Dns1[IPv4]: 10.144.148.1
Dns2[IPv4]: 10.145.148.5
root@swi-mdm9x28-wp:~# cm radio
Power: ON
Current Network Operator: CSL
Current RAT: GSM network (LE_MRC_RAT_GSM)
Status: Registered, home network (LE_MRC_REG_HOME)
Signal: Good signal strength (3)
PS: Packet Switched Registered, home network (LE_MRC_REG_HOME)

Jul 13 10:09:20 | httpGet[5811] | | HTTP Get!
Jul 13 10:09:20 | avcDaemon[1161]/avcDaemon T=main | avcAppUpdate.c avcApp_SetSwUpdateState() 3013 | No update is going on. CurrentObj9 = null
Jul 13 10:09:20 | avcDaemon[1161]/avcDaemon T=main | avcAppUpdate.c avcApp_SetSwUpdateResult() 2948 | No update is going on. CurrentObj9 = null
Jul 13 10:09:20 | avcDaemon[1161]/avcDaemon T=main | avcAppUpdate.c NotifyObj9List() 697 | Found 1 object 9 instances
Jul 13 10:09:20 | avcDaemon[1161]/avcDaemon T=main | avcAppUpdate.c NotifyObj9List() 698 | obj9ListLen; 12 obj9List: </lwm2m/9/0>
Jul 13 10:09:21 | avcDaemon[1161]/avcDaemon T=main | assetData.c RegUpdateTimerHandler() 3271 | RegUpdate timer expired; reporting REG_UPDATE
Jul 13 10:09:21 | avcDaemon[1161]/avcDaemon T=main | assetData.c assetData_RegistrationUpdate() 1951 | unsupported function called.
Jul 13 10:09:23 | httpGet[5811] | | Succesfully received data:
Jul 13 10:09:23 | httpGet[5811] | | { “args”: {}, “headers”: { “Accept”: “/”, “Host”: “httpbin.org”, “X-Amzn-Trace-Id”: “Root=1-5f0bc254-604d1aa7a0a77e3a37cf329b” }, “origin”: “14.0.154.223”, “url”: "https://ht


Hi, @jyijyi thanks for your reply
I tried on WP77 R12. Here is my system info and the log info


root@swi-mdm9x28-wp:~# cm data connect &
root@swi-mdm9x28-wp:~# Failed to get DNS addresses: LE_FAULT
Failed to get DNS addresses: LE_FAULT
Checking if device ‘rmnet_data0’ is up … ok
Routing inet … ok
Testing connection …
root@swi-mdm9x28-wp:~# cm info
Device: WP7702
IMEI: *************************
IMEISV: 4
FSN: **************
Firmware Version: SWI9X06Y_02.32.02.00 c2e98c jenkins 2019/08/30 07:28:21
Bootloader Version: SWI9X06Y_02.32.02.00 c2e98c jenkins 2019/08/30 07:28:21
MCU Version: 002.013
PRI Part Number (PN): 9907365
PRI Revision: 001.006
Carrier PRI Name: GENERIC
Carrier PRI Revision: 001.055_000
SKU: 1103530
Last Reset Cause: Reset, User Requested
Resets Count: Expected: 299 Unexpected: 1
root@swi-mdm9x28-wp:~# cm data
Index: 1
APN: nbiot
PDP Type: IPV4
Connected: yes
Failed to get DNS addresses: LE_FAULT
Interface: rmnet_data0
Family[IPv4]: inet
IP[IPv4]: 10.25.30.87
Gateway[IPv4]: 10.25.30.88
Dns1[IPv4]: N/A
Dns2[IPv4]: N/A
root@swi-mdm9x28-wp:~# cm radio
Power: ON
Current Network Operator: Far EasTone
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)
root@swi-mdm9x28-wp:~# legato version
19.07.0_6ebfa306dc802a91d515da9361145709_modified


root@swi-mdm9x28-wp:~# app status
[running] atAirVantage
[running] atQmiLinker
[running] atService
[running] audioService
[running] avcService
[running] cellNetService
[running] dataConnectionService
[running] fwupdateService
[running] gpioService
[running] modemService
[running] portService
[running] positioningService
[running] powerMgr
[running] qmiAirVantage
[running] secStore
[stopped] smsInboxService
[stopped] spiService
[running] tools
[stopped] voiceCallService
[stopped] wifi
[stopped] wifiApTest
[stopped] wifiClientTest
[running] wifiService
[stopped] wifiWebAp
[stopped] httpGet
[stopped] http_get_WP77
root@swi-mdm9x28-wp:~# app start http_get_WP77 && logread -f
Jul 13 08:19:06 swi-mdm9x28-wp user.warn Legato: -WRN- | UNKNOWN[3117]/framework T=main | fdMonitor.c le_fdMonitor_Create() 422 | FD Monitor object name ‘httpGet.httpGetComponent.le_data’ truncated to ‘httpGet.httpGetComponent.le_dat’.
Jul 13 16:19:06 swi-mdm9x28-wp user.info Legato: INFO | httpGet[3117] | HTTP Get!
Jul 13 16:19:06 swi-mdm9x28-wp user.notice kernel: [18949.036556] audit: type=1400 audit(1594628346.861:41): lsm=SMACK fn=smack_inode_getattr action=denied subject=“app.http_get_WP77” object=“admin” requested=r pid=3117 comm=“httpGet” path=“pipe:[106976]” dev=“pipefs” ino=10697
Jul 13 08:19:06 swi-mdm9x28-wp user.err Legato: =ERR= | httpGet[3117]/httpGetComponent T=main | httpGet.c GetUrl() 56 | curl_easy_perform() failed: Couldn’t resolve host name
Jul 13 16:19:06 swi-mdm9x28-wp user.notice kernel: [18949.049656] audit: type=1400 audit(1594628346.881:42): lsm=SMACK fn=smack_inode_getattr action=denied subject=“app.http_get_WP77” object=“admin” requested=r pid=3117 comm=“httpGet” path="/etc/resolv.conf" dev=“tmpfs” ino=929
Jul 13 16:19:06 swi-mdm9x28-wp user.notice kernel: [18949.049754] audit: type=1400 audit(1594628346.881:43): lsm=SMACK fn=smack_inode_permission action=denied subject=“app.http_get_WP77” object=“admin” requested=r pid=3117 comm=“httpGet” name=“resolv.conf” dev=“tmpfs” ino=92949
Jul 13 16:19:06 swi-mdm9x28-wp user.notice kernel: [18949.052228] audit: type=1400 audit(1594628346.881:44): lsm=SMACK fn=smack_socket_sock_rcv_skb action=denied subject=“app.http_get_WP77” object="" requested=w pid=3117 comm=“httpGet” saddr=127.0.0.1 src=43461 daddr=127.0.0.1
Jul 13 16:19:06 swi-mdm9x28-wp user.notice kernel: [18949.052746] audit: type=1400 audit(1594628346.881:45): lsm=SMACK fn=smack_socket_sock_rcv_skb action=denied subject=“app.http_get_WP77” object="
" requested=w pid=3117 comm=“httpGet” saddr=127.0.0.1 src=43461 daddr=127.0.0.1
Jul 13 16:19:06 swi-mdm9x28-wp user.notice kernel: [18949.053145] audit: type=1400 audit(1594628346.881:46): lsm=SMACK fn=smack_socket_sock_rcv_skb action=denied subject=“app.http_get_WP77” object="" requested=w pid=3117 comm=“httpGet” saddr=127.0.0.1 src=44419 daddr=127.0.0.1
Jul 13 16:19:06 swi-mdm9x28-wp user.notice kernel: [18949.053363] audit: type=1400 audit(1594628346.881:47): lsm=SMACK fn=smack_socket_sock_rcv_skb action=denied subject=“app.http_get_WP77” object="
" requested=w pid=3117 comm=“httpGet” saddr=127.0.0.1 src=44419 daddr=127.0.0.1


Here is my app package: http_get_WP77.tgz (188.3 KB)
Can you try on the NB-IOT network?

can you try my app in GSM network which already proven to be working ?

BTW, do you connect the network?
Jul 13 08:19:06 swi-mdm9x28-wp user.err Legato: =ERR= | httpGet[3117]/httpGetComponent T=main | httpGet.c GetUrl() 56 | curl_easy_perform() failed: Couldn’t resolve host name

If problem still exists on your side, you might give a try on legato 20.04 which is working fine other user.

The network can work


I will try to get another sim card which support GSM network to test

PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: seq=0 ttl=113 time=916.550 ms
64 bytes from 8.8.8.8: seq=1 ttl=113 time=929.380 ms
64 bytes from 8.8.8.8: seq=2 ttl=113 time=753.678 ms
64 bytes from 8.8.8.8: seq=3 ttl=113 time=711.956 ms

--- 8.8.8.8 ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max = 711.956/827.891/929.380 ms

If problem still exists on your side, you might give a try on legato 20.04

Hi, @jyijyi. After a month ago. I found this error since we reach the telecom usage. Thanks for your reply.

So you upgrade to legato 20.04?

No. I tried on wp77 R12 release.

If it does not work, you can upgrade to legato20.04