SIM Registration state is changing in mangoh green wp8548

hi,

I am trying to establish gprs connection using le_data api
Before this I am checking Sim card inserted is registered or not
For checking SIM state I am using “le_cellnet” service api
i.e. “le_cellnet_GetNetworkState”

While executing program, Network state of cellnet service is changing state i.e
state = 0, Network is off and not registered.
state = 1, Network with emergency call only
if state = 2 , Network is home network etc
Like this I am getting variable state as 2, 0
due to that If state is 2 and Gprs is connected then in very less time state get changed and Gprs get disconnected.

Can any one tell me, Which service api of legato shoulf I use to get proper registration state and connect ineternet.

and

There are two services one is modem service and another is cellular service, So which service should I use for GPRS Connection and SIM registration checking.

Hi,

can you first test on AT command port (microcom /dev/ttyAT -E)?
You can use AT+CREG? for the registration status.
This can isolate if this is network issue or legato issue.

Hi,
For legato API, you may also check information here:

Hi @klin and @jyijyi

Thank you for reply!

Now SIM Registration is working fine.

In my code, I am using le_mrc service to check network availability on interval basis.

Can you tell me difference between “le_mrc” service and “le_cellnet” service
because both give information of network ?

Ideally which should be used for GSM network related service checking?