Re: NetworkManager, dbus, 3G USB Modems and SMS



On Mon, 2010-02-08 at 16:23 +1000, Dan Irwin wrote:
> Hello,
> 
> I posted something like this to the fedora list late last week, but
> figured I should try the proper channels.
> 
> Can I write a program which will talk to NetworkManager or
> ModemManager over dbus to send and receive sms messages? Will this
> work while connected to a mobile broadband service on the same modem?

At the moment, ModemManager only has SMS send implemented; reading
messages isn't implemented yet even though the API is there.  We focused
on making data connections reliable first, and I feel like that's only
just really happened for most devices, so now perhaps we can focus on
SMS.

Not all devices can send/receive SMS while a data session is enabled.
That's generally because not all devices export two AT-capable serial
ports (though most GSM modems do), and even if they do, sometimes that
second serial port is only capable of relaying basic status.

But while disconnected, almost all GSM devices should be capable of
sending and receiving SMS messages.

> Is anyone out there already working on something like this?

Not yet; we'll get to it eventually but if you want to help push this
forward, that would be great.

> I'm sure we all know that lots of 3G/GSM usb modems and mobile
> telephones present an AT style modem interface over which sms can be
> sent and retrieved.

Yeah, we have to a bit careful about this though.  Some considerations:

1) the SMS D-Bus API needs some protections (probably via PolicyKit)
because otherwise you could have malicious user applications start
SMS-bombing, which isn't good.

2) different phones support different character sets, so we need to
detect what character sets the phone supports (via standard AT commands)
and convert the incoming UTF-8 SMS message into one of the sets
supported by the phone

3) not all modems (even GSM ones) use standard AT commands to read SMSs.
We may need to develop specialized plugins for devices that deviate from
the standards.

But in any case, a generic SMS send/receive mechanism would have a lot
of use and would allow us to figure out what devices do need the
special-casing.

A good start would be simple patches to inspect the modem's supported
character sets during initialization time, and then to convert SMSes
that come in from D-Bus to the character set, encode them for the AT
command, and send them out.  That's a fairly contained, simple patch.
Interested? :)

> I imagine the ideal solution is some kind of sms service provider,
> which itself could be accessed via dbus, with integration in email or
> IM clients.

Yup.  Some programs already provide some of this functionality over
D-Bus (some of the open-moko stack does this) but the problem is that
only one thing can read the serial port at one time; thus most
functionality should be in the same program.  That means we'll have to
add it to ModemManager, but that's not a big deal.  Just a bit of work.

> I have had a quick look at the NetworkManager dbus api documentation,
> but I have not got my head around it all yet.

Most of the direct interaction with the modem should be through
ModemManager, not NetworkManager.  I don't really think NM should
duplicate all of the ModemManager API, so we should instead concentrate
on making sure that ModemManager provides what we need.

> And I'm aware of gnokii/gammu wammu et al, these solutions require
> exclusive access to the usb serial interface of a 3g modem.

Yeah, everything that talks to the modem does.  That tends to lead to
some duplication of effort because not every program does everything
that everyone needs, or each program targets a separate use-case.
Ideally we'd like ModemManager to target almost all of the common
use-cases, including SMS.

Dan




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]