Hi Patrik
Thanks for your response.

On Thu, Oct 8, 2015 at 6:20 AM, Patrik Flykt <patrik.fl...@linux.intel.com>
wrote:

>
>         Hi,
>
> On Wed, 2015-10-07 at 21:21 -0700, Naveen Singh wrote:
> > I have few questions about service state transition to failure:
> >
> > 1. Can service state transition to Failure w/o generating an error
> event? I
> > am seeing that WiFi connection is not going through even if the AP is
> found
> > in scan. I dumped the service properties and I see that state is Failure
> > but Event is a NULL string.
>
> When a service goes to state 'failure', it's an indication that none of
> the other properties for that service should be considered valid. It may
> happen that the current implementation does not send updates for any of
> its properties after a transition to 'failure', not even the Error
> property. Report to the mailing list if this happens and the level of
> frustration associated so we'll take a look.
>

I looked into the code and the documentation and I do not see any way for
service to go back to idle (even clearing the error property). I am not
sure how devices which are supposed to auto-connect handle this?

>
> > 2. We are handling the error property event by clearing the error
> property.
> > This clears the error property and service state to Idle
>
> The Error property is actually specified read only in
> doc/service-api.txt. The current code in ConnMan allows the service
> property to be cleared, which is a bug. But the state is still 'failure'
> for the service after clearing the property, so no state transitions
> will take place.
>
Only the error property is allowed to clear which does not change the
state. Even the state is specified read only in the documentation.

>
> > 3. Even after the error event is cleared we do see a service property
> > change event for State (transitioning to failure).
>
> Yes. Only the 'Error' property got cleared, not the state transition.


> > 4. Is it advisable to handle the service property change event for state
> > (transitioning to failure) same way as we handle the service property
> > change event for error.
>
> State transition to failure causes all properties to become invalid and
> should be the one to follow. The 'Error' property may try to explain
> what happened, but usually the information is not very well suited for
> UIs. ConnMan might not announce the 'Error' property explicitly in all
> cases of failure; see above.
>
> I am planning to handle the state property change event. How do you expect
it to be handled? Clear the error property?

> HTH,
>
>         Patrik
>
Regards
Naveen

>
> _______________________________________________
> connman mailing list
> connman@connman.net
> https://lists.connman.net/mailman/listinfo/connman
>
_______________________________________________
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman

Reply via email to