Hi, I am running fx30_Cat1_2.00 image on FX30 LTE Cat 1 modem… i.e. Legato 19.11.5
I am legato application that runs well. Is able to connect etc. There is one scenario that it does not handle. But looking at the docs and code I think legato should be handing it…
I use the le_data_Request command to setup up a data connection to use in my application. Occasionally I need to force a “Update location” on the SIM, which forced it off the network to apply updates and the idea is that the device then reconnects. However legato never recovers until I restart the modem.
In the code, I have event handlers set up for le_data_AddConnectionStateHandler and le_mrc_AddNetRegStateEventHandler…
When forcing the SIM off the network, only the ConnectionStateHandler fires with a “not connected” event.
My understanding is that legato should automatically try and restart the connection but it does not. No network event is fired… My app never goes back online because the connection is never re-established.
Running cm data shows “Connected: no”…
So it seems legato just does not try to re-connect. Am I supposed to le_data_Release when the connection event is triggered and then try call le_data_Request again?
These are modems that run in the field. i.e. it needs to manage all situations itself… they are often days away from someone that can do anything to them. So really the legato application must deal with these scenarios… hence why I am trying to get to the bottom of how the modem/legato manage this situation internally so that I can get the app to respond accordingly.
Power: ON
Current Network Operator: vodafone UK
Current RAT: UMTS network (LE_MRC_RAT_UMTS)
Status: Registered to a roaming network (LE_MRC_REG_ROAMING)
Signal: Good signal strength (3) PS: Packet Switched Not registered (LE_MRC_REG_NONE)
Yes I saw this in the previous link… But this code does not actually deal with my scenario… i.e. the connection state event fires with isConnected = false… and no other event fires…
Are you suggesting I call GoOffline() from line 1020? And then call GoOnline straight after?
Force the SIM off the network (use Update Location on SIM provision portal… which clear the data in HLR and requires a full re-connect from the SIM etc)
Then at this point, the modem sits in its offline state and is not able to reconnect.
I will try with the cm commands to see if I can re-create it there…
Push SIM off network using “Update location” in SIM portal
“cm data” now shows off network
“cm data connect” shows error “LE_FAULT”
terminal output below…
root@fx30:~# cm radio
Power: OFF
Current Network Operator:
Current RAT: Module not registered on network, RAT not available
Status: Not registered and not currently searching for new operator (LE_MRC_REG_NONE)
Signal: No signal strength (0)
PS: Packet Switched Not registered (LE_MRC_REG_NONE)
root@fx30:~# cm radio on
root@fx30:~# cm radio
Power: ON
Current Network Operator: vodafone UK
Current RAT: UMTS network (LE_MRC_RAT_UMTS)
Status: Registered to a roaming network (LE_MRC_REG_ROAMING)
Signal: Weak signal strength (2)
PS: Packet Switched Not registered (LE_MRC_REG_NONE)
root@fx30:~# cm data
Index: 1
APN: *******
PDP Type: IPV4
Connected: no
root@fx30:~# 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
root@fx30:~# cm data
Index: 1
APN: ********
PDP Type: IPV4
Connected: yes
Interface: rmnet_data0
Family[IPv4]: inet
IP[IPv4]: 10.178.194.159
Gateway[IPv4]: 10.178.194.160
Dns1[IPv4]: 8.8.8.8
Dns2[IPv4]: 212.9.0.136
root@fx30:~# cm radio
Power: ON
Current Network Operator: vodafone UK
Current RAT: UMTS network (LE_MRC_RAT_UMTS)
Status: Registered to a roaming network (LE_MRC_REG_ROAMING)
Signal: Weak signal strength (2)
PS: Packet Switched Registered to a roaming network (LE_MRC_REG_ROAMING)
root@fx30:~# cm data connect
Checking if device 'rmnet_data0' is up ... ok
Routing inet ... ok
Updating /etc/resolv.conf ... ok
Updating /etc/resolv.conf ... ok
root@fx30:~# cm data
Index: 1
APN: ********
PDP Type: IPV4
Connected: no
root@fx30:~# cm data connect
Setting up profile 1
Connecting ... failed
Wed Feb 15 07:11:33 GMT 2023 - Connection Failure: LE_FAULT
root@fx30:~#
Below are the logread traces. The first file below is the cm radio on and cm data connect sequence which connect successfully…
The only way to re-establish a connection seems to be to turn the radio power off and on again…
However that seems rather heavy handed and I don’t actually know for sure what state I am in as all I get in my application is a ConnectionState event saying the connection is closed… that could be for various reasons… so powering down and up the modem at this point seems like bad practise.
BTW, I don’t see you enter “cm data connect -1 &” to go offline after pushing SIM off network using “Update location” in SIM portal, not sure if it helps…
You might also need to try with another host Ubuntu PC and see if it only happens to legato data connection.
I wonder if this is a modem FW problem instead of legato problem.
Unfortunately I can’t really use this as a work around… as I don’t know how to detect this is the problem the system is having. I can’t just power down the radio everytime I have a disconnect on the data channel…
This happens when setting/config needs to change on the SIM or when diagnosing network / modem issues. i.e. it should force a full re-registration process with the network… I’ll try the destributor as well