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.
>
Ways to repro this:
1.Have an AP in bridge mode.
2. Device has been provisioned to connect to this AP.
3. Remove the WAN cable from AP and Reboot the device and let it
auto-connect to this AP.
4. Service state would be stuck in configuration state and eventually it
goes to the failure state.
5. Now it is in failure state and will never be able to connect.


> > 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.
>
> > 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.
>
> HTH,
>
>         Patrik
>
> _______________________________________________
> 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