All of lore.kernel.org
 help / color / mirror / Atom feed
* Developing a SIM800 plugin - further questions
@ 2018-06-21 23:37 =?unknown-8bit?q?Pi=C4=8Dugins?= Arsenijs
  2018-06-21 23:54 ` Denis Kenzior
  0 siblings, 1 reply; 2+ messages in thread
From: =?unknown-8bit?q?Pi=C4=8Dugins?= Arsenijs @ 2018-06-21 23:37 UTC (permalink / raw)
  To: ofono

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

I'm now working on a SIM800 plugin, specifically, for a UART-connected SIM800
and a Raspberry Pi Zero. There are minor adjustments that we need to make, so
we've copied the SIM900 plugin to make sure that we can make adjustments in
a clean way (and also compare it to a known-working SIM900 setup). I, too, was
affected by the latest SIM900-related breakage - right now I'm compiling to check
if it's resolved in current git master.

Some questions I have are:

- Is it possible to compile a plugin standalone and then only distribute that
plugin? I'm wondering because Raspbian repositories already ship ofono, and
given that ofono already has a plugin infrastructure, it seems counterintuitive
to distribute a separate version of ofono through our repositories just because
we've added a plugin. I'm asking because it seems that plugins also need to be
hard-coded in the plugins/udevng.c file - so I'd need to recompile ofono even if
I compile the plugin separately... or not? (as we're using udev to enable the
right plugin, as far as I can tell:
https://github.com/ZeroPhone/ofono-config/blob/master/51-ofono.rules) Is it
something that could be influenced by the new -p command-line option of ofonod
instead? (which I found after compiling git master and running ofonod --help).
- judging by lsof output, ofono doesn't open the serial port until Powered is
set to true (which is what we need), but does not close the serial port after
setting Powered to false (which is undesirable for us, since, unfortunately,
that same port might be used for debugging). Why? Is it something can be
influenced by a plugin?
- Latest git master fails to compile on Raspberry Pi, due to

#pragma GCC diagnostic ignored "-Wrestrict"

in drivers/rilmodem/call-forwarding.c and
drivers/rilmodem/network-registration.c . I can provide error output if
necessary. Is it something expected?

Cheers!
Arsenijs

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

* Re: Developing a SIM800 plugin - further questions
  2018-06-21 23:37 Developing a SIM800 plugin - further questions =?unknown-8bit?q?Pi=C4=8Dugins?= Arsenijs
@ 2018-06-21 23:54 ` Denis Kenzior
  0 siblings, 0 replies; 2+ messages in thread
From: Denis Kenzior @ 2018-06-21 23:54 UTC (permalink / raw)
  To: ofono

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

Hi Arsenijs,

On 06/21/2018 06:37 PM, Pičugins Arsenijs wrote:
> I'm now working on a SIM800 plugin, specifically, for a UART-connected SIM800
> and a Raspberry Pi Zero. There are minor adjustments that we need to make, so
> we've copied the SIM900 plugin to make sure that we can make adjustments in
> a clean way (and also compare it to a known-working SIM900 setup). I, too, was
> affected by the latest SIM900-related breakage - right now I'm compiling to check
> if it's resolved in current git master.

How different is sim800 to sim900?  I would hate to have lots of plugins 
which are only different by a few lines of code...

> 
> Some questions I have are:
> 
> - Is it possible to compile a plugin standalone and then only distribute that
> plugin? I'm wondering because Raspbian repositories already ship ofono, and
> given that ofono already has a plugin infrastructure, it seems counterintuitive
> to distribute a separate version of ofono through our repositories just because

You could, but it is usually far more trouble than it is worth.  Just 
get your driver upstream and then upstream maintains and includes it as 
part of official releases going forward.

You also can't really utilize the concept of 'vendor quirks' doing it 
this way.  So your plugin would need to reuse existing atom drivers as 
is or implement a brand new version of them and ship them.

> we've added a plugin. I'm asking because it seems that plugins also need to be
> hard-coded in the plugins/udevng.c file - so I'd need to recompile ofono even if
> I compile the plugin separately... or not? (as we're using udev to enable the
> right plugin, as far as I can tell:
> https://github.com/ZeroPhone/ofono-config/blob/master/51-ofono.rules) Is it
> something that could be influenced by the new -p command-line option of ofonod
> instead? (which I found after compiling git master and running ofonod --help).

out-of-tree plugins generally need their own detection logic.  But since 
this is a tty based device, the existing logic would still work...

-p/-P options are really meant for developer / debugging.  Ideally 
whatever you do should not depend on the use of these command line options.

> - judging by lsof output, ofono doesn't open the serial port until Powered is
> set to true (which is what we need), but does not close the serial port after
> setting Powered to false (which is undesirable for us, since, unfortunately,
> that same port might be used for debugging). Why? Is it something can be
> influenced by a plugin?

oFono by itself does nothing with serial ports, the drivers do.  So it 
would seem your driver is misbehaving.

> - Latest git master fails to compile on Raspberry Pi, due to
> 
> #pragma GCC diagnostic ignored "-Wrestrict"
> 
> in drivers/rilmodem/call-forwarding.c and
> drivers/rilmodem/network-registration.c . I can provide error output if
> necessary. Is it something expected?

This is the fallout GCC8 support.  Feel free to start a separate thread 
and report these in full.

Regards,
-Denis

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

end of thread, other threads:[~2018-06-21 23:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-21 23:37 Developing a SIM800 plugin - further questions =?unknown-8bit?q?Pi=C4=8Dugins?= Arsenijs
2018-06-21 23:54 ` 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.