All of lore.kernel.org
 help / color / mirror / Atom feed
* ofono plugin and state transmissions
@ 2016-03-12 13:57 Holger Freyther
  2016-03-12 15:38 ` Denis Kenzior
  0 siblings, 1 reply; 2+ messages in thread
From: Holger Freyther @ 2016-03-12 13:57 UTC (permalink / raw)
  To: ofono

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

Hi,                                                                             
                                                                                
at sysmocom we are building a BTS (OsmoBTS, OpenBSC) test setup and             
use ofono to build our testcases. We are using Sierra Wireless (former          
Wavecom) modules and have some stability issues.                                
                                                                                
I have two issues that I don't understand and they are related to the plugin    
model and after looking at others I don't find the answer.                      
                                                                                
In the beginning we used the +WIND indication and created objects. E.g.         
we created the netreg after it starts to search for networks.. but if the       
+WIND indication fro the SIM ready came either during the registration          
or before.. we would see crashes. We now mostly ignore +WIND and guess          
about it. Not all plugins create all objects and they are created at different  
points. So what is the best way to do it?                                       
                                                                                
One other problem is that post_sim doesn't seem to be called. After looking     
at the src/modem.c file I see that it is only called for certain states. E.g.   
it looks like it is only called if the modem is still in the offline state and  
appears to be never called for us. Is there a way to debug it? E.g. when should 
the modem be powered up? when the SIM has been read? When the AT command        
interpreter is ready?                                                           
                                                                                
                                                                                
kind regards                                                                    
  holger                                                                        


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

* Re: ofono plugin and state transmissions
  2016-03-12 13:57 ofono plugin and state transmissions Holger Freyther
@ 2016-03-12 15:38 ` Denis Kenzior
  0 siblings, 0 replies; 2+ messages in thread
From: Denis Kenzior @ 2016-03-12 15:38 UTC (permalink / raw)
  To: ofono

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

Hi Holger,

On 03/12/2016 07:57 AM, Holger Freyther wrote:
> Hi,
>
> at sysmocom we are building a BTS (OsmoBTS, OpenBSC) test setup and
> use ofono to build our testcases. We are using Sierra Wireless (former
> Wavecom) modules and have some stability issues.
>
> I have two issues that I don't understand and they are related to the plugin
> model and after looking at others I don't find the answer.
>
> In the beginning we used the +WIND indication and created objects. E.g.
> we created the netreg after it starts to search for networks.. but if the
> +WIND indication fro the SIM ready came either during the registration
> or before.. we would see crashes. We now mostly ignore +WIND and guess
> about it. Not all plugins create all objects and they are created at different
> points. So what is the best way to do it?

I'm not familiar with the WIND indication.  Can you provide a reference 
to documentation?

In general, all atoms should be created in pre_sim(), post_sim() or 
post_online() callbacks.

>
> One other problem is that post_sim doesn't seem to be called. After looking
> at the src/modem.c file I see that it is only called for certain states. E.g.
> it looks like it is only called if the modem is still in the offline state and
> appears to be never called for us. Is there a way to debug it? E.g. when should
> the modem be powered up? when the SIM has been read? When the AT command
> interpreter is ready?

pre_sim() is called as soon as the modem is powered.

post_sim() is called as soon as we detect that the SIM PIN has been 
entered.  E.g. via org.ofono.SimManager.EnterPin or if the PIN is not 
locked.  If certain SIM operations are simply not available, we assume 
the SIM is not locked.  It is generally not called more than once, 
unless you remove the SIM (e.g. hot-swap capability).

post_online() is called when .set_online(TRUE) is executed successfully.

In general oFono expects that after calling the .set_powered(TRUE) 
driver method, the modem is brought up to the point where it can accept 
AT commands and the SIM Card reader is enabled.  oFono can then get 
basic info from the modem.  After the SIM Card reader detects the SIM 
and the modem is ready to accept SIM related operations, the modem 
driver should call ofono_sim_inserted_notify(TRUE);

So basically:
AT interpreter ready, SIM Card Powered -> Powered = True, Online = False
Above + Radio RX/TX circuits on -> Powered = True, Online = True

Complete debugging instructions can be found in ofono.git/HACKING.  I 
presume the Sierra modem is AT command based, so:

export OFONO_AT_DEBUG=1
src/ofonod -n -d

>
>
> kind regards
>    holger

Regards,
-Denis


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

end of thread, other threads:[~2016-03-12 15:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-12 13:57 ofono plugin and state transmissions Holger Freyther
2016-03-12 15:38 ` 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.