dscDaemon SetDnsConfiguration twice makes app crash

My app is crashing after the second time SetDnsConfiguration() is called, it is not always in the same thread, why does it set it twice ?
Feb 22 10:38:00 fx30s user.info Legato: INFO | dcsDaemon[15371]/dcsDaemon T=main | dcsServer.c SetDnsConfiguration() 584 | Setting DNS server addresses on device
Feb 22 10:38:00 fx30s user.warn Legato: -WRN- | dcsDaemon[15371]/dcsNet T=main | dcsNet.c DcsNetInitDnsBackup() 1111 | Client app with session reference 0x7f5aa898 already set DNS once

root@fx30s:~# legato version
19.11.5_72a625aea107a61d15bf615ccf657202
root@fx30s:~# cm info
Device: FX30S(WP7702)
IMEI: 354723090332155
IMEISV: 6
FSN: VU145400171210
Firmware Version: SWI9X06Y_02.36.06.00 63d944 jenkins 2020/12/10 19:12:28
Bootloader Version: SWI9X06Y_02.36.06.00 63d944 jenkins 2020/12/10 19:12:28
MCU Version: 002.015
PRI Part Number (PN): 9907957
PRI Revision: 001.000
Carrier PRI Name: ATT
Carrier PRI Revision: 001.067_001
SKU: 1103882
Last Reset Cause: Reset, User Requested
Resets Count: Expected: 158 Unexpected: 1

Device logs

