modem data disconnection
Hi everyone,
I have some questions about ofono and the data disconnection.
With debug information, after that my modem is online (connected to network via ppp0 interface), when I go back to offline (by setting online property to false), I can see that the modem network connection is down with :
ofonod[1039]: Modem: < ~\377}#\300!}%}#} }$\205r~
and PPP interface is removed :
ofonod[1039]: udevng.c:remove_device() /sys/devices/virtual/net/ppp0
I searched how ofono stops the modem connection, with escape sequence for example, but ofono does not seem to use it during offline sequence.
How does ofono handles it ?
How ofono (or gatppp, maybe ?) puts the modem network connection down (if it does) ?
Thank you in advance,
Best regards,
Mylene
Hi Mylene,
Quoted 5 lines · Mylene JOSSERAND
Hi everyone,
I have some questions about ofono and the data disconnection.
Quoted 8 lines
With debug information, after that my modem is online (connected to network via ppp0 interface), when I go back to offline (by setting online property to false), I can see that the modem network connection is down with :
ofonod[1039]: Modem: < ~\377}#\300!}%}#} }$\205r~and PPP interface is removed :
ofonod[1039]: udevng.c:remove_device()/sys/devices/virtual/net/ppp0I searched how ofono stops the modem connection, with escape sequence for example, but ofono does not seem to use it during offline sequence.
In this case the ofono_gprs_context atom is being created in post_online state. Since you go offline, the modem goes back to post_sim state and any atoms created in post_online() are destroyed. E.g. the atom's remove() method is called. This removes all PPP processing from the chat and forces it back into AT command mode.
There was a similar thread recently about SIM Removal on HE910 exhibiting similar behavior. In that case the modem went back to pre_sim state, so all post_sim and post_online atoms were destroyed.
Quoted 1 line
How does ofono handles it ?
Solution is to put gprs_context creation into pre_sim on modems that reply to CFUN=4 or equivalent before sending the final PPP frame.
Quoted 2 lines
How ofono (or gatppp, maybe ?) puts the modem network connection down (if it does) ?
oFono detects PPP end-of-session frames as well as the NO CARRIER result code. See gatchat/gathdlc.c new_bytes() and g_at_hdlc_set_no_carrier_detect()
Regards,
-Denis
Hi Denis,
Quoted 6 lines
Quoted 6 lines
I have some questions about ofono and the data disconnection.
With debug information, after that my modem is online (connected to network via ppp0 interface), when I go back to offline (by setting online property to false), I can see that the modem network connection is down with :
ofonod[1039]: Modem: < ~\377}#\300!}%}#} }$\205r~
Quoted 7 lines
Quoted 5 lines
and PPP interface is removed :
ofonod[1039]: udevng.c:remove_device()/sys/devices/virtual/net/ppp0I searched how ofono stops the modem connection, with escape sequence for example, but ofono does not seem to use it during offline sequence.
In this case the
ofono_gprs_contextatom is being created inpost_onlinestate. Since you go offline, the modem goes back topost_simstate and any atoms created inpost_online()are destroyed. E.g. the atom'sremove()method is called. This removes all PPP processing from the chat and forces it back into AT command mode.
ok thank you for the explanation.
How atoms force to go back into AT commands mode ? Where is it done in the code ?
Quoted 2 lines
There was a similar thread recently about SIM Removal on HE910 exhibiting similar behavior. In that case the modem went back to
pre_simstate, so allpost_simandpost_onlineatoms were destroyed.
I will look to it.
Quoted 9 lines
Quoted 2 lines
How does ofono handles it ?
Solution is to put
gprs_contextcreation intopre_simon modems that reply to CFUN=4 or equivalent before sending the final PPP frame.Quoted 2 lines
How ofono (or gatppp, maybe ?) puts the modem network connection down (if it does) ?
oFono detects PPP end-of-session frames as well as the NO CARRIER result code. See
gatchat/gathdlc.cnew_bytes()andg_at_hdlc_set_no_carrier_detect()
I noticed the gathdlc::new_bytes method when I was looking into the code but I did not understand what this file is it for. Thanks for the hints.
Best regards,
Mylene
Hi Mylene,
Quoted 4 lines
ok thank you for the explanation.
How atoms force to go back into AT commands mode ? Where is it done in the code ?
Each atom behaves differently. Refer to the atom's remove() function for details. E.g. the 'atmodem' gprs_context atom uses g_at_ppp_unref() and g_at_chat_resume() to force the chat out of PPP mode. This is why you see "garbage" on the AT trace. In reality it is just a final HDLC frame.
Regards,
-Denis