All of lore.kernel.org
 help / color / mirror / Atom feed
* Running ofono on Raspberry Pi and SIM800
       [not found] <mailman.19.1508266802.24405.ofono@ofono.org>
@ 2017-10-18  9:49 ` =?unknown-8bit?q?Pi=C4=8Dugins?= Arsenijs
  2017-10-18 16:15   ` Denis Kenzior
  0 siblings, 1 reply; 4+ messages in thread
From: =?unknown-8bit?q?Pi=C4=8Dugins?= Arsenijs @ 2017-10-18  9:49 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 1537 bytes --]

Hi!

I'm interested in running ofono on a Raspberry Pi (BCM2835, 1GHz), connected to a SIM800 modem over UART (the stable Pi UART, not the MiniUART). I also have RST, DTR and RESET signals connected to the Pi, and for sound I'm using analog audio outputs and inputs of the modem. Basically, I'm talking about using ofono in ZeroPhone project - https://hackaday.io/project/19035 .

For now, I'm interested in 1) notifications about voice call status (not concerning audio for now, as it's handled in hardware) 2) SMS and MMS support 3) 2G data connections (whatever available connection types are on 2G networks) 4) USSD support. My questions are:

1) Is ofono going to be suitable for my needs? I'm more than OK with using DBus and rolling my own user interface to it.
2) How do I run ofono from command-line and tell it to connect to a specific serial port and use a specific ofono driver? 
3) Do you foresee any necessary changes to ofono? For example, need to make a sim800-specific driver?
4) I see that Sailfish phones are using ofono as the GSM backend. Did they upstream their changes, or do they have a fork?
5) I'm planning to work with SIM5320 modem in the future, and attempt using its USB connection. I know it creates multiple serial ports, and supports streaming audio over one of them. Does ofono come into play here, does it have some kind of provisions to convert this kind of audio input/output into actual sound devices under Linux, or is that usually handled by other software?

Best regards,
Arsenijs.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Running ofono on Raspberry Pi and SIM800
  2017-10-18  9:49 ` Running ofono on Raspberry Pi and SIM800 =?unknown-8bit?q?Pi=C4=8Dugins?= Arsenijs
@ 2017-10-18 16:15   ` Denis Kenzior
  2017-10-18 16:40     ` =?unknown-8bit?q?Pi=C4=8Dugins?= Arsenijs
  0 siblings, 1 reply; 4+ messages in thread
From: Denis Kenzior @ 2017-10-18 16:15 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 2989 bytes --]

Hi Arsenijs,

On 10/18/2017 04:49 AM, Pičugins Arsenijs wrote:
> Hi!
> 
> I'm interested in running ofono on a Raspberry Pi (BCM2835, 1GHz), connected to a SIM800 modem over UART (the stable Pi UART, not the MiniUART). I also have RST, DTR and RESET signals connected to the Pi, and for sound I'm using analog audio outputs and inputs of the modem. Basically, I'm talking about using ofono in ZeroPhone project - https://hackaday.io/project/19035 .
> 
> For now, I'm interested in 1) notifications about voice call status (not concerning audio for now, as it's handled in hardware) 2) SMS and MMS support 3) 2G data connections (whatever available connection types are on 2G networks) 4) USSD support. My questions are:
> 
> 1) Is ofono going to be suitable for my needs? I'm more than OK with using DBus and rolling my own user interface to it.

It supports everything except MMS.  That requires a separate MMS stack 
and is out of scope for oFono.  I don't know of any full-featured open 
source MMS stacks, but I'm probably not paying enough attention.  Maybe 
someone here can give you pointers.

You can take a look at the (now undeveloped) mmsd project to see how the 
MMS stack should interact with oFono:

https://git.kernel.org/pub/scm/network/ofono/mmsd.git/

> 2) How do I run ofono from command-line and tell it to connect to a specific serial port and use a specific ofono driver?

You write a driver for it and since it is a serial port modem, use udev 
rules to setup the TTY port accordingly.  See doc/sim900-modem.txt for 
an example.  The device detection magic is inside plugins/udevng.c and 
most modem drivers reside in plugins/*.  See the plugins/sim900.c, it 
may be close enough to the sim800 to get you started.

> 3) Do you foresee any necessary changes to ofono? For example, need to make a sim800-specific driver?

The most likely answer is yes.  All new modems integrated into oFono 
required 'some' vendor/firmware specific handling.  However, it is not 
possible to answer that unless you have the modem control protocol 
specifications in hand.  If it is a standard AT command based modem, 
then the changes should be minimal.

> 4) I see that Sailfish phones are using ofono as the GSM backend. Did they upstream their changes, or do they have a fork?

They have a fork.

> 5) I'm planning to work with SIM5320 modem in the future, and attempt using its USB connection. I know it creates multiple serial ports, and supports streaming audio over one of them. Does ofono come into play here, does it have some kind of provisions to convert this kind of audio input/output into actual sound devices under Linux, or is that usually handled by other software?

oFono does not handle the audio bits.  We can take care of sending the 
necessary AT commands to the device to configure the codec, etc.  But 
the actual audio processing belongs in your audio daemon.  E.g. 
PulseAudio or whatever.

Regards,
-Denis

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Running ofono on Raspberry Pi and SIM800
  2017-10-18 16:15   ` Denis Kenzior
