# HttpGet example via modem does not work

**URL:** <https://mangoh.discourse.group/t/httpget-example-via-modem-does-not-work/4275>\
**Category:** mangOH Yellow\
**Created:** [April 16, 2020, 3:19pm UTC](https://mangoh.discourse.group/t/httpget-example-via-modem-does-not-work/4275 "2020-04-16T15:19:28Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![michaelabid](https://avatars.discourse-cdn.com/v4/letter/m/5daacb/32.png) [@michaelabid](https://mangoh.discourse.group/u/michaelabid)\
**Post date:** [April 16, 2020, 3:19pm UTC](https://mangoh.discourse.group/t/httpget-example-via-modem-does-not-work/4275/1 "2020-04-16T15:19:28Z")

</div>

Hello,

we were not able to get a modem connection from within our (sandboxed) application. So we decided to build and install the well-known httpGet example app and see if we can get the modem connection to work. But even with httpGet we fail to access the /etc/resolv.conf file.

If we don’t call “cm data connect” before running the httpGet app, we get the following logs:

## Feb 9 02:51:48 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1127]/supervisor T=main | app.c app\_Start() 3469 | Starting app ‘httpGet’ Feb 9 02:51:48 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1127]/supervisor T=main | app.c CreateFileLink() 2083 | Skipping file link ‘/dev/log’ to ‘/legato/systems/current/appsWriteable/httpGet/dev/log’: Already exists Feb 9 02:51:48 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1127]/supervisor T=main | app.c CreateFileLink() 2083 | Skipping file link ‘/dev/null’ to ‘/legato/systems/current/appsWriteable/httpGet/dev/null’: Already exists Feb 9 02:51:48 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1127]/supervisor T=main | app.c CreateFileLink() 2083 | Skipping file link ‘/dev/zero’ to ‘/legato/systems/current/appsWriteable/httpGet/dev/zero’: Already exists Feb 9 02:51:48 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1127]/supervisor T=main | app.c CreateFileLink() 2083 | Skipping file link ‘/dev/urandom’ to ‘/legato/systems/current/appsWriteable/httpGet/dev/urandom’: Already exists Feb 9 02:51:48 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1127]/supervisor T=main | app.c CreateFileLink() 2083 | Skipping file link ‘/legato/systems/current/lib/liblegato.so’ to ‘/legato/systems/current/appsWriteable/httpGet/lib/liblegato.so’: Already exists Feb 9 02:51:48 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1127]/supervisor T=main | app.c CreateFileLink() 2083 | Skipping file link ‘/lib/ld-linux.so.3’ to ‘/legato/systems/current/appsWriteable/httpGet/lib/ld-linux.so.3’: Already exists Feb 9 02:51:48 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1127]/supervisor T=main | app.c CreateFileLink() 2083 | Skipping file link ‘/lib/libc.so.6’ to ‘/legato/systems/current/appsWriteable/httpGet/lib/libc.so.6’: Already exists Feb 9 02:51:48 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1127]/supervisor T=main | app.c CreateFileLink() 2083 | Skipping file link ‘/lib/libpthread.so.0’ to ‘/legato/systems/current/appsWriteable/httpGet/lib/libpthread.so.0’: Already exists Feb 9 02:51:48 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1127]/supervisor T=main | app.c CreateFileLink() 2083 | Skipping file link ‘/lib/librt.so.1’ to ‘/legato/systems/current/appsWriteable/httpGet/lib/librt.so.1’: Already exists Feb 9 02:51:48 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1127]/supervisor T=main | app.c CreateFileLink() 2083 | Skipping file link ‘/lib/libdl.so.2’ to ‘/legato/systems/current/appsWriteable/httpGet/lib/libdl.so.2’: Already exists Feb 9 02:51:48 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1127]/supervisor T=main | app.c CreateFileLink() 2083 | Skipping file link ‘/lib/libgcc\_s.so.1’ to ‘/legato/systems/current/appsWriteable/httpGet/lib/libgcc\_s.so.1’: Already exists Feb 9 02:51:48 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1127]/supervisor T=main | app.c CreateFileLink() 2083 | Skipping file link ‘/lib/libm.so.6’ to ‘/legato/systems/current/appsWriteable/httpGet/lib/libm.so.6’: Already exists Feb 9 02:51:48 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1127]/supervisor T=main | app.c CreateFileLink() 2083 | Skipping file link ‘/usr/lib/libstdc++.so.6’ to ‘/legato/systems/current/appsWriteable/httpGet/lib/libstdc++.so.6’: Already exists Feb 9 02:51:48 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1127]/supervisor T=main | app.c CreateFileLink() 2083 | Skipping file link ‘/legato/systems/current/apps/httpGet/read-only/lib/libgmp.so.10’ to ‘/legato/systems/current/appsWriteable/httpGet/lib/libgmp.so.10’ Feb 9 02:51:48 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1127]/supervisor T=main | app.c CreateFileLink() 2083 | Skipping file link ‘/legato/systems/current/apps/httpGet/read-only/lib/libssl.so.1.0.2’ to '/legato/systems/current/appsWriteable/httpGet/lib/libssl.so. Feb 9 02:51:48 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1127]/supervisor T=main | app.c CreateFileLink() 2083 | Skipping file link ‘/legato/systems/current/apps/httpGet/read-only/lib/libcrypto.so.1.0.2’ to '/legato/systems/current/appsWriteable/httpGet/lib/libcryp Feb 9 02:51:48 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1127]/supervisor T=main | app.c CreateFileLink() 2083 | Skipping file link ‘/legato/systems/current/apps/httpGet/read-only/lib/libcurl.so.4’ to ‘/legato/systems/current/appsWriteable/httpGet/lib/libcurl.so.4’ Feb 9 02:51:48 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1127]/supervisor T=main | app.c CreateFileLink() 2083 | Skipping file link ‘/legato/systems/current/apps/httpGet/read-only/lib/libz.so.1’ to ‘/legato/systems/current/appsWriteable/httpGet/lib/libz.so.1’: Alre Feb 9 02:51:48 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1127]/supervisor T=main | app.c CreateFileLink() 2083 | Skipping file link ‘/legato/systems/current/apps/httpGet/read-only/lib/libComponent\_httpGetComponent.so’ to '/legato/systems/current/appsWriteable/httpG Feb 9 02:51:48 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1127]/supervisor T=main | app.c CreateFileLink() 2083 | Skipping file link ‘/legato/systems/current/apps/httpGet/read-only/bin/httpGet’ to ‘/legato/systems/current/appsWriteable/httpGet/bin/httpGet’: Already Feb 9 02:51:48 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1127]/supervisor T=main | app.c CreateFileLink() 2083 | Skipping file link ‘/legato/systems/current/apps/httpGet/read-only/lib/libgmp.so.10’ to ‘/legato/systems/current/appsWriteable/httpGet/lib/libgmp.so.10’ Feb 9 02:51:48 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1127]/supervisor T=main | app.c CreateFileLink() 2083 | Skipping file link ‘/legato/systems/current/apps/httpGet/read-only/lib/libcurl.so.4’ to ‘/legato/systems/current/appsWriteable/httpGet/lib/libcurl.so.4’ Feb 9 02:51:48 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1127]/supervisor T=main | app.c CreateFileLink() 2083 | Skipping file link ‘/legato/systems/current/apps/httpGet/read-only/lib/libcrypto.so.1.0.2’ to '/legato/systems/current/appsWriteable/httpGet/lib/libcryp Feb 9 02:51:48 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1127]/supervisor T=main | app.c CreateFileLink() 2083 | Skipping file link ‘/legato/systems/current/apps/httpGet/read-only/lib/libssl.so.1.0.2’ to '/legato/systems/current/appsWriteable/httpGet/lib/libssl.so. Feb 9 02:51:48 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1127]/supervisor T=main | app.c CreateFileLink() 2083 | Skipping file link ‘/legato/systems/current/apps/httpGet/read-only/lib/libz.so.1’ to ‘/legato/systems/current/appsWriteable/httpGet/lib/libz.so.1’: Alre Feb 9 02:51:48 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1127]/supervisor T=main | app.c CreateFileLink() 2083 | Skipping file link ‘/bin/date’ to ‘/legato/systems/current/appsWriteable/httpGet/bin/date’: Already exists Feb 9 02:51:48 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1127]/supervisor T=main | app.c CreateFileLink() 2083 | Skipping file link ‘/bin/sh’ to ‘/legato/systems/current/appsWriteable/httpGet/bin/sh’: Already exists Feb 9 02:51:48 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1127]/supervisor T=main | app.c CreateFileLink() 2083 | Skipping file link ‘/etc/hosts’ to ‘/legato/systems/current/appsWriteable/httpGet/etc/hosts’: Already exists Feb 9 02:51:48 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1127]/supervisor T=main | app.c CreateFileLink() 2083 | Skipping file link ‘/etc/nsswitch.conf’ to ‘/legato/systems/current/appsWriteable/httpGet/etc/nsswitch.conf’: Already exists Feb 9 02:51:48 swi-mdm9x28-wp user.err Legato: =ERR= | supervisor[1127]/supervisor T=main | app.c CreateFileLink() 2041 | Could not stat file at ‘/etc/resolv.conf’. No such file or directory Feb 9 02:51:48 swi-mdm9x28-wp user.err Legato: =ERR= | supervisor[1127]/supervisor T=main | app.c CreateFileLink() 2158 | Failed to create link at ‘/etc/resolv.conf’ in app ‘httpGet’. Feb 9 02:51:48 swi-mdm9x28-wp user.err Legato: =ERR= | supervisor[1127]/supervisor T=main | app.c app\_Start() 3501 | Failed to set Smack rules or set up app area.

If we call “cm data connect” followed by “cm data disconnect” (which will create the /var/resolv.conf file) before starting httpGet, we get following logs:

Feb 9 02:56:55 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1127]/supervisor T=main | proc.c proc\_Start() 1403 | Starting process ‘httpGet’ with pid 2507  
Feb 9 02:56:55 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1127]/supervisor T=main | supervisor.c SigChildHandler() 899 | Reaping unconfigured child process 2503.  
Feb 9 02:56:55 swi-mdm9x28-wp user.info Legato: INFO | supervisor[2507]/supervisor T=main | proc.c proc\_Start() 1363 | Execing ‘httpGet’  
Feb 9 02:56:55 swi-mdm9x28-wp user.info Legato: INFO | supervisor[2507]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxCoreDumpFileBytes to value 102400.  
Feb 9 02:56:55 swi-mdm9x28-wp user.info Legato: INFO | supervisor[2507]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxFileBytes to value 102400.  
Feb 9 02:56:55 swi-mdm9x28-wp user.info Legato: INFO | supervisor[2507]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxLockedMemoryBytes to value 8192.  
Feb 9 02:56:55 swi-mdm9x28-wp user.info Legato: INFO | supervisor[2507]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxFileDescriptors to value 256.  
Feb 9 02:56:55 swi-mdm9x28-wp user.info Legato: INFO | supervisor[2507]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxMQueueBytes to value 512.  
Feb 9 02:56:55 swi-mdm9x28-wp user.info Legato: INFO | supervisor[2507]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxThreads to value 20.  
Feb 9 02:56:55 swi-mdm9x28-wp user.info Legato: INFO | supervisor[2507]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxQueuedSignals to value 100.  
Feb 9 02:56:55 swi-mdm9x28-wp user.warn Legato: -WRN- | _UNKNOWN_[2507]/framework T=main | fdMonitor.c le\_fdMonitor\_Create() 422 | FD Monitor object name ‘httpGet.httpGetComponent.le\_data’ truncated to ‘httpGet.httpGetComponent.le\_dat’.  
Feb 9 02:56:55 swi-mdm9x28-wp user.info Legato: INFO | httpGet[2507] | HTTP Get!  
Feb 9 02:56:55 swi-mdm9x28-wp user.notice kernel: [503.856894] audit: type=1400 audit(318913015.643:4): lsm=SMACK fn=smack\_inode\_getattr action=denied subject=“app.httpGet” object=“admin” requested=r pid=2507 comm=“httpGet” path=“pipe:[11013]” dev=“pipefs” ino=11013  
Feb 9 02:56:55 swi-mdm9x28-wp user.info Legato: INFO | httpGet[2507]/httpGetComponent T=main | httpGet.c _httpGetComponent\_COMPONENT\_INIT() 133 | Requesting connection…  
Feb 9 02:56:55 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[1258]/dcsDaemon T=main | dcsTechRank.c dcsTechRank\_SelectDataChannel() 215 | Selected channel name 1  
Feb 9 02:56:55 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[1258]/dcs T=main | dcs.c le\_dcs\_AddEventHandler() 600 | Adding channel handler for channel 1 of technology cellular  
Feb 9 02:56:55 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[1258]/dcs T=main | dcs.c le\_dcs\_AddEventHandler() 640 | Event handler with reference 0x9ef and event ID 0xa07 added  
Feb 9 02:56:55 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[1258]/dcs T=main | dcs.c le\_dcs\_Start() 386 | Starting channel 1 of technology cellular by app session with reference 0x7f5a7bd8  
Feb 9 02:56:55 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[1258]/dcs T=main | dcs.c le\_dcs\_Start() 443 | Initiating technology to start channel 1 for app session 0x7f5a7bd8, request reference 0x3c9  
Feb 9 02:56:55 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[1258]/dcsDaemon T=main | dcsServer.c TryStartTechSession() 1052 | Successfully initiated data channel 1 of technology 1  
Feb 9 02:56:55 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[1258]/dcs T=main | dcsTech.c le\_dcsTech\_Start() 314 | Request to start channel 1 of technology cellular  
Feb 9 02:56:56 swi-mdm9x28-wp user.notice kernel: [504.610413] audit: type=1400 audit(318913016.403:5): lsm=SMACK fn=smack\_inode\_getattr action=denied subject="_" object=“app.tools” requested=r pid=1446 comm=“dnsmasq” path="/var/resolv.conf" dev=“tmpfs” ino=10543  
Feb 9 02:56:57 swi-mdm9x28-wp user.err Legato: =ERR= | modemDaemon[1307]/swiQmi T=main | swiQmi.c swiQmi\_CheckResponse() 795 | Sending QMI\_WDS\_START\_NETWORK\_INTERFACE\_REQ\_V01 failed: rc=0 (), resp.result=1.[0x01], resp.error=14.[0x0e]  
Feb 9 02:56:57 swi-mdm9x28-wp user.err Legato: =ERR= | modemDaemon[1307]/le\_pa T=main | pa\_mdc\_qmi.c StartSession() 1978 | Data connection failure Call End provided 45, Code 1  
Feb 9 02:56:57 swi-mdm9x28-wp user.err Legato: =ERR= | modemDaemon[1307]/le\_pa T=main | pa\_mdc\_qmi.c StartSession() 1989 | Data connection failure Verbose Call End provided Type 6, Verbose 50  
Feb 9 02:56:57 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[1258]/dcsCellular T=main | dcsCellular.c le\_dcsCellular\_Start() 1071 | Succeeded starting cellular connection 1  
Feb 9 02:56:57 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[1258]/dcsCellular T=main | dcsCellular.c DcsCellularConnEventStateHandler() 254 | State of connection 1 transitioned from down to up  
Feb 9 02:56:57 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[1258]/dcsDaemon T=main | dcsServer.c ChannelEventHandler() 660 | Received for channel reference 0xd9 event Up  
Feb 9 02:56:57 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[1258]/dcsDaemon T=main | dcsServer.c SetDefaultGWConfiguration() 407 | Setting default GW address on device  
Feb 9 02:56:57 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[1258]/dcsNet T=main | dcsNet.c le\_net\_BackupDefaultGW() 336 | No default GW currently set or retrievable  
Feb 9 02:56:57 swi-mdm9x28-wp user.warn Legato: -WRN- | dcsDaemon[1258]/le\_pa\_dcs T=main | pa\_dcs\_linux.c pa\_dcs\_SetDefaultGateway() 918 | Unable to delete default gateway  
Feb 9 02:56:57 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[1258]/dcsNet T=main | dcsNet.c le\_net\_SetDefaultGW() 497 | Succeeded to set default GW addr on interface rmnet\_data0 for channel 1 of technology cellular  
Feb 9 02:56:57 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[1258]/dcsDaemon T=main | dcsServer.c SetDnsConfiguration() 565 | Setting DNS server addresses on device  
Feb 9 02:56:57 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[1258]/le\_pa\_dcs T=main | pa\_dcs\_linux.c AddNameserversToResolvConf() 298 | Set DNS ‘10.105.16.254’ ‘10.105.144.254’  
Feb 9 02:56:57 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[1258]/le\_pa\_dcs T=main | pa\_dcs\_linux.c AddNameserversToResolvConf() 323 | DNS 1 ‘10.105.16.254’ found in file  
Feb 9 02:56:57 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[1258]/le\_pa\_dcs T=main | pa\_dcs\_linux.c AddNameserversToResolvConf() 328 | DNS 2 ‘10.105.144.254’ found in file  
Feb 9 02:56:57 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[1258]/dcsNet T=main | dcsNet.c le\_net\_SetDNS() 766 | DNS addresses of channel 1 of technology cellular already set in  
Feb 9 02:56:57 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[1258]/dcsDaemon T=main | dcsServer.c SetDefaultRouteAndDns() 639 | Succeeded setting DNS configuration  
Feb 9 02:56:57 swi-mdm9x28-wp user.info Legato: INFO | httpGet[2507]/httpGetComponent T=main | httpGet.c ConnectionStateHandler() 110 | Interface rmnet\_data0 connected.  
Feb 9 02:56:57 swi-mdm9x28-wp user.notice kernel: [505.769437] audit: type=1400 audit(318913017.553:6): lsm=SMACK fn=smack\_inode\_getattr action=denied subject=“app.httpGet” object=“app.tools” requested=r pid=2507 comm=“httpGet” path="/etc/resolv.conf" dev=“tmpfs” ino=10543  
Feb 9 02:56:57 swi-mdm9x28-wp user.notice kernel: [505.772984] audit: type=1400 audit(318913017.563:7): lsm=SMACK fn=smack\_socket\_sock\_rcv\_skb action=denied subject=“app.httpGet” object="_" requested=w pid=2507 comm=“httpGet” saddr=127.0.0.1 src=39833 daddr=127.0.0.1 dest=53  
Feb 9 02:56:57 swi-mdm9x28-wp user.notice kernel: [505.773668] audit: type=1400 audit(318913017.563:8): lsm=SMACK fn=smack\_socket\_sock\_rcv\_skb action=denied subject=“app.httpGet” object="_" requested=w pid=2507 comm=“httpGet” saddr=127.0.0.1 src=39833 daddr=127.0.0.1 dest=53  
Feb 9 02:56:57 swi-mdm9x28-wp user.notice kernel: [505.774279] audit: type=1400 audit(318913017.563:9): lsm=SMACK fn=smack\_socket\_sock\_rcv\_skb action=denied subject=“app.httpGet” object="_" requested=w pid=2507 comm=“httpGet” saddr=127.0.0.1 src=49778 daddr=127.0.0.1 dest=53  
Feb 9 02:56:57 swi-mdm9x28-wp user.notice kernel: [505.774909] audit: type=1400 audit(318913017.563:10): lsm=SMACK fn=smack\_socket\_sock\_rcv\_skb action=denied subject=“app.httpGet” object="_" requested=w pid=2507 comm=“httpGet” saddr=127.0.0.1 src=49778 daddr=127.0.0.1 dest=5  
Feb 9 02:56:57 swi-mdm9x28-wp user.err Legato: =ERR= | httpGet[2507]/httpGetComponent T=main | httpGet.c GetUrl() 77 | curl\_easy\_perform() failed: Couldn’t resolve host name  
Feb 9 02:56:57 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[1258]/dcs T=main | dcs.c le\_dcs\_Stop() 503 | Stopping channel 1 of technology cellular  
Feb 9 02:56:57 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[1258]/dcs T=main | dcs.c le\_dcs\_Stop() 528 | Channel 1 requested to be stopped  
Feb 9 02:56:57 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[1258]/dcsDaemon T=main | dcsServer.c TryStopTechSession() 1082 | Successfully initiated stopping active data connection 1 of technology 1  
Feb 9 02:56:57 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[1258]/dcs T=main | dcsTech.c le\_dcsTech\_Stop() 371 | Request to stop channel 1 of technology cellular  
Feb 9 02:56:58 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[1258]/dcsCellular T=main | dcsCellular.c le\_dcsCellular\_Stop() 1152 | Succeeded stopping cellular connection 1  
Feb 9 02:56:58 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[1258]/dcsCellular T=main | dcsCellular.c DcsCellularConnEventStateHandler() 254 | State of connection 1 transitioned from up to down  
Feb 9 02:56:58 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[1258]/dcsDaemon T=main | dcsServer.c ChannelEventHandler() 660 | Received for channel reference 0xd9 event Down  
Feb 9 02:56:58 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[1258]/dcsDaemon T=main | dcsServer.c UpdateTechnologyStatus() 961 | No need to retry connecting with RequestCount 0  
Feb 9 02:56:58 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[1258]/dcs T=main | dcs.c le\_dcs\_RemoveEventHandler() 660 | Channel event handler for channel 1 of technology cellular removed  
Feb 9 02:56:58 swi-mdm9x28-wp user.info Legato: INFO | httpGet[2507]/httpGetComponent T=main | httpGet.c ConnectionStateHandler() 116 | Interface disconnected.

