Problem with data connection servie

Hi all,

i have kind of a weird problem, I am using the DataConnection Service in my App.

This is how i am initiating the data connection:

static void initDataConnection(void)

{
// Add connection changed hanlder
le_data_AddConnectionStateHandler(DcsStateHandler, NULL);

// User cellulat by default
LE_ASSERT(LE_OK == le_data_SetTechnologyRank(1, LE_DATA_CELLULAR));

//Request Data Connaction
RequestRef = le_data_Request();

}

Sometime it seems to work and sometimes i have to restart the App/module multiple times to be able to connect to cellular.

I have used multiple sims and provider but the Problem persists. Also the APN is set correctly.

Here are the Logs:
Jan 6 02:05:10 swi-mdm9x28-wp user.err Legato: =ERR= | dcsDaemon[1176]/dcs T=main | dcs.c le_dcs_GetReference() 216 | Failed to find channel with name 1 of technology 2
Jan 6 02:05:10 swi-mdm9x28-wp user.err Legato: =ERR= | dcsDaemon[1176]/dcsDaemon T=main | dcsTechRank.c dcsTechRank_SelectDataChannel() 216 | Failed to select cellular profile index 1 due to invalid channel reference
Jan 6 02:05:10 swi-mdm9x28-wp user.err Legato: =ERR= | dcsDaemon[1176]/dcsDaemon T=main | dcsServer.c TryStartTechSession() 1057 | Failed to pick technology 1 to start a data connection
Jan 6 02:05:10 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[1176]/dcsDaemon T=main | dcsServer.c UpdateTechnologyStatus() 1040 | Technology retry to connect will happen after 4 sec
Jan 6 02:05:10 swi-mdm9x28-wp user.err Legato: =ERR= | modemDaemon[1206]/swiQmi T=main | swiQmi.c swiQmi_CheckResponse() 799 | Sending QMI_NAS_GET_NETWORK_TIME_RESP_MSG_V01 failed: rc=0 (), resp.result=1.[0x01], resp.error=74.[0x4a]
Jan 6 02:05:10 swi-mdm9x28-wp user.info Legato: INFO | modemDaemon[1206]/modemDaemon T=main | le_mrc.c RetrySyncNetworkTimeHandler() 1809 | Re-try: Unable to get network time: result -6
Jan 6 02:05:10 swi-mdm9x28-wp user.info Legato: INFO | modemDaemon[1206]/modemDaemon T=main | le_sim.c EventTimerHandler() 1262 | Disabling last ICCID change forwarding
Jan 6 02:05:10 swi-mdm9x28-wp user.info Legato: INFO | CLV2[1262]/CLV2Component T=CLV2_MAIN | CLV2.c digitalWrite() 261 | Writing to GPIO: Action: HEARTBEAT, Value: 1
Jan 6 02:05:10 swi-mdm9x28-wp user.warn kernel: [ 32.773337] QTI:USB tethered modem SMD port opened
Jan 6 02:05:11 swi-mdm9x28-wp user.info Legato: INFO | dcsInternal[1177]/dcsInternal T=main | dcsInternal.c _dcsInternal_COMPONENT_INIT() 64 | Initializing data channels
Jan 6 02:05:11 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[1176]/dcs T=main | dcs.c le_dcs_GetChannels() 774 | DCS’ first channel list query to initialize channel list
Jan 6 02:05:11 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[1176]/dcs T=main | dcs.c DcsInitInternalSession() 747 | DCS internal session reference set to 0x7f5aa928
Jan 6 02:05:11 swi-mdm9x28-wp user.warn Legato: -WRN- | dcsInternal[1177]/framework T=main | fdMonitor.c le_fdMonitor_Create() 449 | FD Monitor object name ‘dcsInternal.watchdogChain.le_wdog’ truncated to ‘dcsInternal.watchdogChain.le_wd’.
Jan 6 02:05:11 swi-mdm9x28-wp user.warn Legato: -WRN- | dcsDaemon[1176]/dcsWifi T=main | dcsWifi.c le_dcsWifi_GetChannelList() 893 | Wifi not available
Jan 6 02:05:11 swi-mdm9x28-wp user.warn Legato: -WRN- | dcsDaemon[1176]/dcs T=main | dcsTech.c le_dcsTech_GetChannelList() 237 | Failed to trigger channel list collection for technology 1; error: -18
Jan 6 02:05:11 swi-mdm9x28-wp user.warn Legato: -WRN- | dcsDaemon[1176]/dcs T=main | dcs.c le_dcs_GetChannelList() 811 | Failed to trigger a query for available channels of technology 1, error: -18
Jan 6 02:05:11 swi-mdm9x28-wp user.info Legato: INFO | modemDaemon[1206]/modemDaemon T=main | le_mdc.c le_mdc_GetProfileList() 2986 | le_mdc_GetProfileList: profile list size given 36
Jan 6 02:05:11 swi-mdm9x28-wp user.info Legato: INFO | modemDaemon[1206]/le_pa T=main | pa_mdc_qmi.c pa_mdc_GetProfileList() 4597 | # of cellular profiles returned: 3
Jan 6 02:05:11 swi-mdm9x28-wp user.info Legato: INFO | modemDaemon[1206]/le_pa T=main | pa_mdc_qmi.c pa_mdc_GetProfileList() 4605 | Cellular profile retrieved index 1, type 0, name
Jan 6 02:05:11 swi-mdm9x28-wp user.info Legato: INFO | modemDaemon[1206]/le_pa T=main | pa_mdc_qmi.c pa_mdc_GetProfileList() 4605 | Cellular profile retrieved index 2, type 0, name
Jan 6 02:05:11 swi-mdm9x28-wp user.info Legato: INFO | modemDaemon[1206]/le_pa T=main | pa_mdc_qmi.c pa_mdc_GetProfileList() 4605 | Cellular profile retrieved index 3, type 0, name
Jan 6 02:05:11 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[1176]/dcsCellular T=main | dcsCellular.c DcsCellularAddConnEventHandler() 561 | Succeeded adding connection event handler for connection 1
Jan 6 02:05:11 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[1176]/dcsCellular T=main | dcsCellular.c DcsCellularAddConnEventHandler() 561 | Succeeded adding connection event handler for connection 2
Jan 6 02:05:11 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[1176]/dcsCellular T=main | dcsCellular.c DcsCellularAddConnEventHandler() 561 | Succeeded adding connection event handler for connection 3
Jan 6 02:05:11 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[1176]/dcs T=main | dcsTech.c le_dcsTech_CollectChannelQueryResults() 702 | Query channel list results collected from technology 2, retcode 0, list size 3
Jan 6 02:05:11 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[1176]/dcs T=main | dcsTech.c le_dcsTech_CollectChannelQueryResults() 702 | Query channel list results collected from technology 3, retcode 0, list size 1
Jan 6 02:05:11 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[1176]/dcs T=main | dcsTech.c DcsTechPostChannelList() 681 | Posting collected channel list to apps of size 4
Jan 6 02:05:11 swi-mdm9x28-wp user.info Legato: INFO | dcsInternal[1177]/dcsInternal T=main | dcsInternal.c dcsInternalChannelQueryHandler() 49 | Internal list of data channels in le_dcs initialized
Jan 6 02:05:11 swi-mdm9x28-wp user.err Legato: =ERR= | modemDaemon[1206]/swiQmi T=main | swiQmi.c swiQmi_CheckResponse() 799 | Sending QMI_NAS_GET_NETWORK_TIME_RESP_MSG_V01 failed: rc=0 (), resp.result=1.[0x01], resp.error=74.[0x4a]
Jan 6 02:05:11 swi-mdm9x28-wp user.info Legato: INFO | modemDaemon[1206]/modemDaemon T=main | le_mrc.c RetrySyncNetworkTimeHandler() 1809 | Re-try: Unable to get network time: result -6
Jan 6 02:05:12 swi-mdm9x28-wp user.err Legato: =ERR= | modemDaemon[1206]/swiQmi T=main | swiQmi.c swiQmi_CheckResponse() 799 | Sending QMI_NAS_GET_NETWORK_TIME_RESP_MSG_V01 failed: rc=0 (), resp.result=1.[0x01], resp.error=74.[0x4a]
Jan 6 02:05:12 swi-mdm9x28-wp user.info Legato: INFO | modemDaemon[1206]/modemDaemon T=main | le_mrc.c RetrySyncNetworkTimeHandler() 1809 | Re-try: Unable to get network time: result -6
Jan 6 02:05:13 swi-mdm9x28-wp user.err Legato: =ERR= | modemDaemon[1206]/swiQmi T=main | swiQmi.c swiQmi_CheckResponse() 799 | Sending QMI_NAS_GET_NETWORK_TIME_RESP_MSG_V01 failed: rc=0 (), resp.result=1.[0x01], resp.error=74.[0x4a]
Jan 6 02:05:13 swi-mdm9x28-wp user.info Legato: INFO | modemDaemon[1206]/modemDaemon T=main | le_mrc.c RetrySyncNetworkTimeHandler() 1809 | Re-try: Unable to get network time: result -6
Jan 6 02:05:14 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[1176]/dcsDaemon T=main | dcsTechRank.c dcsTechRank_SelectDataChannel() 220 | Selected channel name 1
Jan 6 02:05:14 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[1176]/dcs T=main | dcs.c le_dcs_AddEventHandler() 635 | Adding channel handler for channel 1 of technology cellular
Jan 6 02:05:14 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[1176]/dcs T=main | dcs.c le_dcs_AddEventHandler() 675 | Event handler with reference 0xd79 and event ID 0xbfd added
Jan 6 02:05:14 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[1176]/dcs T=main | dcs.c le_dcs_Start() 421 | Starting channel 1 of technology cellular by app session with reference 0x7f5aa928
Jan 6 02:05:14 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[1176]/dcs T=main | dcs.c le_dcs_Start() 478 | Initiating technology to start channel 1 for app session 0x7f5aa928, request reference 0x2cf
Jan 6 02:05:14 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[1176]/dcsDaemon T=main | dcsServer.c TryStartTechSession() 1105 | Successfully initiated data channel 1 of technology 1
Jan 6 02:05:14 swi-mdm9x28-wp user.info Legato: INFO | dcsDaemon[1176]/dcs T=main | dcsTech.c le_dcsTech_Start() 338 | Request to start channel 1 of technology cellular
Jan 6 02:05:14 swi-mdm9x28-wp user.err Legato: =ERR= | modemDaemon[1206]/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]
Jan 6 02:05:14 swi-mdm9x28-wp user.err Legato: =ERR= | modemDaemon[1206]/le_pa T=main | pa_mdc_qmi.c StartSession() 1978 | Data connection failure Call End provided 1, Code 1012
Jan 6 02:05:14 swi-mdm9x28-wp user.err Legato: =ERR= | modemDaemon[1206]/le_pa T=main | pa_mdc_qmi.c StartSession() 1989 | Data connection failure Verbose Call End provided Type 6, Verbose 8
Jan 6 02:05:14 swi-mdm9x28-wp user.err Legato: =ERR= | modemDaemon[1206]/modemDaemon T=main | le_mdc.c le_mdc_StartSession() 1270 | Get Async Connection failure 1, 1012, 6, 8
Jan 6 02:05:14 swi-mdm9x28-wp user.err Legato: =ERR= | dcsDaemon[1176]/dcsCellular T=main | dcsCellular.c le_dcsCellular_Start() 1089 | Failed to start cellular connection 1; error: -6