@ 2017-10-18 16:40     ` =?unknown-8bit?q?Pi=C4=8Dugins?= Arsenijs
  2017-10-18 16:53       ` Denis Kenzior
  0 siblings, 1 reply; 4+ messages in thread
From: =?unknown-8bit?q?Pi=C4=8Dugins?= Arsenijs @ 2017-10-18 16:40 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 3814 bytes --]

Thank you, that was a great answer. I'll focus on one part for now:

Is it possible for me to run ofono from command-line, without involving udev? I'm asking this because, in my application, I'm using the UART as a debugging UART for first 30 seconds of phone's boot, then, if there's no activity (or other trigger set), I enable the GSM modem and run the GSM backend. Is there a reason why ofono is not capable to be run this way (provided it's not capable of this)? Is there a way I can just do the setup that udev would normally do, but manually? If so, where should I look for pointers - code, documentation or somewhere else? (doc/sim900-modem.txt? plugins/udevng.c?)

Best regards,
Arsenijs.

18.10.2017, 19:15, "Denis Kenzior" <denkenz@gmail.com>:
> Hi Arsenijs,
>
> On 10/18/2017 04:49 AM, Pičugins Arsenijs wrote:
>>  Hi!
>>
>>  I'm interested in running ofono on a Raspberry Pi (BCM2835, 1GHz), connected to a SIM800 modem over UART (the stable Pi UART, not the MiniUART). I also have RST, DTR and RESET signals connected to the Pi, and for sound I'm using analog audio outputs and inputs of the modem. Basically, I'm talking about using ofono in ZeroPhone project - https://hackaday.io/project/19035 .
>>
>>  For now, I'm interested in 1) notifications about voice call status (not concerning audio for now, as it's handled in hardware) 2) SMS and MMS support 3) 2G data connections (whatever available connection types are on 2G networks) 4) USSD support. My questions are:
>>
>>  1) Is ofono going to be suitable for my needs? I'm more than OK with using DBus and rolling my own user interface to it.
>
> It supports everything except MMS. That requires a separate MMS stack
> and is out of scope for oFono. I don't know of any full-featured open
> source MMS stacks, but I'm probably not paying enough attention. Maybe
> someone here can give you pointers.
>
> You can take a look at the (now undeveloped) mmsd project to see how the
> MMS stack should interact with oFono:
>
> https://git.kernel.org/pub/scm/network/ofono/mmsd.git/
>
>>  2) How do I run ofono from command-line and tell it to connect to a specific serial port and use a specific ofono driver?
>
> You write a driver for it and since it is a serial port modem, use udev
> rules to setup the TTY port accordingly. See doc/sim900-modem.txt for
> an example. The device detection magic is inside plugins/udevng.c and
> most modem drivers reside in plugins/*. See the plugins/sim900.c, it
> may be close enough to the sim800 to get you started.
>
>>  3) Do you foresee any necessary changes to ofono? For example, need to make a sim800-specific driver?
>
> The most likely answer is yes. All new modems integrated into oFono
> required 'some' vendor/firmware specific handling. However, it is not
> possible to answer that unless you have the modem control protocol
> specifications in hand. If it is a standard AT command based modem,
> then the changes should be minimal.
>
>>  4) I see that Sailfish phones are using ofono as the GSM backend. Did they upstream their changes, or do they have a fork?
>
> They have a fork.
>
>>  5) I'm planning to work with SIM5320 modem in the future, and attempt using its USB connection. I know it creates multiple serial ports, and supports streaming audio over one of them. Does ofono come into play here, does it have some kind of provisions to convert this kind of audio input/output into actual sound devices under Linux, or is that usually handled by other software?
>
> oFono does not handle the audio bits. We can take care of sending the
> necessary AT commands to the device to configure the codec, etc. But
> the actual audio processing belongs in your audio daemon. E.g.
> PulseAudio or whatever.
>
> Regards,
> -Denis

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Running ofono on Raspberry Pi and SIM800
  2017-10-18 16:40     ` =?unknown-8bit?q?Pi=C4=8Dugins?= Arsenijs
@ 2017-10-18 16:53       ` Denis Kenzior
  0 siblings, 0 replies; 4+ messages in thread
From: Denis Kenzior @ 2017-10-18 16:53 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 2010 bytes --]

Hi Arsenijs,

Just FYI, we don't top-post on this mailing list.

On 10/18/2017 11:40 AM, Pičugins Arsenijs wrote:
> Thank you, that was a great answer. I'll focus on one part for now:
> 
> Is it possible for me to run ofono from command-line, without involving udev? I'm asking this because, in my application, I'm using the UART as a debugging UART for first 30 seconds of phone's boot, then, if there's no activity (or other trigger set), I enable the GSM modem and run the GSM backend. Is there a reason why ofono is not capable to be run this way (provided it's not capable of this)? Is there a way I can just do the setup that udev would normally do, but manually? If so, where should I look for pointers - code, documentation or somewhere else? (doc/sim900-modem.txt? plugins/udevng.c?)

oFono can be started any time you wish.  udev is just normally used to 
detect the hardware.  Either via probing the USB bus, or in the case of 
serial devices via external configuration (e.g. udev rules).  Without 
udev oFono would not know what TTY corresponds to the modem.  E.g. on 
some platforms it may be ttyS0 and others it would be /dev/ttySAC0, or 
whatever.

The oFono plugins / modem drivers are free to do anything they want.  So 
if you want to hardcode the behavior, that is fine.  You can always 
implement your own detection logic.  For example plugins/phonesim.c uses 
a config file, plugins/rildev.c uses getenv.  The possibilities are endless.

udev is the preferred approach, other approaches might not be palatable 
to upstream.

In terms of documentation or pointers, it really depends on your 
hardware setup.  If you have a traditional AT command based modem with a 
multiplexer, then take a look at doc/calypso-modem.txt and 
plugins/calypso.c.  This is the modem used on the original Freerunner.

If you have multiplexing handled by the kernel, then the SIM900 docs / 
plugin might be applicable.

> 
> Best regards,
> Arsenijs.
> 

Regards,
-Denis

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-10-18 16:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <mailman.19.1508266802.24405.ofono@ofono.org>
2017-10-18  9:49 ` Running ofono on Raspberry Pi and SIM800 =?unknown-8bit?q?Pi=C4=8Dugins?= Arsenijs
2017-10-18 16:15   ` Denis Kenzior
2017-10-18 16:40     ` =?unknown-8bit?q?Pi=C4=8Dugins?= Arsenijs
2017-10-18 16:53       ` Denis Kenzior

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.