Problem to call data_connection services

Hi all, I have used the sample program for data connection
https://docs.legato.io/18_03/c_dataConnectionServiceSample.html

I am not able to start data_connection services ,its automatically get stops.
Here are the error log:
97]/swiQmi T=main | swiQmi.c swiQmi_CheckResponse() 796 | Sending QMI_WDS_START_NETWORK_INTERFACE_REQ_V01 failed: rc=0 (), resp.result=1.[0x01], resp.error=14.[0x0e]
May 13 10:09:23 | modemDaemon[897]/le_pa T=main | pa_mdc_qmi.c StartSession() 1903 | Data connection failure Call End provided 45, Code 1
May 13 10:09:23 | modemDaemon[897]/le_pa T=main | pa_mdc_qmi.c StartSession() 1914 | Data connection failure Verbose Call End provided Type 2, Verbose 210
May 13 10:09:23 | modemDaemon[897]/le_pa T=main | pa_mrc_qmi.c pa_mrc_GetNetworkRegState() 2138 | called
May 13 10:09:23 | modemDaemon[897]/le_pa T=main | pa_sim_qmi.c MapSimState() 879 | More than one application 2
May 13 10:09:26 | dcsDaemon[877]/le_pa_dcs T=main | pa_dcs_linux.c AddNameserversToResolvConf() 310 | Set DNS ‘8.8.8.8’ ‘4.2.2.2’
May 13 10:09:26 | dcsDaemon[877]/dcsDaemon T=main | dcsServer.c SetDefaultRouteAndDns() 1318 | DNS configuration is set successfully
May 13 10:09:37 | supervisor[807]/supervisor T=main | supervisor.c HandleRebootExpiry() 525 | Expired reboot timer
May 13 10:10:07 | modemDaemon[897]/swiQmi T=main | swiQmi.c swiQmi_CheckResponse() 796 | Sending QMI_WDS_START_NETWORK_INTERFACE_REQ_V01 failed: rc=0 (), resp.result=1.[0x01], resp.error=14.[0x0e]
May 13 10:10:07 | modemDaemon[897]/le_pa T=main | pa_mdc_qmi.c StartSession() 1903 | Data connection failure Call End provided 8, Code 1015
May 13 10:10:07 | modemDaemon[897]/le_pa T=main | pa_mdc_qmi.c StartSession() 1914 | Data connection failure Verbose Call End provided Type 6, Verbose 30
May 13 10:10:09 | modemDaemon[897]/swiQmi T=main | swiQmi.c swiQmi_CheckResponse() 796 | Sending QMI_WDS_START_NETWORK_INTERFACE_REQ_V01 failed: rc=0 (), resp.result=1.[0x01], resp.error=14.[0x0e]
May 13 10:10:09 | modemDaemon[897]/le_pa T=main | pa_mdc_qmi.c StartSession() 1903 | Data connection failure Call End provided 0, Code 3
May 13 10:10:09 | modemDaemon[897]/le_pa T=main | pa_mdc_qmi.c StartSession() 1914 | Data connection failure Verbose Call End provided Type 3, Verbose 2001
May 13 10:10:09 | modemDaemon[897]/modemDaemon T=main | le_mdc.c le_mdc_StartSession() 1005 | Get Connection failure 0, 3, 3, 2001
May 13 10:10:09 | data_connection[944]/data_connectionComponent T=main | data_connectionComponent.c DcsStateHandler() 152 | ''TESSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS CONNECTEDDDDDDDDDDDDDDDDDDDDD
May 13 10:10:09 | data_connection[944]/data_connectionComponent T=main | data_connectionComponent.c DcsStateHandler() 157 | ‘’ disconnected!
May 13 10:10:09 | dcsDaemon[877]/le_pa_dcs T=main | pa_dcs_linux.c pa_dcs_SetDefaultGateway() 568 | Default gateway or interface is empty
May 13 10:10:09 | modemDaemon[897]/le_pa T=main | pa_sim_qmi.c MapSimState() 879 | More than one application 2
May 13 10:10:17 | modemDaemon[897]/swiQmi T=main | swiQmi.c swiQmi_CheckResponse() 796 | Sending QMI_WDS_START_NETWORK_INTERFACE_REQ_V01 failed: rc=0 (), resp.result=1.[0x01], resp.error=14.[0x0e]
May 13 10:10:17 | modemDaemon[897]/le_pa T=main | pa_mdc_qmi.c StartSession() 1903 | Data connection failure Call End provided 45, Code 1
May 13 10:10:17 | modemDaemon[897]/le_pa T=main | pa_mdc_qmi.c StartSession() 1914 | Data connection failure Verbose Call End provided Type 2, Verbose 210
May 13 10:10:17 | modemDaemon[897]/le_pa T=main | pa_mrc_qmi.c pa_mrc_GetNetworkRegState() 2138 | called
May 13 10:10:17 | modemDaemon[897]/le_pa T=main | pa_sim_qmi.c MapSimState() 879 | More than one application 2
May 13 10:10:20 | dcsDaemon[877]/le_pa_dcs T=main | pa_dcs_linux.c AddNameserversToResolvConf() 310 | Set DNS ‘8.8.8.8’ ‘4.2.2.2’
May 13 10:10:20 | dcsDaemon[877]/dcsDaemon T=main | dcsServer.c SetDefaultRouteAndDns() 1318 | DNS configuration is set successfully
May 13 10:10:50 | modemDaemon[897]/swiQmi T=main | swiQmi.c swiQmi_CheckResponse() 796 | Sending QMI_WDS_START_NETWORK_INTERFACE_REQ_V01 failed: rc=0 (), resp.result=1.[0x01], resp.error=14.[0x0e]
May 13 10:10:50 | modemDaemon[897]/le_pa T=main | pa_mdc_qmi.c StartSession() 1903 | Data connection failure Call End provided 45, Code 1
May 13 10:10:50 | modemDaemon[897]/le_pa T=main | pa_mdc_qmi.c StartSession() 1914 | Data connection failure Verbose Call End provided Type 2, Verbose 210