* * *

Finally we tried to directly use an IP in the httpGet source instead of using a host name, and were able to successfully download the data! So this probably means that the whole issue we are having is related to the access to /etc/resolv.conf

The following snippet is part of our adef file (taken from the httpGet example):  
requires:  
{  
file:  
{  
// needed for curl itself:  
/etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/  
/usr/bin/curl /usr/bin/curl

```
    // needed for networking:
    /lib/libnss_compat.so.2 /lib/
    /lib/libnss_files.so.2 /lib/
    /lib/libnss_dns.so.2 /lib/
    /lib/libresolv.so.2 /lib/
    /etc/nsswitch.conf /etc/
    /etc/hosts /etc/
    /etc/resolv.conf /etc/

    /bin/sh /bin/sh
    /bin/date /bin/date
}

device:
{
    [rw] /dev/null /dev/null
    [r] /dev/urandom /dev/urandom
    [r] /dev/random /dev/random
}

```

}

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/jyijyi/32/997_2.png) [@jyijyi](https://mangoh.discourse.group/u/jyijyi)\
**Post date:** [April 17, 2020, 7:46am UTC](https://mangoh.discourse.group/t/httpget-example-via-modem-does-not-work/4275/2 "2020-04-17T07:46:06Z")

</div>

how about changing the permission of /etc/resolv.conf ?

---

<div class="post-metadata">

**Author:** ![michaelabid](https://avatars.discourse-cdn.com/v4/letter/m/5daacb/32.png) [@michaelabid](https://mangoh.discourse.group/u/michaelabid)\
**Post date:** [April 17, 2020, 8:00am UTC](https://mangoh.discourse.group/t/httpget-example-via-modem-does-not-work/4275/3 "2020-04-17T08:00:26Z")

</div>

We tried that, it didn’t work properly. Anyway it sounds more like a temporary hack, than a proper solution

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/jyijyi/32/997_2.png) [@jyijyi](https://mangoh.discourse.group/u/jyijyi)\
**Post date:** [April 17, 2020, 8:14am UTC](https://mangoh.discourse.group/t/httpget-example-via-modem-does-not-work/4275/4 "2020-04-17T08:14:09Z")

</div>

what do you mean “does not work properly”? same behavior?

You can try the latest leaf package “swi-wp76\_4.7.0” with legato version 20.04, I think it is fixed.

---

<div class="post-metadata">

**Author:** ![michaelabid](https://avatars.discourse-cdn.com/v4/letter/m/5daacb/32.png) [@michaelabid](https://mangoh.discourse.group/u/michaelabid)\
**Post date:** [April 17, 2020, 10:13pm UTC](https://mangoh.discourse.group/t/httpget-example-via-modem-does-not-work/4275/5 "2020-04-17T22:13:24Z")

</div>

I don’t have the logs right now for the case when we changed the permission of /etc/resolv.conf. It was leading to some strange behavior, so it wasn’t helping. I could reproduce the issue and post the logs, if you think it would be useful.

> Blockquote  
> You can try the latest leaf package “swi-wp76\_4.7.0” with legato version 20.04, I think it is fixed.  
> Blockquote

Does this mean it is a known issue?

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/jyijyi/32/997_2.png) [@jyijyi](https://mangoh.discourse.group/u/jyijyi)\
**Post date:** [April 18, 2020, 3:57am UTC](https://mangoh.discourse.group/t/httpget-example-via-modem-does-not-work/4275/6 "2020-04-18T03:57:47Z")

</div>

I already asked before, so probably known issue

> **[Sample application Httpget cannot be run on WP76 R13](https://forum.legato.io/t/sample-application-httpget-cannot-be-run-on-wp76-r13/4787)**
>
> It says DNS cannot resolve host name: Oct 29 02:00:56 | httpGet\[9967\]/httpGetComponent T=main | httpGet.c GetUrl() 78 | curl\_easy\_perform() failed: Couldn’t resolve host name Any idea on this? I remember this sample works on R9.

---

<div class="post-metadata">

**Author:** ![michaelabid](https://avatars.discourse-cdn.com/v4/letter/m/5daacb/32.png) [@michaelabid](https://mangoh.discourse.group/u/michaelabid)\
**Post date:** [May 12, 2020, 6:39pm UTC](https://mangoh.discourse.group/t/httpget-example-via-modem-does-not-work/4275/8 "2020-05-12T18:39:22Z")

</div>

thanks for the hint! We kind of solved the issue by using a hardcoded resolv.conf which we provide together with the app. But this should not be the solution…
