* Query on how WWAN and Modem interact
@ 2019-03-29 4:35 Ajay Garg
2019-04-05 12:30 ` Enrico Weigelt, metux IT consult
0 siblings, 1 reply; 2+ messages in thread
From: Ajay Garg @ 2019-03-29 4:35 UTC (permalink / raw)
To: linux-kernel
Hi All.
I am sorry upfront if this might seem like a stupid question.
I am wanting to have some insight on how a modem plugs into the
linux-kernel at architecture level.
First a bit of history.
I have prior experience of using an onboard-modem on a ubuntu, via
support from modem-manager. There, after the modem was (successfully)
set up via "mmcli", the "wwan" interface started showing in
"ifconfig", which then presented itself to be used just like any other
wifi/ethernet listings in "ifconfig".
Now, we are in a bit of situation, where only the AT-interface (of the
modem) might be available to us (via a serial /dev/tty interface).
Also, using AT-commands to actually set up sockets is also fine.
Now, my query is once the AT-commands succesfully set up a socket, how
does that link to "wwan" interface in "ifconfig" listings.
Will be grateful to have the experts throw some light on this.
Thanks and Regards,
Ajay
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Query on how WWAN and Modem interact
2019-03-29 4:35 Query on how WWAN and Modem interact Ajay Garg
@ 2019-04-05 12:30 ` Enrico Weigelt, metux IT consult
0 siblings, 0 replies; 2+ messages in thread
From: Enrico Weigelt, metux IT consult @ 2019-04-05 12:30 UTC (permalink / raw)
To: Ajay Garg, linux-kernel
On 29.03.19 05:35, Ajay Garg wrote:
> I am wanting to have some insight on how a modem plugs into the
> linux-kernel at architecture level.
Well, that depends ... which type of modem ? which protocols ?
The most common case are the classical serial modems, attached to
some uart (including those isa or pci cards that just have speaking AT
commands. Here, somebody needs to do the
dialing (eg. 'chat' command) - after dialing the some daemon
for the corresponding (ppp, uucp, ax25, ...) needs to take over.
With async-ppp (ppp over uart) it goes like this:
* pppd is started, sets up tty, etc
* pppd calls a chat script (usually using 'chat' command) for doing
the dialing (AT commands) - this subprocess gets the fd to the
tty as its stdin/stdout
* when this finished, it takes back control and does some ppp handshake
(line probing, authentication, address/routing handshake, ...)
* then it creates a new ppp* device, attaches the ppp line discipline
to the tty and assignes this to the new device
* the unix black magic: line disciplies
-> these are special filters that can be attached to a tty for
intercepting the traffic, eg. for job control or trivial line
editing via a terminal, etc
-> the kernel also has a ppp line discipline which intercepts ppp
frames that contain IP packets puts them into the ppp network
interface's rx queue (so pppd won't ever see them), as well as
writing out the outbound packets back to the tty
Of course, there're are also lots of other kind of modems and protocols
that work differently ...
> Now, we are in a bit of situation, where only the AT-interface (of the
> modem) might be available to us (via a serial /dev/tty interface).
That's the classic old fashioned way - pppd package comes with tools to
handle that. (by the way: I wouldn't like to cope w/ complicated things
like modemmanger, etc).
> Also, using AT-commands to actually set up sockets is also fine.
What do you mean w/ sockets ?
Are you talking about basebands with integrated ip stack ? Those are
nice for tiny MCUs w/o any OS, but tricky to properly integrate into
into the berkeley socket api.
What chips exactly are you talking about ?
> Now, my query is once the AT-commands succesfully set up a socket, how
> does that link to "wwan" interface in "ifconfig" listings.
If the baseband/modem really does the whole IP stack, including sockets,
on its own, the answer most likely is: not at all.
But that depends on what baseband/modem exactly you're talking about.
--mtx
--
Enrico Weigelt, metux IT consult
Free software and Linux embedded engineering
info@metux.net -- +49-151-27565287
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-04-05 12:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-29 4:35 Query on how WWAN and Modem interact Ajay Garg
2019-04-05 12:30 ` Enrico Weigelt, metux IT consult
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®