Discussion:
Encapsulating packets for multiplexed modem?
(too old to reply)
addams013
2007-02-01 12:48:05 UTC
Permalink
I'm trying to use an external USB wireless modem in a "multiplexed
mode". This means that the modem will respond to PPP commands and AT
commands at the same time, provided that they are couched in simple
packets that disambiguate them to the modem.

One packet header tells the modem that the packet is meant to be
processed as data (PPP). Another packet header informs the modem that
the packet is meant to be processed as an AT command.

This is useful because the modem is aware of certain things that it
would be useful for the Linux box to know and keep track of -- signal
strength, location, and a number of other pieces of information. That
information can be retrieved with AT commands; I'd like to get it
without having to tear down and re-establish PPP.

I'm trying to figure out which functions in Linux (kernel 2.4.32) I
will need to modify in order to do this. I'm looking at
ppp_async_push() and ppp_async_input() in ppp_async.c. Can anyone
with insight into the kind of thing I'm trying to do let me know if
I'm headed in the right direction, or let me know if there's some
other direction I should be going in, or just be willing to lend me
some friendly advice? Kernel hacking has got me a little nervous.
Unruh
2007-02-06 18:13:24 UTC
Permalink
Post by addams013
I'm trying to use an external USB wireless modem in a "multiplexed
mode". This means that the modem will respond to PPP commands and AT
commands at the same time, provided that they are couched in simple
packets that disambiguate them to the modem.
One packet header tells the modem that the packet is meant to be
processed as data (PPP). Another packet header informs the modem that
the packet is meant to be processed as an AT command.
This is useful because the modem is aware of certain things that it
would be useful for the Linux box to know and keep track of -- signal
strength, location, and a number of other pieces of information. That
information can be retrieved with AT commands; I'd like to get it
without having to tear down and re-establish PPP.
I'm trying to figure out which functions in Linux (kernel 2.4.32) I
will need to modify in order to do this. I'm looking at
ppp_async_push() and ppp_async_input() in ppp_async.c. Can anyone
with insight into the kind of thing I'm trying to do let me know if
I'm headed in the right direction, or let me know if there's some
other direction I should be going in, or just be willing to lend me
some friendly advice? Kernel hacking has got me a little nervous.
It should. And playing with a carefully crafted piece of code should get
you far more nervous.
Anyway, the modem already has such. One second of abxolute silence, +++ and
another second of absolute silence tells teh modem to go into command mode.
And then there is an AT commend (ATO0 on the modem I have immediate access
to) to tell the modem to go back into
communication mode. Of course, the far modem may well hang up the line when
your modem behaves in this way, but you cannot make an ommelete without
breaking eggs.

Alternatively buy a modem with separate command and data links. I believe
they exist-- and cost a lot. But then if you value your time at more than
10 cents an hour, you would probably be able to buy the modem manufacturing
company with the time you spend on your project.

I do not know if this is friendly advice.
James Carlson
2007-02-14 13:31:35 UTC
Permalink
Post by addams013
I'm trying to figure out which functions in Linux (kernel 2.4.32) I
will need to modify in order to do this. I'm looking at
ppp_async_push() and ppp_async_input() in ppp_async.c. Can anyone
Yep, this is the right place to be looking.
Post by addams013
with insight into the kind of thing I'm trying to do let me know if
I'm headed in the right direction, or let me know if there's some
other direction I should be going in, or just be willing to lend me
some friendly advice? Kernel hacking has got me a little nervous.
There's nothing quite like working without a net.
--
James Carlson, Solaris Networking <***@sun.com>
Sun Microsystems / 1 Network Drive 71.232W Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757 42.496N Fax +1 781 442 1677
Wilson
2007-03-16 15:59:44 UTC
Permalink
Post by addams013
I'm trying to use an external USB wireless modem in a "multiplexed
mode". This means that the modem will respond to PPP commands and AT
commands at the same time, provided that they are couched in simple
packets that disambiguate them to the modem.
One packet header tells the modem that the packet is meant to be
processed as data (PPP). Another packet header informs the modem that
the packet is meant to be processed as an AT command.
This is useful because the modem is aware of certain things that it
would be useful for the Linux box to know and keep track of -- signal
strength, location, and a number of other pieces of information. That
information can be retrieved with AT commands; I'd like to get it
without having to tear down and re-establish PPP.
I'm trying to figure out which functions in Linux (kernel 2.4.32) I
will need to modify in order to do this. I'm looking at
ppp_async_push() and ppp_async_input() in ppp_async.c. Can anyone
with insight into the kind of thing I'm trying to do let me know if
I'm headed in the right direction, or let me know if there's some
other direction I should be going in, or just be willing to lend me
some friendly advice? Kernel hacking has got me a little nervous.
You don't need to modify the kernel or pppd; you need to run a daemon
that will implement the mux protocol. For GSM 07.10 style muxing,
there exists a project already and it works, although the
documentation is a little hairy. Google "gsmmux" - it is the first
hit.

For Wavecom-style muxing, there is nothing yet, but I am working on
and close to completing a daemon to implement this.

The first one, and my own project, both operate by connecting to the
modem, putting it into MUX mode (AT+CMUX=1 for gsm 07.10, AT+WMUX=1
for Wavecom) and then creating 2 pseudo-tty devices which you can talk
to with minicom and pppd.

Hope this helps.
-john lamb

Loading...