Yes, this is the easiest/standard way.
This is what I've tried to do :
1. Disabling /dev/ppp driver without sending PPP protocol disconnection, send AT command through tty, re-enable /pev/ppp and restart a PPP handshake.
It works for 3G modems, but not for the others : if I try to restart a PPP handshake, provider send me (through a PPP/LCP reject) : "PDP context deactivated, no network protocol available".
My point of view : it works for 3G modems, probably because PDP contexts are handled on the UTRAN network, which is obviously separated from standard GSM network. Provider consider the modem still connected, and doesn't see any issue restarting a PPP handshake and giving the same IP address.
2. "Short-circuit" /dev/ppp driver without disabling it, send commands through tty. I've tried many different solutions, without success (nothing on serial line or /dev/ppp crash or ...). It seems ppp driver is not made for handling serial "raw" data. Into the driver source code, the callback function handling serial communication returns an error with this comment : "Write on the tty does nothing, the packets all come in from the ppp generic stuff".
Unfortunately, I don't have time to modify this Linux ppp driver.
This is a pity, because technologically : it works ! I've tested it.
|