* Getting started (serial GPRS modem)
@ 2012-09-11 13:17 Erik
2012-09-12 4:49 ` Denis Kenzior
0 siblings, 1 reply; 7+ messages in thread
From: Erik @ 2012-09-11 13:17 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 1569 bytes --]
Hi!
I've been looking at ofono for quite some time now. A couple of years ago I
wrote a lot of code to interface a GPRS modem. Now I need to do basically
the same again and I wonder if ofono would be a good idea to use.
The modem is not supported by ofono out of the box (no driver for it in the
tree).
First of all, I must say that I really miss some kind of "getting started"
information on the home page. Maybe I have just not found it. Is there such
a thing?
Second, the modem is a serial GPRS modem connected through a serial line.
This has to be farily common. Isn't there a simple way of just testing
ofono without adding udev rules, writing drivers, etc? What I would like is
basically to start ofonod with a path to the serial device, telling it to
use only standard (not device-specific) AT commands.
I don't think what I'd like to do is possible. So I added an udev rule in
the form of:
KERNEL=="ttyUSB*", ENV{OFONO_DRIVER}="nokia"
This gives me some indication that something happens when I start ofonod:
ofonod[21742]: plugins/udev.c:add_modem()
/devices/pci0000:00/0000:00:06.0/usb2/2-2/2-2:1.0/ttyUSB0/tty/ttyUSB0
(atmodem)
How do I proceed from here?
test/llist-modems gives me nothing.
Do the existing drivers check that the modem is actually a modem of that
type (nokia in this case)?
I am not looking for anything fancy. I basically only want to set up a GPRS
connection and maybe do operator selection.
No voice, no SMS, nothing more.
I tried this with the ofono-1.10 release.
Thanks,
Erik
[-- Attachment #2: attachment.html --]
[-- Type: text/html, Size: 1678 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Getting started (serial GPRS modem)
2012-09-11 13:17 Getting started (serial GPRS modem) Erik
@ 2012-09-12 4:49 ` Denis Kenzior
2012-09-12 8:40 ` Erik
0 siblings, 1 reply; 7+ messages in thread
From: Denis Kenzior @ 2012-09-12 4:49 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 2824 bytes --]
Hi Erik,
On 09/11/2012 08:17 AM, Erik wrote:
> Hi!
>
> I've been looking at ofono for quite some time now. A couple of years
> ago I wrote a lot of code to interface a GPRS modem. Now I need to do
> basically the same again and I wonder if ofono would be a good idea to use.
>
> The modem is not supported by ofono out of the box (no driver for it in
> the tree).
>
> First of all, I must say that I really miss some kind of "getting
> started" information on the home page. Maybe I have just not found it.
> Is there such a thing?
>
Formal getting started documentation is lacking at the moment.
Documentation contributions are always welcome ;)
There are plenty of working examples to learn from however.
> Second, the modem is a serial GPRS modem connected through a serial
> line. This has to be farily common. Isn't there a simple way of just
> testing ofono without adding udev rules, writing drivers, etc? What I
> would like is basically to start ofonod with a path to the serial
> device, telling it to use only standard (not device-specific) AT commands.
We have tried that, unfortunately we have yet to encounter a piece of
hardware that can be driven entirely using standard AT commands. There
are too many vendor commands and behavioral quirks that have to be
accounted for.
>
> I don't think what I'd like to do is possible. So I added an udev rule
> in the form of:
>
> KERNEL=="ttyUSB*", ENV{OFONO_DRIVER}="nokia"
Are you picking a driver at random or is it indeed a Nokia modem?
>
> This gives me some indication that something happens when I start ofonod:
>
> ofonod[21742]: plugins/udev.c:add_modem()
> /devices/pci0000:00/0000:00:06.0/usb2/2-2/2-2:1.0/ttyUSB0/tty/ttyUSB0
> (atmodem)
>
> How do I proceed from here?
>
> test/llist-modems gives me nothing.
>
> Do the existing drivers check that the modem is actually a modem of that
> type (nokia in this case)?
No, but the list of modem drivers that support a serial port is only a
subset of all the drivers available. See add_modem() function in
plugins/udev.c for more details. The subset is currently limited to
ifx, calypso, tc65, wavecom, sim900 and a few others. These devices are
true serial port devices and frequently require multiplexing, etc.
>
> I am not looking for anything fancy. I basically only want to set up a
> GPRS connection and maybe do operator selection.
> No voice, no SMS, nothing more.
If you're wanting GPRS on a true serial port based device, then you
definitely need to write your own modem driver for it. GPRS requires
multiple AT ports to drive successfully which requires multiplexing
(e.g. via CMUX). Multiplexing details are frequently vendor-specific,
so these have to be handled in your driver.
Regards,
-Denis
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Getting started (serial GPRS modem)
2012-09-12 4:49 ` Denis Kenzior
@ 2012-09-12 8:40 ` Erik
2012-09-12 13:35 ` Denis Kenzior
2012-09-12 15:55 ` Daniele Palmas
0 siblings, 2 replies; 7+ messages in thread
From: Erik @ 2012-09-12 8:40 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 3734 bytes --]
Hi Denis!
Thanks a lot for your reply!
On Wed, Sep 12, 2012 at 6:49 AM, Denis Kenzior <denkenz@gmail.com> wrote:
> Formal getting started documentation is lacking at the moment. Documentation contributions are always welcome ;)
I'll write something up if I end up doing something with ofono. I have
no problems sharing code either if I write something using
ofono.
> There are plenty of working examples to learn from however.
>
>> Second, the modem is a serial GPRS modem connected through a serial
>> line. This has to be farily common. Isn't there a simple way of just
>> testing ofono without adding udev rules, writing drivers, etc? What I
>> would like is basically to start ofonod with a path to the serial
>> device, telling it to use only standard (not device-specific) AT commands.
>
> We have tried that, unfortunately we have yet to encounter a piece of hardware that can be driven entirely using standard AT commands. There are too many vendor commands and behavioral quirks that have to be accounted for.
Ok. I have only used three different modems altogether. Maybe the reality
is not as good as I thought it was...
>> I don't think what I'd like to do is possible. So I added an udev rule
>> in the form of:
>>
>> KERNEL=="ttyUSB*", ENV{OFONO_DRIVER}="nokia"
>
> Are you picking a driver at random or is it indeed a Nokia modem?
I picked a driver at random. What I was looking for was basically to see
if I could at least see some trace of AT commands being sent. I'll care about
if they are the right ones when I understand how stuff work. Something
apparently understood that it should use the port I specified. What happens
next? I understand that list-modems ends up doing some dbus magic
in src/manager.c but I haven't really figured out more. Any hints on debugging
except running ofono with the -d option? Should I be using some dbus
tracing utility? I have no experience *at all* of using dbus myself. i basically
know more or less what it is but not more than that.
>> Do the existing drivers check that the modem is actually a modem of that
>> type (nokia in this case)?
> No, but the list of modem drivers that support a serial port is only a subset of all the drivers available. See add_modem() function in plugins/udev.c for more details. The subset is currently limited to ifx, calypso, tc65, wavecom, sim900 and a few others. These devices are true serial port devices and frequently require multiplexing, etc.
>>
>> I am not looking for anything fancy. I basically only want to set up a
>> GPRS connection and maybe do operator selection.
>> No voice, no SMS, nothing more.
>
> If you're wanting GPRS on a true serial port based device, then you definitely need to write your own modem driver for it. GPRS requires multiple AT ports to drive successfully which requires multiplexing (e.g. via CMUX). Multiplexing details are frequently vendor-specific, so these have to be handled in your driver.
Hm. I wouldn't say GPRS *requires* multiplexing. I've written a GSM0710 MUX
code before and I know that my current modem supports it (I even made sure
to get the specification for it when we selected this modem) but surely it's
possible to set up a GPRS connection without it, even though such a setup
is quite limited.
I found Android's reference-ril code (not trying to offend anyone, not sure
about any potential religious wars going on here) which seems really
simple. I'll see if that might suit my immediate needs better. But I haven't
written off ofono yet.
I suppose what I'm looking for is a really quick way of doing what I can do
with chat and pppd but with potential of doing much more in the future.
/Erik
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Getting started (serial GPRS modem)
2012-09-12 8:40 ` Erik
@ 2012-09-12 13:35 ` Denis Kenzior
2012-09-12 15:55 ` Daniele Palmas
1 sibling, 0 replies; 7+ messages in thread
From: Denis Kenzior @ 2012-09-12 13:35 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 2425 bytes --]
Hi Erik,
> I picked a driver at random. What I was looking for was basically to see
> if I could at least see some trace of AT commands being sent. I'll care about
> if they are the right ones when I understand how stuff work. Something
> apparently understood that it should use the port I specified. What happens
> next? I understand that list-modems ends up doing some dbus magic
> in src/manager.c but I haven't really figured out more. Any hints on debugging
> except running ofono with the -d option? Should I be using some dbus
> tracing utility? I have no experience *at all* of using dbus myself. i basically
> know more or less what it is but not more than that.
There's d-feet and the like for tracing D-Bus, however most everything
can be done using the included test scripts in ofono/test. e.g.
monitor-ofono, list-modems, etc.
The modem detection logic is handled in plugins/udevng.c and
plugins/udev.c You want to modify the latter which takes care of serial
tty based devices. Create a new modem driver and add it to the
add_modem function. Your udev changes seem fine.
> Hm. I wouldn't say GPRS *requires* multiplexing. I've written a GSM0710 MUX
> code before and I know that my current modem supports it (I even made sure
> to get the specification for it when we selected this modem) but surely it's
> possible to set up a GPRS connection without it, even though such a setup
> is quite limited.
For all practical purposes it does, unless you feel like giving even
basic things like signal strength reporting while the context is active.
You can try to write a driver without it, and it should even work.
However, oFono has multiplexing support already assuming your modem is
07.10 compliant. See plugins/calypso.c on how to setup the multiplexer.
>
> I found Android's reference-ril code (not trying to offend anyone, not sure
> about any potential religious wars going on here) which seems really
> simple. I'll see if that might suit my immediate needs better. But I haven't
> written off ofono yet.
>
> I suppose what I'm looking for is a really quick way of doing what I can do
> with chat and pppd but with potential of doing much more in the future.
>
I doubt you can enable a modem faster with any other stack out there
today. You do need to write about 500 lines of code for a new modem
driver though ;)
Regards,
-Denis
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Getting started (serial GPRS modem)
2012-09-12 8:40 ` Erik
2012-09-12 13:35 ` Denis Kenzior
@ 2012-09-12 15:55 ` Daniele Palmas
2012-09-12 17:31 ` Andrea Galbusera
1 sibling, 1 reply; 7+ messages in thread
From: Daniele Palmas @ 2012-09-12 15:55 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 653 bytes --]
Hi Erik,
Da: ofono-bounces(a)ofono.org [ofono-bounces(a)ofono.org] per conto di Erik [stimpit(a)gmail.com]
Inviato: mercoledì 12 settembre 2012 10.40
A: ofono(a)ofono.org
Oggetto: Re: Getting started (serial GPRS modem)
> I found Android's reference-ril code (not trying to offend anyone, not sure
> about any potential religious wars going on here) which seems really
> simple. I'll see if that might suit my immediate needs better. But I haven't
> written off ofono yet.
The reference-ril code is indeed simple to customize, but consider that most of the intelligence in the Android RIL is in the Java layer.
Regards,
Daniele
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Getting started (serial GPRS modem)
2012-09-12 15:55 ` Daniele Palmas
@ 2012-09-12 17:31 ` Andrea Galbusera
2012-09-13 12:44 ` Daniele Palmas
0 siblings, 1 reply; 7+ messages in thread
From: Andrea Galbusera @ 2012-09-12 17:31 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 1455 bytes --]
Hi Daniele,
On Wed, Sep 12, 2012 at 5:55 PM, Daniele Palmas
<Daniele.Palmas@telit.com> wrote:
> Hi Erik,
>
> Da: ofono-bounces(a)ofono.org [ofono-bounces(a)ofono.org] per conto di Erik [stimpit(a)gmail.com]
> Inviato: mercoledì 12 settembre 2012 10.40
> A: ofono(a)ofono.org
> Oggetto: Re: Getting started (serial GPRS modem)
>
>> I found Android's reference-ril code (not trying to offend anyone, not sure
>> about any potential religious wars going on here) which seems really
>> simple. I'll see if that might suit my immediate needs better. But I haven't
>> written off ofono yet.
>
> The reference-ril code is indeed simple to customize, but consider that most of the intelligence in the Android RIL is in the Java layer.
Nice to see @telit.com people listening to this list! ;-) Me and most
actively some other guys are working with ofono and Telit devices.
On my side, the reason I started looking at ofono was that using a
modem in Linux for embedded "the old way" (mgetty, ppp, etc...) was
getting too limiting and frustrating. On the other hand, developing
all that FSM stuff on my own was too much work and I'd even ended up
with something probably too coupled with specific hardware. I believe
that the driver architecture ofono is designed on, based on plugins,
will make using modern modems advanced features more affordable.
BTW, is there any interest by Telit to support ofono drivers for their devices?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Getting started (serial GPRS modem)
2012-09-12 17:31 ` Andrea Galbusera
@ 2012-09-13 12:44 ` Daniele Palmas
0 siblings, 0 replies; 7+ messages in thread
From: Daniele Palmas @ 2012-09-13 12:44 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 2053 bytes --]
Hi Andrea,
Da: ofono-bounces(a)ofono.org [ofono-bounces(a)ofono.org] per conto di Andrea Galbusera [gizero(a)gmail.com]
Inviato: mercoledì 12 settembre 2012 19.31
A: ofono(a)ofono.org
Oggetto: Re: Getting started (serial GPRS modem)
>Hi Daniele,
>
>On Wed, Sep 12, 2012 at 5:55 PM, Daniele Palmas
><Daniele.Palmas@telit.com> wrote:
>> Hi Erik,
>>
>> Da: ofono-bounces(a)ofono.org [ofono-bounces(a)ofono.org] per conto di Erik [stimpit(a)gmail.com]
>> Inviato: mercoledì 12 settembre 2012 10.40
>> A: ofono(a)ofono.org
>> Oggetto: Re: Getting started (serial GPRS modem)
>>
>>> I found Android's reference-ril code (not trying to offend anyone, not sure
>>> about any potential religious wars going on here) which seems really
>>> simple. I'll see if that might suit my immediate needs better. But I haven't
>>> written off ofono yet.
>>
>> The reference-ril code is indeed simple to customize, but consider that most of the intelligence in the Android RIL is in the Java layer.
>Nice to see @telit.com people listening to this list! ;-) Me and most
>actively some other guys are working with ofono and Telit devices.
>
>On my side, the reason I started looking at ofono was that using a
>modem in Linux for embedded "the old way" (mgetty, ppp, etc...) was
>getting too limiting and frustrating. On the other hand, developing
>all that FSM stuff on my own was too much work and I'd even ended up
>with something probably too coupled with specific hardware. I believe
>that the driver architecture ofono is designed on, based on plugins,
>will make using modern modems advanced features more affordable.
>
>BTW, is there any interest by Telit to support ofono drivers for their devices?
At the moment there are no plans.
We started to look at it in the beginning of the project, then Android became more and more popular, so we mainly focused our effort on it.
Personally speaking, I'm always checking what's happening in Ofono, because I consider it a very interesting project.
Regards,
Daniele
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-09-13 12:44 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-11 13:17 Getting started (serial GPRS modem) Erik
2012-09-12 4:49 ` Denis Kenzior
2012-09-12 8:40 ` Erik
2012-09-12 13:35 ` Denis Kenzior
2012-09-12 15:55 ` Daniele Palmas
2012-09-12 17:31 ` Andrea Galbusera
2012-09-13 12:44 ` Daniele Palmas
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.