Feb 22 10:37:48 fx30s user.info Legato: INFO | MCExe[15595]/mc T=main | mainComponent.cpp _mc_COMPONENT_INIT() 1135 | COMPONENT_INIT mainComponent
Feb 22 10:37:48 fx30s user.info Legato: INFO | posDaemon[15428]/le_pa_gnss T=main | pa_gnss_qmi.c pa_gnss_Start() 3584 | EngineState ON
Feb 22 10:37:48 fx30s user.info Legato: INFO | MCExe[15595]/mc T=UART2 | uart2.cpp OpenPort() 433 | Opening serial port /dev/ttyHS0
Feb 22 10:37:48 fx30s user.warn kernel: [ 5462.303285] irq 50, desc: ce99bd80, depth: 0, count: 0, unhandled: 0
Feb 22 10:37:48 fx30s user.warn kernel: [ 5462.303308] ->handle_irq(): c0232e34, msm_gpio_irq_handler+0x0/0x150
Feb 22 10:37:48 fx30s user.warn kernel: [ 5462.303335] ->irq_data.chip(): c0e18ba8, gic_chip+0x0/0x74
Feb 22 10:37:48 fx30s user.warn kernel: [ 5462.303358] ->action(): (null)
Feb 22 10:37:48 fx30s user.warn kernel: [ 5462.303369] IRQ_NOPROBE set
Feb 22 10:37:48 fx30s user.warn kernel: [ 5462.303380] IRQ_NOREQUEST set
Feb 22 10:37:48 fx30s user.warn kernel: [ 5462.303390] IRQ_NOTHREAD set
Feb 22 10:37:48 fx30s user.warn kernel: [ 5462.303513] msm_hs_get_mctrl_locked: UART 1 is NOT Linux APP
Feb 22 10:37:48 fx30s user.err Legato: =ERR= | MCExe[15595]/mc T=main | mainComponent.cpp mainComponent() 244 | first technology 1.
Feb 22 10:37:48 fx30s user.info Legato: INFO | MCExe[15595]/mc T=UBLOX | ublox.cpp OpenPort() 471 | Opening serial port /dev/ttyHS1
Feb 22 10:37:48 fx30s user.info Legato: INFO | dcsDaemon[15371]/dcsDaemon T=main | dcsTechRank.c dcsTechRank_SelectDataChannel() 220 | Selected channel name 1
Feb 22 10:37:48 fx30s user.info Legato: INFO | dcsDaemon[15371]/dcs T=main | dcs.c le_dcs_AddEventHandler() 635 | Adding channel handler for channel 1 of technology cellular
Feb 22 10:37:48 fx30s user.info Legato: INFO | dcsDaemon[15371]/dcs T=main | dcs.c le_dcs_AddEventHandler() 675 | Event handler with reference 0xc45 and event ID 0xa9b added
Feb 22 10:37:48 fx30s user.info Legato: INFO | dcsDaemon[15371]/dcs T=main | dcs.c le_dcs_Start() 421 | Starting channel 1 of technology cellular by app session with reference 0x7f5aa898
Feb 22 10:37:48 fx30s user.info Legato: INFO | dcsDaemon[15371]/dcs T=main | dcs.c le_dcs_Start() 478 | Initiating technology to start channel 1 for app session 0x7f5aa898, request reference 0x32d
Feb 22 10:37:48 fx30s user.info Legato: INFO | dcsDaemon[15371]/dcsDaemon T=main | dcsServer.c TryStartTechSession() 1105 | Successfully initiated data channel 1 of technology 1
Feb 22 10:37:48 fx30s user.info Legato: INFO | dcsDaemon[15371]/dcs T=main | dcsTech.c le_dcsTech_Start() 338 | Request to start channel 1 of technology cellular
Feb 22 10:37:49 fx30s user.info Legato: INFO | modemDaemon[15409]/swiQmi T=main | swiQmi.c swiQmi_InitQmiService() 600 | qmi_client_get_service_list num_entries 1 num_services=1
Feb 22 10:37:49 fx30s user.err Legato: =ERR= | modemDaemon[15409]/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]
Feb 22 10:37:49 fx30s user.err Legato: =ERR= | modemDaemon[15409]/le_pa T=main | pa_mdc_qmi.c StartSession() 1978 | Data connection failure Call End provided 0, Code 3
Feb 22 10:37:49 fx30s user.err Legato: =ERR= | modemDaemon[15409]/le_pa T=main | pa_mdc_qmi.c StartSession() 1989 | Data connection failure Verbose Call End provided Type 2, Verbose 210
Feb 22 10:37:49 fx30s user.err Legato: =ERR= | modemDaemon[15409]/modemDaemon T=main | le_mdc.c le_mdc_StartSession() 1242 | Get IPv4v6 Async Connection failureV4 45, 1, 0, 0
Feb 22 10:37:49 fx30s user.err Legato: =ERR= | modemDaemon[15409]/modemDaemon T=main | le_mdc.c le_mdc_StartSession() 1255 | Get IPv4v6 Async Connection failureV6 0, 3, 2, 210
Feb 22 10:37:49 fx30s user.err Legato: =ERR= | dcsDaemon[15371]/dcsCellular T=main | dcsCellular.c le_dcsCellular_Start() 1089 | Failed to start cellular connection 1; error: -6
Feb 22 10:37:49 fx30s user.info Legato: INFO | modemDaemon[15409]/modemDaemon T=main | le_mrc.c SignalStrengthIndHandlerFunc() 879 | Signal Strength Ind Handler called with RAT.4 and ss.-85
Feb 22 10:37:49 fx30s user.err Legato: =ERR= | dcsDaemon[15371]/dcsCellular T=main | dcsCellular.c le_dcsCellular_Start() 1092 | Failure reason 0, code 3
Feb 22 10:37:49 fx30s user.info Legato: INFO | dcsDaemon[15371]/dcsCellular T=main | dcsCellular.c le_dcsCellular_RetryConn() 1300 | Initiated retrying connection 1; retry attempt 0, backoff 1 secs
Feb 22 10:37:49 fx30s user.info Legato: INFO | dcsDaemon[15371]/dcsCellular T=main | dcsCellular.c le_dcsCellular_Start() 1097 | Wait for the next retry before failing connection 1
Feb 22 10:37:49 fx30s user.warn Legato: -WRN- | modemDaemon[15409]/le_pa T=main | pa_sim_qmi.c MapSimState() 952 | More than one application 2
Feb 22 10:37:49 fx30s user.warn Legato: -WRN- | modemDaemon[15409]/le_pa T=main | pa_sim_qmi.c MapSimState() 952 | More than one application 2
Feb 22 10:37:49 fx30s user.info Legato: INFO | dcsDaemon[15371]/dcsCellular T=main | dcsCellular.c DcsCellularConnEventStateHandler() 254 | State of connection 1 transitioned from down to down
Feb 22 10:37:49 fx30s user.info Legato: INFO | dcsDaemon[15371]/dcsCellular T=main | dcsCellular.c DcsCellularPacketSwitchHandler() 726 | Packet switch state: previous 1, new 0
Feb 22 10:37:49 fx30s user.info Legato: INFO | dcsDaemon[15371]/dcs T=main | dcs_db.c le_dcs_EventNotifierTechStateTransition() 311 | Notify all channels of technology 2 of system state transition to down
Feb 22 10:37:49 fx30s user.info Legato: INFO | dcsDaemon[15371]/dcsDaemon T=main | dcsServer.c ChannelEventHandler() 780 | Received for channel reference 0x2b event Temporary Down
Feb 22 10:37:49 fx30s user.info Legato: INFO | MCExe[15595]/mc T=main | mainComponent.cpp ConnectionStateHandler() 437 | ConnectionStateHandler: intfName= isConnected=0 contextPtr=2136627384
Feb 22 10:37:50 fx30s user.info Legato: INFO | dcsDaemon[15371]/dcsCellular T=main | dcsCellular.c DcsCellularPacketSwitchHandler() 726 | Packet switch state: previous 0, new 1
Feb 22 10:37:50 fx30s user.info Legato: INFO | dcsDaemon[15371]/dcs T=main | dcs_db.c le_dcs_EventNotifierTechStateTransition() 311 | Notify all channels of technology 2 of system state transition to up
Feb 22 10:37:50 fx30s user.info Legato: INFO | dcsDaemon[15371]/dcsDaemon T=main | dcsServer.c ChannelEventHandler() 780 | Received for channel reference 0x2b event Up
Feb 22 10:37:50 fx30s user.info Legato: INFO | dcsDaemon[15371]/dcsDaemon T=main | dcsServer.c SetDefaultGWConfiguration() 426 | Setting default GW address on device
Feb 22 10:37:50 fx30s user.warn Legato: -WRN- | modemDaemon[15409]/le_pa T=main | pa_sim_qmi.c MapSimState() 952 | More than one application 2
Feb 22 10:37:50 fx30s user.err Legato: =ERR= | dcsDaemon[15371]/dcs T=main | dcsTech.c le_dcsTech_GetNetInterface() 305 | Failed to get network interface of channel 1 of technology cellular
Feb 22 10:37:50 fx30s user.err Legato: =ERR= | dcsDaemon[15371]/dcsNet T=main | dcsNet.c le_net_SetDefaultGW() 744 | Failed to get network interface for channel 1 of technology cellular to set default GW
Feb 22 10:37:50 fx30s user.err Legato: =ERR= | dcsDaemon[15371]/dcsDaemon T=main | dcsServer.c SetDefaultGWConfiguration() 431 | Failed to set default GW address
Feb 22 10:37:50 fx30s user.info Legato: INFO | dcsDaemon[15371]/dcsDaemon T=main | dcsServer.c SetDnsConfiguration() 584 | Setting DNS server addresses on device
Feb 22 10:37:50 fx30s user.warn Legato: -WRN- | modemDaemon[15409]/modemDaemon T=main | le_mdc.c le_mdc_IsIPv6() 1982 | Could not get the Session Type
Feb 22 10:37:50 fx30s user.warn Legato: -WRN- | modemDaemon[15409]/modemDaemon T=main | le_mdc.c le_mdc_IsIPv4() 1948 | Could not get the Session Type
Feb 22 10:37:50 fx30s user.info Legato: INFO | dcsDaemon[15371]/dcsNet T=main | dcsNet.c le_net_SetDNS() 1235 | Given channel 1 of technology cellular got no DNS server address assigned
Feb 22 10:37:50 fx30s user.err Legato: =ERR= | dcsDaemon[15371]/dcsDaemon T=main | dcsServer.c SetDnsConfiguration() 593 | Failed to set DNS server addresses; error -6
Feb 22 10:37:50 fx30s user.info Legato: INFO | dcsDaemon[15371]/dcsDaemon T=main | dcsServer.c SetDefaultRouteAndDns() 639 | Failed to set DNS configuration
Feb 22 10:37:50 fx30s user.info Legato: INFO | dcsDaemon[15371]/dcsDaemon T=main | dcsServer.c SetDefaultRouteAndDns() 653 | Wait for next retry to set DNS configuration
Feb 22 10:37:51 fx30s user.err Legato: =ERR= | modemDaemon[15409]/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]
Feb 22 10:37:51 fx30s user.err Legato: =ERR= | modemDaemon[15409]/le_pa T=main | pa_mdc_qmi.c StartSession() 1978 | Data connection failure Call End provided 45, Code 1
Feb 22 10:37:51 fx30s user.err Legato: =ERR= | modemDaemon[15409]/le_pa T=main | pa_mdc_qmi.c StartSession() 1989 | Data connection failure Verbose Call End provided Type 2, Verbose 210
Feb 22 10:37:51 fx30s user.info Legato: INFO | dcsDaemon[15371]/dcsCellular T=main | dcsCellular.c le_dcsCellular_Start() 1079 | Succeeded starting cellular connection 1
Feb 22 10:37:51 fx30s user.info Legato: INFO | dcsDaemon[15371]/dcsCellular T=main | dcsCellular.c DcsCellularConnEventStateHandler() 254 | State of connection 1 transitioned from down to up
Feb 22 10:37:51 fx30s user.info Legato: INFO | dcsDaemon[15371]/dcsDaemon T=main | dcsServer.c ChannelEventHandler() 780 | Received for channel reference 0x2b event Up
Feb 22 10:37:51 fx30s user.info Legato: INFO | dcsDaemon[15371]/dcsDaemon T=main | dcsServer.c SetDefaultGWConfiguration() 426 | Setting default GW address on device
Feb 22 10:37:51 fx30s user.info Legato: INFO | dcsDaemon[15371]/dcsNet T=main | dcsNet.c le_net_SetDefaultGW() 827 | Succeeded to set default GW addr on interface rmnet_data0 for channel 1 of technology cellular
Feb 22 10:37:51 fx30s user.info Legato: INFO | dcsDaemon[15371]/dcsDaemon T=main | dcsServer.c SetDnsConfiguration() 584 | Setting DNS server addresses on device
Feb 22 10:37:51 fx30s user.info Legato: INFO | dcsDaemon[15371]/le_pa_dcs T=main | pa_dcs_linux.c pa_dcs_SetDnsNameServers() 367 | Set DNS ‘100.121.11.10’ ‘100.122.11.10’
Feb 22 10:37:51 fx30s user.info Legato: INFO | dcsDaemon[15371]/dcsNet T=main | dcsNet.c le_net_SetDNS() 1246 | Succeeded to set DNS address(es) of channel 1 of technology cellular onto device
Feb 22 10:37:51 fx30s user.info Legato: INFO | dcsDaemon[15371]/dcsDaemon T=main | dcsServer.c SetDnsConfiguration() 603 | Succeeded setting DNS configuration
Feb 22 10:37:51 fx30s user.info Legato: INFO | dcsDaemon[15371]/dcsDaemon T=main | dcsServer.c SetDefaultRouteAndDns() 658 | Succeeded setting DNS configuration
Feb 22 10:37:51 fx30s user.info Legato: INFO | MCExe[15595]/mc T=main | mainComponent.cpp ConnectionStateHandler() 437 | ConnectionStateHandler: intfName=rmnet_data0 isConnected=1 contextPtr=2136627384
Feb 22 10:37:51 fx30s user.info Legato: INFO | modemDaemon[15409]/le_pa T=main | pa_mrc_qmi.c pa_mrc_GetNetworkRegState() 2482 | called
Feb 22 10:37:53 fx30s user.info Legato: INFO | MCExe[15595]/mc T=main | mainComponent.cpp ConnectionStateHandler() 452 | IP:12.153.230.191
Feb 22 10:37:53 fx30s user.warn Legato: -WRN- | modemDaemon[15409]/framework T=main | safeRef.c le_ref_CreateRef() 547 | Safe reference map maximum exceeded for refle_mrc_ServerHandlers, new size 35
Feb 22 10:37:53 fx30s user.info Legato: INFO | MCExe[15595]/mc T=main | udpQueue.cpp addMessageToQueue() 244 | Report 0:
Feb 22 10:37:53 fx30s user.info Legato: INFO | MCExe[15595]/mc T=ADDTOQUEUE | udpQueue.cpp addToQueueEventHandler() 272 | addToQueue:
Feb 22 10:37:54 fx30s user.info Legato: INFO | MCExe[15595]/mc T=FWCheck | settings.cpp FWCheckThread() 472 | FWCheckThread Start
Feb 22 10:37:54 fx30s user.info Legato: INFO | MCExe[15595]/mc T=UART2 | udpQueue.cpp addMessageToQueue() 244 | Report 1:
Feb 22 10:37:54 fx30s user.info Legato: INFO | MCExe[15595]/mc T=ADDTOQUEUE | udpQueue.cpp addToQueueEventHandler() 272 | addToQueue:
Feb 22 10:37:54 fx30s user.info Legato: INFO | MCExe[15595]/mc T=main | udpQueue.cpp addMessageToQueue() 244 | Report 2:
Feb 22 10:37:54 fx30s user.info Legato: INFO | MCExe[15595]/mc T=ADDTOQUEUE | udpQueue.cpp addToQueueEventHandler() 272 | addToQueue:
Feb 22 10:37:54 fx30s user.info Legato: INFO | MCExe[15595]/mc T=UART2 | udpQueue.cpp addMessageToQueue() 244 | Report 3:
Feb 22 10:37:54 fx30s user.info Legato: INFO | MCExe[15595]/mc T=ADDTOQUEUE | udpQueue.cpp addToQueueEventHandler() 272 | addToQueue:
Feb 22 10:37:54 fx30s user.info Legato: INFO | MCExe[15595]/mc T=UART2 | udpQueue.cpp addMessageToQueue() 244 | Report 4:
Feb 22 10:37:54 fx30s user.info Legato: INFO | MCExe[15595]/mc T=ADDTOQUEUE | udpQueue.cpp addToQueueEventHandler() 272 | addToQueue:
Feb 22 10:37:55 fx30s user.info Legato: INFO | MCExe[15595]/mc T=UART2 | udpQueue.cpp addMessageToQueue() 244 | Report 5:
Feb 22 10:37:55 fx30s user.info Legato: INFO | MCExe[15595]/mc T=ADDTOQUEUE | udpQueue.cpp addToQueueEventHandler() 272 | addToQueue:
Feb 22 10:37:55 fx30s user.info Legato: INFO | MCExe[15595]/mc T=UART2 | udpQueue.cpp addMessageToQueue() 244 | Report 6:
Feb 22 10:37:55 fx30s user.info Legato: INFO | MCExe[15595]/mc T=ADDTOQUEUE | udpQueue.cpp addToQueueEventHandler() 272 | addToQueue:
Feb 22 10:37:55 fx30s user.info Legato: INFO | MCExe[15595]/mc T=UART2 | udpQueue.cpp addMessageToQueue() 244 | Report 7:
Feb 22 10:37:55 fx30s user.info Legato: INFO | MCExe[15595]/mc T=ADDTOQUEUE | udpQueue.cpp addToQueueEventHandler() 272 | addToQueue:
Feb 22 10:37:55 fx30s user.info Legato: INFO | MCExe[15595]/mc T=UART2 | udpQueue.cpp addMessageToQueue() 244 | Report 8:
Feb 22 10:37:55 fx30s user.info Legato: INFO | MCExe[15595]/mc T=ADDTOQUEUE | udpQueue.cpp addToQueueEventHandler() 272 | addToQueue:
Feb 22 10:38:00 fx30s user.info Legato: INFO | dcsDaemon[15371]/dcsDaemon T=main | dcsServer.c SetDnsConfiguration() 584 | Setting DNS server addresses on device
Feb 22 10:38:00 fx30s user.warn Legato: -WRN- | dcsDaemon[15371]/dcsNet T=main | dcsNet.c DcsNetInitDnsBackup() 1111 | Client app with session reference 0x7f5aa898 already set DNS once
Feb 22 10:38:00 fx30s user.warn Legato: -WRN- | dcsDaemon[15371]/dcsNet T=main | dcsNet.c DcsNetInitDnsBackup() 1112 | Restoring that before setting the new as requested
Feb 22 10:38:00 fx30s user.info Legato: INFO | dcsDaemon[15371]/le_pa_dcs T=main | pa_dcs_linux.c pa_dcs_SetDnsNameServers() 367 | Set DNS ‘100.121.11.10’ ‘100.122.11.10’
Feb 22 10:38:00 fx30s user.info Legato: INFO | dcsDaemon[15371]/dcsNet T=main | dcsNet.c le_net_SetDNS() 1246 | Succeeded to set DNS address(es) of channel 1 of technology cellular onto device
Feb 22 10:38:00 fx30s user.info Legato: INFO | dcsDaemon[15371]/dcsDaemon T=main | dcsServer.c SetDnsConfiguration() 603 | Succeeded setting DNS configuration
Feb 22 10:38:00 fx30s user.info Legato: INFO | dcsDaemon[15371]/dcsDaemon T=main | dcsServer.c SetDNSConfigTimerHandler() 732 | Succeeded setting DNS configuration
Feb 22 10:38:23 fx30s user.info Legato: INFO | supervisor[15289]/supervisor T=main | supervisor.c HandleRebootExpiry() 633 | Expired reboot timer
Feb 22 10:42:03 fx30s user.warn Legato: -WRN- | posDaemon[15428]/le_pa_gnss T=unknown | pa_gnss_qmi.c PositionHandler() 1509 | Bad position indication
Feb 22 10:44:18 fx30s user.info Legato: INFO | MCExe[15595]/mc T=main | mainComponent.cpp ConnectionStateHandler() 437 | ConnectionStateHandler: intfName=rmnet_data0 isConnected=1 contextPtr=2136627384
Feb 22 10:44:18 fx30s user.info Legato: INFO | MCExe[15595]/mc T=UDP | udpQueue.cpp checkQueue() 425 | checkQueue 9
Feb 22 10:44:18 fx30s user.info Legato: INFO | MCExe[15595]/mc T=UDP | netSocket.c netSocket_Write() 187 | Write done successfully on fd: 52
Feb 22 10:44:18 fx30s user.info Legato: INFO | MCExe[15595]/mc T=UDP | udpQueue.cpp sendUDP() 372 | Data send 106:
Feb 22 10:44:18 fx30s user.info Legato: INFO | modemDaemon[15409]/le_pa T=main | pa_mrc_qmi.c pa_mrc_GetNetworkRegState() 2482 | called
Feb 22 10:44:56 fx30s user.info Legato: INFO | MCExe[15595]/mc T=UDP | netSocket.c netSocket_Read() 256 | Read size: 9
Feb 22 10:44:56 fx30s user.info Legato: INFO | MCExe[15595]/mc T=UDP | udpQueue.cpp sendUDP() 395 | submitQueueArray size 8 cell:1
Feb 22 10:44:56 fx30s user.info Legato: INFO | MCExe[15595]/mc T=UDP | udpQueue.cpp checkQueue() 428 | submitQueueArray size 8 cell:1
Feb 22 10:44:56 fx30s user.err Legato: =ERR= | modemDaemon[15409]/modemDaemon T=main | le_sms.c CloseSessionEventHandler() 2214 | SessionRef (0x7f5fcdc0) has been closed
Feb 22 10:44:56 fx30s user.info Legato: INFO | modemDaemon[15409]/modemDaemon T=main | le_mdc.c CloseSessionEventHandler() 961 | SessionRef 0x7f5fd8c8 has been closed
Feb 22 10:44:56 fx30s user.info Legato: INFO | dcsDaemon[15371]/dcsDaemon T=main | dcsServer.c CloseSessionEventHandler() 1329 | Client 0x7f5ab830 killed, remove allocated resources
Feb 22 10:44:56 fx30s user.err Legato: =ERR= | posDaemon[15428]/posDaemon T=main | le_gnss.c CloseSessionEventHandler() 1271 | SessionRef (0x7f577b28) has been closed
Feb 22 10:44:56 fx30s user.err Legato: =ERR= | posDaemon[15428]/posDaemon T=main | le_pos.c PosCloseSessionEventHandler() 1189 | SessionRef (0x7f577a98) has been closed
Feb 22 10:44:56 fx30s user.err Legato: =ERR= | posDaemon[15428]/posDaemon T=main | le_pos.c PosCtrlCloseSessionEventHandler() 1143 | SessionRef (0x7f577a08) has been closed
Feb 22 10:44:56 fx30s user.info Legato: INFO | powerManagerService[15437]/powerMgr T=main | le_pm.c OnClientDisconnect() 298 | Client pid 15595 disconnected.
Feb 22 10:44:56 fx30s user.warn Legato: -WRN- | posDaemon[15428]/le_pa_gnss T=unknown | pa_gnss_qmi.c PositionHandler() 1509 | Bad position indication
Feb 22 10:44:56 fx30s user.info Legato: INFO | dcsDaemon[15371]/dcsNet T=main | dcsNet.c le_net_RestoreDefaultGW() 658 | Default IPv4 GW address on interface restored
Feb 22 10:44:56 fx30s user.info Legato: INFO | dcsDaemon[15371]/dcs T=main | dcs.c le_dcs_Stop() 538 | Stopping channel 1 of technology cellular
Feb 22 10:44:56 fx30s user.info Legato: INFO | dcsDaemon[15371]/dcs T=main | dcs.c le_dcs_Stop() 563 | Channel 1 requested to be stopped
Feb 22 10:44:56 fx30s user.info Legato: INFO | dcsDaemon[15371]/dcsDaemon T=main | dcsServer.c TryStopTechSession() 1157 | Successfully initiated stopping active data connection 1 of technology 1
Feb 22 10:44:56 fx30s user.info Legato: INFO | dcsDaemon[15371]/dcs T=main | dcsTech.c le_dcsTech_Stop() 399 | Request to stop channel 1 of technology cellular
Feb 22 10:44:56 fx30s user.info Legato: INFO | dcsDaemon[15371]/dcsCellular T=main | dcsCellular.c le_dcsCellular_Stop() 1160 | Succeeded stopping cellular connection 1
Feb 22 10:44:56 fx30s user.info Legato: INFO | dcsDaemon[15371]/dcsCellular T=main | dcsCellular.c DcsCellularConnEventStateHandler() 254 | State of connection 1 transitioned from up to down
Feb 22 10:44:56 fx30s user.info Legato: INFO | dcsDaemon[15371]/dcsDaemon T=main | dcsServer.c ChannelEventHandler() 780 | Received for channel reference 0x2b event Down
Feb 22 10:44:56 fx30s user.info Legato: INFO | dcsDaemon[15371]/dcsDaemon T=main | dcsServer.c UpdateTechnologyStatus() 1014 | No need to retry connecting with RequestCount 0
Feb 22 10:44:56 fx30s user.info Legato: INFO | dcsDaemon[15371]/dcs T=main | dcs.c le_dcs_RemoveEventHandler() 695 | Channel event handler for channel 1 of technology cellular removed
Feb 22 10:45:11 fx30s user.err Legato: =ERR= | posDaemon[15428]/posDaemon T=main | le_pos.c PosCloseSessionEventHandler() 1189 | SessionRef (0x7f577978) has been closed
Feb 22 10:45:11 fx30s user.err Legato: =ERR= | posDaemon[15428]/posDaemon T=main | le_gnss.c CloseSessionEventHandler() 1271 | SessionRef (0x7f5778e8) has been closed
Feb 22 10:45:11 fx30s authpriv.info dropbear[15590]: Exit (root): Disconnect received
Feb 22 10:45:11 fx30s authpriv.info dropbear[16579]: Child connection from 192.168.2.3:55988
Feb 22 10:45:11 fx30s authpriv.notice dropbear[16579]: Auth succeeded with blank password for ‘root’ from 192.168.2.3:55988
Feb 22 10:45:11 fx30s authpriv.info dropbear[16579]: Exit (root): Disconnect received

DEBUG CONSOLE

Thread 3 “UART2” received signal SIGABRT, Aborted.
[Switching to Thread 18553.18604]
0xb6a02e9c in raise () from target:/lib/libc.so.6
Loaded ‘target:/lib/libnss_files.so.2’. Symbols loaded.
Loaded ‘target:/lib/libnss_dns.so.2’. Symbols loaded.
Loaded ‘target:/lib/libresolv.so.2’. Symbols loaded.
sshWrapper: PROCESS: 18553 ,TID 18604
sshWrapper: SIGNAL: 6, ADDR (nil), AT 0xb6a02e9c SI_CODE 0xfffffffa
sshWrapper: ABORT
sshWrapper: LEGATO VERSION
sshWrapper: 19.11.5_2c7710e13100e1d3c6b3e95b42fb9a99
sshWrapper:
sshWrapper: PROCESS COMMAND LINE
sshWrapper: /legato/systems/current/apps/hubApp/read-only/bin/MCExe
sshWrapper: PROCESS MAP
sshWrapper: 7f555000-7f557000 r-xp 00000000 ec:01 434039 /legato/apps/0fadcad735fc07deb0bd1a242f8475fd/read-only/bin/MCExe
sshWrapper: 7f566000-7f567000 r–p 00001000 ec:01 434039 /legato/apps/0fadcad735fc07deb0bd1a242f8475fd/read-only/bin/MCExe
sshWrapper: 7f567000-7f568000 rw-p 00002000 ec:01 434039 /legato/apps/0fadcad735fc07deb0bd1a242f8475fd/read-only/bin/MCExe
sshWrapper: 7f568000-7f5ee000 rw-p 00000000 00:00 0 [heap]
sshWrapper: b1cfd000-b1cfe000 —p 00000000 00:00 0
sshWrapper: b1cfe000-b24fe000 rw-p 00000000 00:00 0
sshWrapper: b24fe000-b24ff000 —p 00000000 00:00 0
sshWrapper: b24ff000-b2cff000 rw-p 00000000 00:00 0
sshWrapper: b2cff000-b2d00000 —p 00000000 00:00 0
sshWrapper: b2d00000-b3500000 rw-p 00000000 00:00 0
sshWrapper: b3500000-b3521000 rw-p 00000000 00:00 0
sshWrapper: b3521000-b3600000 —p 00000000 00:00 0
sshWrapper: b36da000-b36ea000 r-xp 00000000 fe:00 815 /lib/libresolv-2.27.so
sshWrapper: b36ea000-b36fa000 —p 00010000 fe:00 815 /lib/libresolv-2.27.so
sshWrapper: b36fa000-b36fb000 r–p 00010000 fe:00 815 /lib/libresolv-2.27.so
sshWrapper: b36fb000-b36fc000 rw-p 00011000 fe:00 815 /lib/libresolv-2.27.so
sshWrapper: b36fc000-b36fe000 rw-p 00000000 00:00 0
sshWrapper: b36fe000-b36ff000 —p 00000000 00:00 0
sshWrapper: b36ff000-b3eff000 rw-p 00000000 00:00 0
sshWrapper: b3eff000-b3f00000 —p 00000000 00:00 0
sshWrapper: b3f00000-b4700000 rw-p 00000000 00:00 0
sshWrapper: b4700000-b4721000 rw-p 00000000 00:00 0
sshWrapper: b4721000-b4800000 —p 00000000 00:00 0
sshWrapper: b4808000-b480c000 r-xp 00000000 fe:00 809 /lib/libnss_dns-2.27.so
sshWrapper: b480c000-b481b000 —p 00004000 fe:00 809 /lib/libnss_dns-2.27.so
sshWrapper: b481b000-b481c000 r–p 00003000 fe:00 809 /lib/libnss_dns-2.27.so
sshWrapper: b481c000-b481d000 rw-p 00004000 fe:00 809 /lib/libnss_dns-2.27.so
sshWrapper: b481d000-b4826000 r-xp 00000000 fe:00 811 /lib/libnss_files-2.27.so
sshWrapper: b4826000-b4835000 —p 00009000 fe:00 811 /lib/libnss_files-2.27.so
sshWrapper: b4835000-b4836000 r–p 00008000 fe:00 811 /lib/libnss_files-2.27.so
sshWrapper: b4836000-b4837000 rw-p 00009000 fe:00 811 /lib/libnss_files-2.27.so
sshWrapper: b4837000-b483d000 rw-p 00000000 00:00 0
sshWrapper: b483d000-b483e000 —p 00000000 00:00 0
sshWrapper: b483e000-b503e000 rw-p 00000000 00:00 0
sshWrapper: b503e000-b503f000 —p 00000000 00:00 0
sshWrapper: b503f000-b583f000 rw-p 00000000 00:00 0
sshWrapper: b583f000-b5840000 —p 00000000 00:00 0
sshWrapper: b5840000-b6040000 rw-p 00000000 00:00 0
sshWrapper: b6040000-b6041000 —p 00000000 00:00 0
sshWrapper: b6041000-b6841000 rw-p 00000000 00:00 0
sshWrapper: b6841000-b6854000 r-xp 00000000 fe:00 828 /lib/libz.so.1.2.11
sshWrapper: b6854000-b6863000 —p 00013000 fe:00 828 /lib/libz.so.1.2.11
sshWrapper: b6863000-b6864000 r–p 00012000 fe:00 828 /lib/libz.so.1.2.11
sshWrapper: b6864000-b6865000 rw-p 00013000 fe:00 828 /lib/libz.so.1.2.11
sshWrapper: b6865000-b6881000 r-xp 00000000 fe:00 798 /lib/libgcc_s.so.1
sshWrapper: b6881000-b6890000 —p 0001c000 fe:00 798 /lib/libgcc_s.so.1
sshWrapper: b6890000-b6891000 r–p 0001b000 fe:00 798 /lib/libgcc_s.so.1
sshWrapper: b6891000-b6892000 rw-p 0001c000 fe:00 798 /lib/libgcc_s.so.1
sshWrapper: b6892000-b69c0000 r-xp 00000000 fe:00 1516 /usr/lib/libstdc++.so.6.0.24
sshWrapper: b69c0000-b69d0000 —p 0012e000 fe:00 1516 /usr/lib/libstdc++.so.6.0.24
sshWrapper: b69d0000-b69d6000 r–p 0012e000 fe:00 1516 /usr/lib/libstdc++.so.6.0.24
sshWrapper: b69d6000-b69d7000 rw-p 00134000 fe:00 1516 /usr/lib/libstdc++.so.6.0.24
sshWrapper: b69d7000-b69d8000 rw-p 00000000 00:00 0
sshWrapper: b69d8000-b6b02000 r-xp 00000000 fe:00 790 /lib/libc-2.27.so
sshWrapper: b6b02000-b6b12000 —p 0012a000 fe:00 790 /lib/libc-2.27.so
sshWrapper: b6b12000-b6b14000 r–p 0012a000 fe:00 790 /lib/libc-2.27.so
sshWrapper: b6b14000-b6b15000 rw-p 0012c000 fe:00 790 /lib/libc-2.27.so
sshWrapper: b6b15000-b6b18000 rw-p 00000000 00:00 0
sshWrapper: b6b18000-b6b8d000 r-xp 00000000 fe:00 799 /lib/libm-2.27.so
sshWrapper: b6b8d000-b6b9c000 —p 00075000 fe:00 799 /lib/libm-2.27.so
sshWrapper: b6b9c000-b6b9d000 r–p 00074000 fe:00 799 /lib/libm-2.27.so
sshWrapper: b6b9d000-b6b9e000 rw-p 00075000 fe:00 799 /lib/libm-2.27.so
sshWrapper: b6b9e000-b6ba0000 r-xp 00000000 fe:00 796 /lib/libdl-2.27.so
sshWrapper: b6ba0000-b6baf000 —p 00002000 fe:00 796 /lib/libdl-2.27.so
sshWrapper: b6baf000-b6bb0000 r–p 00001000 fe:00 796 /lib/libdl-2.27.so
sshWrapper: b6bb0000-b6bb1000 rw-p 00002000 fe:00 796 /lib/libdl-2.27.so
sshWrapper: b6bb1000-b6bb7000 r-xp 00000000 fe:00 817 /lib/librt-2.27.so
sshWrapper: b6bb7000-b6bc6000 —p 00006000 fe:00 817 /lib/librt-2.27.so
sshWrapper: b6bc6000-b6bc7000 r–p 00005000 fe:00 817 /lib/librt-2.27.so
sshWrapper: b6bc7000-b6bc8000 rw-p 00006000 fe:00 817 /lib/librt-2.27.so
sshWrapper: b6bc8000-b6bde000 r-xp 00000000 fe:00 813 /lib/libpthread-2.27.so
sshWrapper: b6bde000-b6bed000 —p 00016000 fe:00 813 /lib/libpthread-2.27.so
sshWrapper: b6bed000-b6bee000 r–p 00015000 fe:00 813 /lib/libpthread-2.27.so
sshWrapper: b6bee000-b6bef000 rw-p 00016000 fe:00 813 /lib/libpthread-2.27.so
sshWrapper: b6bef000-b6bf1000 rw-p 00000000 00:00 0
sshWrapper: b6bf1000-b6c52000 r-xp 00000000 ec:01 434011 /legato/systems/current/lib/liblegato.so
sshWrapper: b6c52000-b6c61000 —p 00061000 ec:01 434011 /legato/systems/current/lib/liblegato.so
sshWrapper: b6c61000-b6c62000 r–p 00060000 ec:01 434011 /legato/systems/current/lib/liblegato.so
sshWrapper: b6c62000-b6c63000 rw-p 00061000 ec:01 434011 /legato/systems/current/lib/liblegato.so
sshWrapper: b6c63000-b6c76000 rw-p 00000000 00:00 0
sshWrapper: b6c76000-b6c7c000 r-xp 00000000 fe:00 826 /lib/libuuid.so.1.3.0
sshWrapper: b6c7c000-b6c8b000 —p 00006000 fe:00 826 /lib/libuuid.so.1.3.0
sshWrapper: b6c8b000-b6c8c000 r–p 00005000 fe:00 826 /lib/libuuid.so.1.3.0
sshWrapper: b6c8c000-b6c8d000 rw-p 00006000 fe:00 826 /lib/libuuid.so.1.3.0
sshWrapper: b6c8d000-b6cdd000 r-xp 00000000 fe:00 1323 /usr/lib/libcurl.so.4.5.0
sshWrapper: b6cdd000-b6cec000 —p 00050000 fe:00 1323 /usr/lib/libcurl.so.4.5.0
sshWrapper: b6cec000-b6ced000 r–p 0004f000 fe:00 1323 /usr/lib/libcurl.so.4.5.0
sshWrapper: b6ced000-b6cee000 rw-p 00050000 fe:00 1323 /usr/lib/libcurl.so.4.5.0
sshWrapper: b6cee000-b6e45000 r-xp 00000000 fe:00 1319 /usr/lib/libcrypto.so.1.0.2
sshWrapper: b6e45000-b6e55000 —p 00157000 fe:00 1319 /usr/lib/libcrypto.so.1.0.2
sshWrapper: b6e55000-b6e66000 r–p 00157000 fe:00 1319 /usr/lib/libcrypto.so.1.0.2
sshWrapper: b6e66000-b6e6c000 rw-p 00168000 fe:00 1319 /usr/lib/libcrypto.so.1.0.2
sshWrapper: b6e6c000-b6e70000 rw-p 00000000 00:00 0
sshWrapper: b6e70000-b6eb9000 r-xp 00000000 fe:00 1514 /usr/lib/libssl.so.1.0.2
sshWrapper: b6eb9000-b6ec8000 —p 00049000 fe:00 1514 /usr/lib/libssl.so.1.0.2
sshWrapper: b6ec8000-b6ecb000 r–p 00048000 fe:00 1514 /usr/lib/libssl.so.1.0.2
sshWrapper: b6ecb000-b6ece000 rw-p 0004b000 fe:00 1514 /usr/lib/libssl.so.1.0.2
sshWrapper: b6ece000-b6fba000 r-xp 00000000 ec:01 434045 /legato/apps/0fadcad735fc07deb0bd1a242f8475fd/read-only/lib/libComponent_mc.so
sshWrapper: b6fba000-b6fc9000 —p 000ec000 ec:01 434045 /legato/apps/0fadcad735fc07deb0bd1a242f8475fd/read-only/lib/libComponent_mc.so
sshWrapper: b6fc9000-b6fca000 r–p 000eb000 ec:01 434045 /legato/apps/0fadcad735fc07deb0bd1a242f8475fd/read-only/lib/libComponent_mc.so
sshWrapper: b6fca000-b6fcb000 rw-p 000ec000 ec:01 434045 /legato/apps/0fadcad735fc07deb0bd1a242f8475fd/read-only/lib/libComponent_mc.so
sshWrapper: b6fcb000-b6fce000 rw-p 00000000 00:00 0
sshWrapper: b6fce000-b6fee000 r-xp 00000000 fe:00 780 /lib/ld-2.27.so
sshWrapper: b6ff3000-b6ff7000 rw-p 00000000 00:00 0
sshWrapper: b6ffb000-b6ffd000 rw-p 00000000 00:00 0
sshWrapper: b6ffd000-b6ffe000 r-xp 00000000 00:00 0 [sigpage]
sshWrapper: b6ffe000-b6fff000 r–p 00020000 fe:00 780 /lib/ld-2.27.so
sshWrapper: b6fff000-b7000000 rw-p 00021000 fe:00 780 /lib/ld-2.27.so
sshWrapper: befdf000-bf000000 rw-p 00000000 00:00 0 [stack]
sshWrapper: ffff0000-ffff1000 r-xp 00000000 00:00 0 [vectors]
sshWrapper: BACKTRACE
sshWrapper: PC at b6a02e9c
sshWrapper: LR at b46fe120 [0xb46fdc2c]
sshWrapper: LR at b6c2b924 [0xb46fdc44]
sshWrapper: LR at b6a03dc0 [0xb46fddac]
sshWrapper: r0 00000000 r1 b46fe120 r2 00000000 r3 00000008 r4 00000006 r5 b6af8998
sshWrapper: r6 00002008 r7 000000af r8 b6b14000 r9 b3500044 r10 fff00000 cpsr 000f0010
sshWrapper: fp b35012c0 ip 00000000 sp b46fe120 lr b46fe120 pc b6a02e9c
sshWrapper: STACK b46fe120, FRAME b35012c0

CUT

sshWrapper: DONE
[New Thread 18553.18853]

Thread 3 “UART2” received signal SIGABRT, Aborted.
0xb6bd9fac in raise () from target:/lib/libpthread.so.0

do you see this DNS problem in using “cm” tool or modemdemo application?

the “cm data connect” behaves differently

root@fx30s:~# cm data connect
Setting up profile 1
Connecting … ok
Checking if device ‘rmnet_data0’ is up … ok
Routing inet … ok
Updating /etc/resolv.conf … ok
Updating /etc/resolv.conf … ok

Feb 22 11:46:02 fx30s user.info Legato: INFO | supervisor[23026]/supervisor T=main | proc.c proc_Start() 1403 | Starting process ‘cm@0’ with pid 24570
Feb 22 11:46:02 fx30s user.info Legato: INFO | supervisor[23026]/supervisor T=main | supervisor.c SigChildHandler() 899 | Reaping unconfigured child process 24566.
Feb 22 11:46:02 fx30s user.info Legato: INFO | supervisor[24570]/supervisor T=main | proc.c proc_Start() 1363 | Execing ‘scripts/cm’
Feb 22 11:46:02 fx30s user.info Legato: INFO | supervisor[24570]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxCoreDumpFileBytes to value 8192.
Feb 22 11:46:02 fx30s user.info Legato: INFO | supervisor[24570]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxFileBytes to value 90112.
Feb 22 11:46:02 fx30s user.info Legato: INFO | supervisor[24570]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxLockedMemoryBytes to value 8192.
Feb 22 11:46:02 fx30s user.info Legato: INFO | supervisor[24570]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxFileDescriptors to value 256.
Feb 22 11:46:02 fx30s user.info Legato: INFO | supervisor[24570]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxMQueueBytes to value 512.
Feb 22 11:46:02 fx30s user.info Legato: INFO | supervisor[24570]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxThreads to value 20.
Feb 22 11:46:02 fx30s user.info Legato: INFO | supervisor[24570]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxQueuedSignals to value 100.
Feb 22 11:46:02 fx30s user.warn Legato: -WRN- | UNKNOWN[24573]/framework T=main | safeRef.c le_ref_CreateRef() 547 | Safe reference map maximum exceeded for refFdMonitors, new size 42
Feb 22 11:46:02 fx30s user.info Legato: INFO | modemDaemon[23146]/modemDaemon T=main | le_mdc.c CloseSessionEventHandler() 961 | SessionRef 0x7f5fe090 has been closed
Feb 22 11:46:02 fx30s user.err Legato: =ERR= | modemDaemon[23146]/modemDaemon T=main | le_sms.c CloseSessionEventHandler() 2214 | SessionRef (0x7f5fdd00) has been closed
Feb 22 11:46:02 fx30s user.warn Legato: -WRN- | UNKNOWN[24587]/framework T=main | safeRef.c le_ref_CreateRef() 547 | Safe reference map maximum exceeded for refFdMonitors, new size 42
Feb 22 11:46:02 fx30s user.info Legato: INFO | cm[24587]/cm T=main | cm_data.c cm_data_ProcessDataCommand() 1164 | dataParam is NULL
Feb 22 11:46:03 fx30s user.err Legato: =ERR= | modemDaemon[23146]/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]
Feb 22 11:46:03 fx30s user.err Legato: =ERR= | modemDaemon[23146]/le_pa T=main | pa_mdc_qmi.c StartSession() 1978 | Data connection failure Call End provided 45, Code 1
Feb 22 11:46:03 fx30s user.err Legato: =ERR= | modemDaemon[23146]/le_pa T=main | pa_mdc_qmi.c StartSession() 1989 | Data connection failure Verbose Call End provided Type 2, Verbose 210
Feb 22 11:46:03 fx30s user.info Legato: INFO | modemDaemon[23146]/modemDaemon T=main | le_mdc.c CloseSessionEventHandler() 961 | SessionRef 0x7f5fce68 has been closed
Feb 22 11:46:03 fx30s user.err Legato: =ERR= | modemDaemon[23146]/modemDaemon T=main | le_sms.c CloseSessionEventHandler() 2214 | SessionRef (0x7f5fd970) has been closed
Feb 22 11:46:03 fx30s user.info Legato: INFO | dcsDaemon[23108]/dcsCellular T=main | dcsCellular.c DcsCellularConnEventStateHandler() 254 | State of connection 1 transitioned from down to up
Feb 22 11:46:06 fx30s user.warn Legato: -WRN- | UNKNOWN[24638]/framework T=main | safeRef.c le_ref_CreateRef() 547 | Safe reference map maximum exceeded for refFdMonitors, new size 42
Feb 22 11:46:06 fx30s user.info Legato: INFO | modemDaemon[23146]/modemDaemon T=main | le_mdc.c CloseSessionEventHandler() 961 | SessionRef 0x7f5fdf60 has been closed
Feb 22 11:46:06 fx30s user.err Legato: =ERR= | modemDaemon[23146]/modemDaemon T=main | le_sms.c CloseSessionEventHandler() 2214 | SessionRef (0x7f5fdd00) has been closed
Feb 22 11:46:06 fx30s user.info Legato: INFO | supervisor[23026]/supervisor T=main | proc.c proc_SigChildHandler() 2079 | Process ‘cm@0’ (PID: 24570) has exited with exit code 0.
Feb 22 11:46:06 fx30s user.info Legato: INFO | supervisor[23026]/supervisor T=main | app.c app_StopComplete() 4753 | app ‘tools’ has stopped.
Feb 22 11:46:06 fx30s user.info Legato: INFO | supervisor[23026]/supervisor T=main | apps.c DeactivateAppContainer() 374 | Application ‘tools’ has stopped.

root@fx30s:~# cm data
Index: 1
APN: m2m005079.attz
PDP Type: IPV4V6
Connected: yes
Interface: rmnet_data0
Family[IPv4]: inet
IP[IPv4]: 10.129.207.20
Gateway[IPv4]: 10.129.207.21
Dns1[IPv4]: 100.122.11.10
Dns2[IPv4]: 100.121.11.10

then can you use the method in cm tool?

Is that the cm_data_StartDataConnection() in cm_data.c ?

This is my code

le_data_SetTechnologyRank(1, LE_DATA_CELLULAR);

le_data_Technology_t technology = le_data_GetFirstUsedTechnology();

LE_ERROR("first technology %d.", technology);

while (LE_DATA_MAX != (technology = le_data_GetNextUsedTechnology()))
{
    LE_ERROR("next technology %d.", technology);
}

int32_t indexTest = le_data_GetCellularProfileIndex();

le_mrc_SetRatPreferences(LE_MRC_BITMASK_RAT_LTE);

le_data_AddConnectionStateHandler(&mainComponent::ConnectionStateHandler_wrapper, this);
ConnectionRef = le_data_Request();

yes, you can refer to the code here:

Another reference is the modemdemo application:

I implemented the basics, not sure about the “ConfigTreeRoot” stuff,

I get i connection but not working ? something seems to be missing

If i do this it is working,
root@fx30s:~# cm data connect
Setting up profile 1
Connecting … ok
Checking if device ‘rmnet_data0’ is up … ok
Routing inet … ok
Updating /etc/resolv.conf … ok
Updating /etc/resolv.conf … ok

What are the missing Legato steps ?

root@fx30s:~# cm data
Index: 1
APN: m2m005079.attz
PDP Type: IPV4V6
Connected: yes
Interface: rmnet_data0
Family[IPv4]: inet
IP[IPv4]: 10.211.226.143
Gateway[IPv4]: 10.211.226.144
Dns1[IPv4]: 100.123.11.10
Dns2[IPv4]: 100.122.11.10
root@fx30s:~# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
ping: sendto: Network is unreachable

le_mdc_ProfileRef_t profile = le_mdc_GetProfile(1);
uint32_t profileIndex = le_mdc_GetProfileIndex(profile);
if (strlen(DataChannelName) == 0)
{
    snprintf(DataChannelName, LE_DCS_CHANNEL_NAME_MAX_LEN - 1, "%" PRIu32 "", profileIndex);
}
DataChannelRef = le_dcs_GetReference(DataChannelName, LE_DCS_TECH_CELLULAR);

// Setup the config tree root for the paths saving & retrieving connection parameters
le_utf8_Copy(ConfigTreeRoot, "dataConnectionService:/sessionCleanup", LE_CFG_STR_LEN, NULL);