Thanks in advance!

do you see any problem with “cm data connect &” or the sample app modemDemo?

“cm data connect &” give the following output:

After Running the modemDemo it just seems to start the app but seem to hang somewhere: it only outputs the following line:
Jan 6 00:28:55 swi-mdm9x28-wp user.info Legato: INFO | modemDemo[5081]/demoComponent T=main | demo.c _demoComponent_COMPONENT_INIT() 1061 | Running modemDemo

how is the following?

cm radio
cm data

For using the modemDemo, you need to type

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

All result is in /legato/systems/current/appsWriteable/modemDemo/smsChat.txt

cm data:
image

cm radio:

After running the command you sent it seems to be able to connect to cellular, I also rebooted a few times and now it seems to be able to connect every single time…

Do you have an idea what could be wrong with my app? I have no idea what could be the problem

i have no idea, but the easiest way is to port the modemdemo app to your app
(not sure if it relates to weak signal in your environment)

The thing is basically that is what i did, i am executing the exact same things as the modemDemo app.

The only thing i didn’t do is implement these handlers:

But i looked at the code of theses and the shouldn’t affect the ability to connect to cellular…

then maybe you port your code to the modemDemo app which has proven to be working on your side

Retried the modemDemo app, now it isn’t wiorking anymore…

Before i just seemed to get lucky as it is working 30% of the time…

