Re: GSM modem driver with multiplexing
- From: "Slava M. Usov" <stripit.slough@xxxxxxx>
- Date: Wed, 28 Sep 2005 19:26:22 +0200
"Gniewko" <sztank@xxxxxxxxx> wrote in message
news:1127900762.131757.272260@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Hello,
> I need to write a driver for GSM modem connected to serial port. The
> driver must implement multiplexing of a serial port. That kind of
> multiplexing is needed because I want to have PPP connection opened and
> in the same time talking with modem through AT commands.
>
> I'm not sure witch solution will be convinied. I was thinking about
>
> 1. Writing driver that create virtual serial ports by multiplexing
> existing serial port to which modem is connected. Then install unimodem
> for one of the virtual serial port and talk to other virtual ports from
> my application.
> This is not elegant - I would like to make all this multiplexing more
> invisible.
You don't have many options here. Serial device objects are exclusive, and
when TAPI/RAS/NDIS has it open, nobody else can talk to this device. So you
will have to have another device object that can be used by your application
to talk to the modem.
Doing that is conceptually simple, it is a filter/bus design, you just sit
on top the serial driver and when you want to talk to your modem while it's
pumping data, you can suspend the data IO on the "normal" serial device
object and switch the modem into the command mode, talk to it, switch it
back to the online mode and resume the data IO. But implementing this
suspend/resume can easily become a nightmare.
There are additional complications, too. For example, your driver will need
to understand that it is your modem that is connected to the serial port. If
the modem supports the serial PnP protocol, then this is not a problem and
the OS will load your driver when your modem is connected and the OS will
tell your driver which device it should handle. Also, your driver might need
to monitor the communications on the normal serial device object to keep
track of the modem state.
Writing a modem driver might look like a better choice, but it is not,
because that would have to be a WAN miniport driver and they have no idea
which device they are talking to. Anything else is unsupported and
undocumented and is probably even more painful to implement.
S
.
- Follow-Ups:
- Re: GSM modem driver with multiplexing
- From: Gniewko
- Re: GSM modem driver with multiplexing
- References:
- GSM modem driver with multiplexing
- From: Gniewko
- GSM modem driver with multiplexing
- Prev by Date: DiskId32 and SATA drives
- Next by Date: I/O Methods - Misc. Questions
- Previous by thread: GSM modem driver with multiplexing
- Next by thread: Re: GSM modem driver with multiplexing
- Index(es):
Relevant Pages
|