How about using cm tool?

Hi,
I have tried that , Not able to ping
Here is the command line logs:
root@swi-mdm9x28:~# cm data connect
Setting up profile 1
Setting access point name … ok
Setting packet data protocol … ok
Setting Authentication … ok
Connecting … ok
Checking if device is up … ok
Routing … ok
Updating /etc/resolv.conf … ok
Updating /etc/resolv.conf … ok
Testing connection … ok
root@swi-mdm9x28:~# ping google.com
ping: bad address ‘google.com
root@swi-mdm9x28:~# ping mangoh.io
ping: bad address ‘mangoh.io
root@swi-mdm9x28:~# cm data connect -1
Disconnecting … failed
Tue May 14 12:14:48 UTC 2019 - Stop Failure: LE_BAD_PARAMETER

Also on legato studio these are the logs:
May 14 12:13:36 | modemDaemon[669]/swiQmi T=main | swiQmi.c swiQmi_CheckResponse() 813 | Sending QMI_WDS_START_NETWORK_INTERFACE_REQ_V01 failed: rc=0 (), resp.result=1.[0x01], resp.error=14.[0x0e]
May 14 12:13:36 | modemDaemon[669]/le_pa T=main | pa_mdc_qmi.c StartSession() 1903 | Data connection failure Call End provided 45, Code 1
May 14 12:13:36 | modemDaemon[669]/le_pa T=main | pa_mdc_qmi.c StartSession() 1914 | Data connection failure Verbose Call End provided Type 2, Verbose 210
May 14 12:13:36 | modemDaemon[669]/modemDaemon T=main | le_sms.c CloseSessionEventHandler() 2310 | SessionRef (0x7f61a56c) has been closed
May 14 12:13:36 | modemDaemon[669]/modemDaemon T=main | le_sms.c CloseSessionEventHandler() 2310 | SessionRef (0x7f61a114) has been closed
May 14 12:13:52 | modemDaemon[669]/le_pa T=main | pa_mrc_qmi.c pa_mrc_GetNetworkRegState() 1945 | called
May 14 12:13:52 | modemDaemon[669]/le_pa T=main | pa_sim_qmi.c MapSimState() 857 | More than one application 2
May 14 12:14:48 | modemDaemon[669]/modemDaemon T=main | le_sms.c CloseSessionEventHandler() 2310 | SessionRef (0x7f61a56c) has been closed
May 14 12:14:48 | modemDaemon[669]/swiQmi T=main | swiQmi.c swiQmi_CheckResponse() 813 | Sending QMI_WDS_GET_PKT_STATISTICS_REQ_V01 failed: rc=0 (), resp.result=1.[0x01], resp.error=70.[0x46]
May 14 12:14:48 | modemDaemon[669]/le_pa T=main | pa_mdc_qmi.c pa_mdc_StopSession() 3203 | Bad input parameter
May 14 12:14:48 | modemDaemon[669]/modemDaemon T=main | le_sms.c CloseSessionEventHandler() 2310 | SessionRef (0x7f61a114) has been closed

Legato version:18.01.0_607d14ac5f0edd90fada704659a46736_modified

How about ping 8.8.8.8 ?

Not ressolved

root@swi-mdm9x28-wp:~# cm data connect
Setting up profile 1
Connecting … ok
Checking if device ‘rmnet_data0’ is up … ok
Routing inet … ok
mv: can’t remove ‘/etc/resolv.conf’: Device or resource busy
Testing connection … ok
root@swi-mdm9x28-wp:~# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: seq=0 ttl=123 time=367.776 ms
ping: sendto: Network is unreachable
root@swi-mdm9x28-wp:~#

There is chance that your sim card is not working.

In cm data command it shows it connected.
root@swi-mdm9x28-wp:~# cm data
Index: 1
APN: internet
PDP Type: IPV4V6
Connected: yes
Interface: rmnet_data0
Family[IPv4]: inet
IP[IPv4]: 100.71.152.165
Gateway[IPv4]: 100.71.152.166
Dns1[IPv4]: 8.8.8.8
Dns2[IPv4]: 4.2.2.2
root@swi-mdm9x28-wp:~# ping google.com
ping: bad address ‘google.com

can you try other sim card and operator?

Hi jyijyi,
Its working for me.

Thanks :slight_smile: