ntp synchronization in READY state.

Sameer Naik sameer.subscriptions at damagehead.com
Mon Feb 27 04:36:50 PST 2012


According to my understanding NTP synchronization will occur in
connman once service state is CONNMAN_SERVICE_STATE_ONLINE. Further
service will enter the online state once connman can communicate with

However in my case, generally an NTP server announced via dhcp and is
present on the local network. My device may not necessarily be
connected to the internet. So i need to start the ntp synchronization
before connman enters the ONLINE state.

For this i made the following change:

 src/service.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/service.c b/src/service.c
index a21ee3f..e093340 100644
--- a/src/service.c
+++ b/src/service.c
@@ -4052,9 +4052,6 @@ static int service_indicate_state(struct
connman_service *service)

-       if (new_state == CONNMAN_SERVICE_STATE_ONLINE)
-               __connman_timeserver_sync(service);
        if (new_state == CONNMAN_SERVICE_STATE_IDLE) {
                connman_bool_t reconnect;

@@ -4157,6 +4154,9 @@ static int service_indicate_state(struct
connman_service *service)
        if (new_state == CONNMAN_SERVICE_STATE_ONLINE)

+       if (new_state == CONNMAN_SERVICE_STATE_READY)
+               __connman_timeserver_sync(service);
        return 0;

That is to say, start  __connman_timeserver_sync once we are in the
READY state and dont wait for connman to go to ONLINE state.

But after this change, while trying to scan a wifi technology i
receiving the  error "GDBus.Error:net.connman.Error.NoCarrier: No
carrier" very frequently and i am required to stop connman and start
it again after which it is fine. I am finding it difficult to
understand why this is happening. I had made a similar edit for
connman-0.78 and it was working fine. Please find the attached

Looking forward to your response.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: connman.log
Type: text/x-log
Size: 33245 bytes
Desc: not available
URL: <http://lists.01.org/pipermail/connman/attachments/20120227/9f8f22d9/attachment.log>

More information about the connman mailing list