have you checked if “cm radio” or AT!GSTATUS? is having weak signal?
Are you using FW R16?

I also already treid at a different location with signal strength 4/5 & 5/5.

I am using FW Release 16 & Legato version 19.11.2

are you using mangoh board?
Not sure if this is hardware issue causing the instability

Yes i am using a mangOH red board, with a WP7607. I also tried a WP8548 but the Problem seems to persist.

do you find problem with AT!SCACT to share data to host platform?

This can isolate if this is legato problem only…

AT!SCACT returns “OK”
image

For reference, i am now at an location with better signal strength:

It returns OK, but the data connection does not get established :confused:

Do you mean after aT!SCACT, the host platform can get data establishment?

No sorry.
I mean it can not establish connection…

The weird thing is the command returns OK. But on the platform itself cm data shows no connection and the ping does not work.

at!SCACT is not for legato to establish data, it is for host platform to establish data channell

Ah ok, will try that!

But i am not sure if i found the Problem, i rechecked the module i was using and it was a 7608 which is for China/India… I now switched to a 7607 (which is for europe) and everything works (for now).

But the thing that i can’t understand is why it sometimes works with the 7608 and sometimes it doesn’t.
I get that the WP7608 isn’t designed for the region i’m in, but shouldn’t it still be able to somewhat function? Especially when i get 4/5 signal strength?