halting from ppp during GPRS connection
Hello!
I have an application on a linux box that opens a GPRS APN via pppd and
feeds data to a remote application. At some point of time it is
necessary to send a SMS to another destination. The first idea that
came to me was to send a SIGSUSP to pppd, get hold of the modem send
the SMS and resume pppd.
Something does not convince me this is the correct way, I suspect I
would garble thing up at ppp protocol level.
Any suggestion?
TIA
/CM
Re: halting from ppp during GPRS connection
On 2005-11-05, [email]capitanmutanda@hotmail.com[/email] <capitanmutanda@hotmail.com> wrote:[color=blue]
> I have an application on a linux box that opens a GPRS APN via pppd and
> feeds data to a remote application. At some point of time it is
> necessary to send a SMS to another destination. The first idea that
> came to me was to send a SIGSUSP to pppd, get hold of the modem send
> the SMS and resume pppd.
>
> Something does not convince me this is the correct way, I suspect I
> would garble thing up at ppp protocol level.[/color]
AFAIK, garbling will happen unless you have a way of mixing two link
layers (RS232 with three wires? Or Bluetooth or even IrDA?) in to one.
If you're lucky, you'll have two, say, rfcomm links to the modem and you
can have one for ppp and still send AT commands through the other. Have
a look at your modem manual. The industrial ones might even have this
use case documented.
-Mikko
Re: halting from ppp during GPRS connection
Mikko Rapeli ha scritto:
[color=blue]
> On 2005-11-05, [email]capitanmutanda@hotmail.com[/email] <capitanmutanda@hotmail.com> wrote:[color=green]
> > I have an application on a linux box that opens a GPRS APN via pppd and
> > feeds data to a remote application. At some point of time it is
> > necessary to send a SMS to another destination. The first idea that
> > came to me was to send a SIGSUSP to pppd, get hold of the modem send
> > the SMS and resume pppd.
> >
> > Something does not convince me this is the correct way, I suspect I
> > would garble thing up at ppp protocol level.[/color]
>
> AFAIK, garbling will happen unless you have a way of mixing two link
> layers (RS232 with three wires? Or Bluetooth or even IrDA?) in to one.
> If you're lucky, you'll have two, say, rfcomm links to the modem and you
> can have one for ppp and still send AT commands through the other. Have[/color]
Mikko thanks for your reply. If I understand corectly I could get hold
of the phone modem via bluetooth, simply with a dongle on my PC, and
send the SMS that way. However there is a fly in the ointment... as a
prototype this is ok but the production thing does not have these
capabilities (arm embedded linux on a very small board --> low cost).
What I need to do is send via SMS the IP address received from the
GGSN. I'm afraid that I have only one way out and have to build some
sort of extension to pppd so that when it receives SIGUSR2 it will +++
the modem send the SMS and resume ppp
I was trying to avoid the NIH syndrome....
Tnx
/CM
so that is
Re: halting from ppp during GPRS connection
On 2005-11-06, Capitan Mutanda <capitanmutanda@hotmail.com> wrote:[color=blue]
> What I need to do is send via SMS the IP address received from the
> GGSN. I'm afraid that I have only one way out and have to build some[/color]
If the IP address resolution is the only requirement for an SMS, then I'd use a
dynamic DNS service instead, but even that suggest you get a public IP address
from the GPRS network and that the GGSN allows inbound (TCP?) traffic.
These assumptions usually cost money in subscription at least, so I'd
use a central server to which mobile clients connect even from NAT and
HTTP proxy networks -- but these issues of course depend on the actual
application too.
[color=blue]
> sort of extension to pppd so that when it receives SIGUSR2 it will +++
> the modem send the SMS and resume ppp[/color]
Linux side won't be the problem, I think. It's the GPRS modem. In needs to
keep the PPP state too.
The guys with more PPP knowledge can perhaps comment more on this...
-Mikko
Re: halting from ppp during GPRS connection
Mikko Rapeli ha scritto:
[color=blue]
> On 2005-11-06, Capitan Mutanda <capitanmutanda@hotmail.com> wrote:[color=green]
> > What I need to do is send via SMS the IP address received from the
> > GGSN. I'm afraid that I have only one way out and have to build some[/color]
>
> If the IP address resolution is the only requirement for an SMS, then I'd use a
> dynamic DNS service instead, but even that suggest you get a public IP address
> from the GPRS network and that the GGSN allows inbound (TCP?) traffic.[/color]
Some mobile operators permit traffic flow between terminals on the same
GPRS core net.
This functionality is a configuration parameter in GGSN (at least in
Nokia GGSN)
so I can avoid public IPs and just need to stay within the same mobile
net.
It would be much easier if I had the GGSN establish a tunnel directly
to a server somewhere on the net with a public IP; it could then act as
a router. But this means
much more money and arrangements with mobile operators. The central
server would also be a single point of failure or need cluster and
similar stuff for reliability.
What I'm trying to do is a sort of P2P with this fly in the ointment
due to the variable IP address the GGSN could assign me
/CM
Re: halting from ppp during GPRS connection
On 2005-11-06, Capitan Mutanda <capitanmutanda@hotmail.com> wrote:[color=blue]
> What I'm trying to do is a sort of P2P with this fly in the ointment
> due to the variable IP address the GGSN could assign me[/color]
Yes, it's a lot trickier to have a server in the mobile host.
Good luck,
-Mikko
Re: halting from ppp during GPRS connection
[email]capitanmutanda@hotmail.com[/email] napisaĆ(a):[color=blue]
> Hello!
>
> I have an application on a linux box that opens a GPRS APN via pppd and
> feeds data to a remote application. At some point of time it is
> necessary to send a SMS to another destination. The first idea that
> came to me was to send a SIGSUSP to pppd, get hold of the modem send
> the SMS and resume pppd.
>
> Something does not convince me this is the correct way, I suspect I
> would garble thing up at ppp protocol level.
>
> Any suggestion?
>
> TIA
>
> /CM
>[/color]
Depending on a mobile phone/modem you are using, it may support
multiplexing protocol which should give you 3 (at least in case of
siemens gsm module) virtual serial ports. One can be used for GPRS
others for other tasks such as SMS (manual should give you info what
can/cannot be on each virtual serial ports). As for drivers, they are
available for Windows (have not seen for Linux but it does not mean they
are not available) along with source code. Multiplexing protocol itself
is also described somewhere - in case no Linux implementation available.
Maciek.