ConnectTimeout[0] = '\0';

le_dcs_ReqObjRef_t dataChannelReqRef;

LE_INFO("Starting channel %s", DataChannelName);

if (DataChannelEventHandlerRef)
{
    LE_DEBUG("Removing event handler with reference %p", DataChannelEventHandlerRef);
    le_dcs_RemoveEventHandler(DataChannelEventHandlerRef);
}

char configPath[LE_CFG_STR_LEN_BYTES];
snprintf(configPath, sizeof(configPath), "%s/%s", ConfigTreeRoot, "tools");
le_cfg_QuickSetBool(configPath, true);

DataChannelEventHandlerRef = le_dcs_AddEventHandler(DataChannelRef, &mainComponent::ChannelEventHandler_wrapper, this);
if (!DataChannelEventHandlerRef)
{
    LE_ERROR("Failed to add channel event handler");
    // HandleResult("Failed to add event handler to start connection", LE_FAULT, true, true);
}
LE_INFO("New event handler ref %p added", DataChannelEventHandlerRef);

le_mdc_AddSessionStateHandler(profile, ConnectionStateHandler_wrapper, this);

dataChannelReqRef = le_dcs_Start(DataChannelRef);
if (!dataChannelReqRef)
{
    LE_ERROR("Connection Failure");

    // HandleResult("Connection Failure", LE_FAULT, true, true);
}

