* Implement signal strength polling in plugin/driver
@ 2012-06-07 15:20 Audric Schiltknecht
2012-06-09 6:16 ` Denis Kenzior
2012-06-11 14:00 ` Guillaume Zajac
0 siblings, 2 replies; 5+ messages in thread
From: Audric Schiltknecht @ 2012-06-07 15:20 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 967 bytes --]
Hi guys,
It seems my first post was lost, so here is a new try.
I am currently developing an ofono-based GSM control interface, using a
Sagem
Hilo modem (I wrote the appropriate plugin) with the atmodem driver.
I am having trouble with signal strength reporting. The terminal does
not report
signal strength by event. Hence, it is not possible to get the value
from Ofono,
since Ofono expects it to be updated on a +CIEV event. I implemented a
new DBus method in the NetworkRegistration interface to force AT+CSQ
command and
update the property value, but this is clearly not a valid solution.
I found by looking in include/netreg.h that it should be up to the
plugin to
implement CSQ polling, however I can't find how it is supposed to be
done.
Indeed, the plugin has no access to the netreg atom nor structure, so
how is it
supposed to update one of these properties ?
Thank you for your help.
Regards,
Audric Schiltknecht
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Implement signal strength polling in plugin/driver
2012-06-07 15:20 Implement signal strength polling in plugin/driver Audric Schiltknecht
@ 2012-06-09 6:16 ` Denis Kenzior
2012-06-11 14:00 ` Guillaume Zajac
1 sibling, 0 replies; 5+ messages in thread
From: Denis Kenzior @ 2012-06-09 6:16 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 880 bytes --]
Hi Audric,
> I found by looking in include/netreg.h that it should be up to the
> plugin to
> implement CSQ polling, however I can't find how it is supposed to be done.
> Indeed, the plugin has no access to the netreg atom nor structure, so
> how is it
> supposed to update one of these properties ?
Drivers do not modify DBus properties directly. Instead you should be
signaling the change to the core the regular way, via
ofono_netreg_strength_notify.
If you want to implement periodic signal strength reporting, then use
g_idle_add_seconds to periodically send the +CSQ query. Please note
that doing it this way you'd have to keep track of other states. For
example, you might want to stop polling when the registration is lost, etc.
Ideally you should be asking your vendor why the signal strength isn't
reported properly.
Regards,
-Denis
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Implement signal strength polling in plugin/driver
2012-06-07 15:20 Implement signal strength polling in plugin/driver Audric Schiltknecht
2012-06-09 6:16 ` Denis Kenzior
@ 2012-06-11 14:00 ` Guillaume Zajac
2012-06-11 14:28 ` Audric Schiltknecht
1 sibling, 1 reply; 5+ messages in thread
From: Guillaume Zajac @ 2012-06-11 14:00 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 1652 bytes --]
Hi Audric,
On 07/06/2012 17:20, Audric Schiltknecht wrote:
> Hi guys,
>
> It seems my first post was lost, so here is a new try.
>
> I am currently developing an ofono-based GSM control interface, using
> a Sagem
> Hilo modem (I wrote the appropriate plugin) with the atmodem driver.
>
> I am having trouble with signal strength reporting. The terminal does
> not report
> signal strength by event. Hence, it is not possible to get the value
> from Ofono,
> since Ofono expects it to be updated on a +CIEV event. I implemented a
> new DBus method in the NetworkRegistration interface to force AT+CSQ
> command and
> update the property value, but this is clearly not a valid solution.
Do you know in modem specifications if Sagem is using a specific signal
strength notifications command?
If yes, then you should update in drivers/atmodem/network-registration.c
the at_creg_set_cb() function to handle OFONO_VENDOR_SAGEM case.
Thus you can use register to the good comman notification.
Could you also give us your AT log and more particulary the
"AT+CMER=3,0,0,1" answer?
Maybe, this configuration is not supported by your modem and you should
change it.
>
> I found by looking in include/netreg.h that it should be up to the
> plugin to
> implement CSQ polling, however I can't find how it is supposed to be
> done.
> Indeed, the plugin has no access to the netreg atom nor structure, so
> how is it
> supposed to update one of these properties ?
Indeed, if you use it for instance with ConnMan signal strength
notification won't work or maybe I miss something.
Kind regards,
Guillaume
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Implement signal strength polling in plugin/driver
2012-06-11 14:00 ` Guillaume Zajac
@ 2012-06-11 14:28 ` Audric Schiltknecht
0 siblings, 0 replies; 5+ messages in thread
From: Audric Schiltknecht @ 2012-06-11 14:28 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 2434 bytes --]
Guillaume,
On Mon, 11 Jun 2012 16:00:23 +0200, Guillaume Zajac wrote:
> Hi Audric,
>
> On 07/06/2012 17:20, Audric Schiltknecht wrote:
>> Hi guys,
>>
>>
>> I am currently developing an ofono-based GSM control interface,
>> using a Sagem
>> Hilo modem (I wrote the appropriate plugin) with the atmodem driver.
>>
>> I am having trouble with signal strength reporting. The terminal
>> does not report
>> signal strength by event. Hence, it is not possible to get the value
>> from Ofono,
>> since Ofono expects it to be updated on a +CIEV event. I implemented
>> a
>> new DBus method in the NetworkRegistration interface to force AT+CSQ
>> command and
>> update the property value, but this is clearly not a valid solution.
>
> Do you know in modem specifications if Sagem is using a specific
> signal strength notifications command?
> If yes, then you should update in
> drivers/atmodem/network-registration.c the at_creg_set_cb() function
> to handle OFONO_VENDOR_SAGEM case.
> Thus you can use register to the good comman notification.
According to the modem specification, the modem should use a standard
+CIEV
event to report signal strength.
However, I found that the strength is never notified as expected,
whereas it is correctly returned when using an AT+CSQ read command.
Moreover, the value returned in +CIEV is theoretically an integer in
the range 0-4,
when AT+CSQ returns a well more fine-grained value (integer between
0-31).
> Could you also give us your AT log and more particulary the
> "AT+CMER=3,0,0,1" answer?
> Maybe, this configuration is not supported by your modem and you
> should change it.
Indeed, mode 3 is not supported, and I modified the driver to use mode
1.
>> I found by looking in include/netreg.h that it should be up to the
>> plugin to
>> implement CSQ polling, however I can't find how it is supposed to be
>> done.
>> Indeed, the plugin has no access to the netreg atom nor structure,
>> so how is it
>> supposed to update one of these properties ?
>
> Indeed, if you use it for instance with ConnMan signal strength
> notification won't work or maybe I miss something.
I use my own DBus client, but the effect is the same: no notification
of signal
strength change, unless I explicitly call the custom function I added
in src/network.c
to force polling of the strength.
Thanks for your support.
Audric
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Implement signal strength polling in plugin/driver
@ 2012-06-14 12:21 Audric Schiltknecht
0 siblings, 0 replies; 5+ messages in thread
From: Audric Schiltknecht @ 2012-06-14 12:21 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 1174 bytes --]
Denis,
>> I found by looking in include/netreg.h that it should be up to the
>> plugin to
>> implement CSQ polling, however I can't find how it is supposed to be
>> done.
>> Indeed, the plugin has no access to the netreg atom nor structure,
>> so
>> how is it
>> supposed to update one of these properties ?
>
> Drivers do not modify DBus properties directly. Instead you should
> be signaling the change to the core the regular way, via
> ofono_netreg_strength_notify.
>
> If you want to implement periodic signal strength reporting, then use
> g_idle_add_seconds to periodically send the +CSQ query. Please note
> that doing it this way you'd have to keep track of other states. For
> example, you might want to stop polling when the registration is
> lost,
> etc.
Oh, I see. Indeed, I noticed that signal strength reporting
is stopped when modem is not registered. I'll keep that in mind.
Thank you for the lead on this matter.
>
> Ideally you should be asking your vendor why the signal strength
> isn't reported properly.
Sure, it would be great to not have to do all these hacks to get it
working right !
Regards,
Audric
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-06-14 12:21 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-07 15:20 Implement signal strength polling in plugin/driver Audric Schiltknecht
2012-06-09 6:16 ` Denis Kenzior
2012-06-11 14:00 ` Guillaume Zajac
2012-06-11 14:28 ` Audric Schiltknecht
-- strict thread matches above, loose matches on Subject: below --
2012-06-14 12:21 Audric Schiltknecht
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.