you mean it did not work even for “cm data connect”?

No it works for cm data connect,
when i look at the cm script
it looks like these are called,
is there similar Legato functions ?

update_route() {
if [ “x$1” = “xconnect” ]; then
local family=$2
local iface=$3
local gw=$4

    # Backup existing route
    delete_default_route $family

    if [ -z "$gw" ] || [ "x$gw" = "xN/A" ]; then
        return
    fi

    echo -n "Routing $family ... "
    ip -family $family route add default via $gw dev $iface > $LOG 2>&1
    handle_err $?

elif [ “x$1” = “xdisconnect” ]; then

    # Restore previous routes
    if [ -f "$DEFAULT_ROUTE" ]; then
        for family in inet inet6; do
            local gw=$(grep -w $family $DEFAULT_ROUTE | cut -d' ' -f3)
            local iface=$(grep -w $family $DEFAULT_ROUTE | cut -d' ' -f5)
            delete_default_route $family false
            if [ -n "$gw" ]; then
                echo -n "Routing $family ... "
                ip -family $family route add default via $gw dev $iface > $LOG 2>&1
                handle_err $?
            fi
        done
    fi
fi

}

update_dns() {
if [ “x$1” = “xconnect” ]; then
if [ “x$2” != “xN/A” ]; then
if [ -f “$RESOLV_CONF” ]; then
cp “$RESOLV_CONF” “$DEFAULT_RESOLV_CONF”
echo “” > “$RESOLV_CONF”
fi
fi
elif [ “x$1” = “xdisconnect” ]; then
if [ -f “$DEFAULT_RESOLV_CONF” ]; then
cat “$DEFAULT_RESOLV_CONF” > “$RESOLV_CONF”
rm “$DEFAULT_RESOLV_CONF”
fi
fi
shift 1

for i in $@; do
    if [ "x$1" != "xN/A" ]; then
        grep $1 $RESOLV_CONF > /dev/null 2>&1
        if [ $? -ne 0 ]; then
            echo -n "Updating /etc/resolv.conf ... "
            echo "nameserver $1" >> $RESOLV_CONF
            echo "ok"
        fi
        shift 1
    fi
done

}

then maybe you try with modemdemo application, I remember it will configure the DNS:

app runProc modemDemo1 send --exe=send -- 1234567 "Online"

That is using le_data_Request(); like I did originally ?

then what is the problem?
Did you see problem with modemdemo application?

I haven’t tested the modemdemo app! but my original problem seems to be related to using le_data_Request(); and SetDnsConfiguration() called more than once, leads to a crash

dcsDaemon[15371]/dcsDaemon T=main | dcsServer.c SetDnsConfiguration() 584 | Setting DNS server addresses on device
dcsDaemon[15371]/dcsNet T=main | dcsNet.c DcsNetInitDnsBackup() 1111 | Client app with session reference 0x7f5aa898 already set DNS once

then you can try with modemdemo first, I remember you need to set this before calling le_data_Request()

 le_data_SetTechnologyRank(2,LE_DATA_WIFI );
    le_data_SetTechnologyRank(1,LE_DATA_CELLULAR  );
    RequestRef = le_data_Request();

Or you can simply call “cm data connect” in system() under unsandboxed application

system(“/legato/systems/current/bin/cm data connect”);
from within the app and it looks like the connection goes up but it is not working (missing route?),
and i don’t get a callback so this approach will not work.

I’ve gone back to using le_data_Request(); which is working except for the crash.

How do i compile all of Legato in debug mode so i can set breakpoints in ex. dcsServer.c ?

Do you see crash with modemdemo app?

I don’t have any of the samples installed so i can’t test.
If it is important to know i can setup a fresh workspace ?
But is there a global DEBUG flag somewhere ?

If it works with modemdemo, then thar means your code has problem

That could very well be but I have not been able to catch it yet,
and it seems to be related to the connection changing state that is why I want to set breakpoints in the Legato code

in the past, I can set breakpoint in my application via Developer Studio.
But never tried with legato framework…

You might need to add debug message to legato framework and rebuild the legato.cwe if you want to debug this.