Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bootstrapping and notification issues with awa-0.2.3 on Clickers to Ci40 #286

Closed
abhijit-mahajani-imgtec opened this issue Aug 24, 2016 · 9 comments
Assignees
Labels

Comments

@abhijit-mahajani-imgtec

We are using awa-0.2.3 for CreatorKit project.

We have awa-0.1.10 or awa-0.2.1 running on clickers and they could bootstrap/register with awa server on Ci40 (0.2.3). However when we integrated 0.2.3 on Clickers (see CreatorKit/button-sensor#14),

Now its not able to bootstrap properly to Ci40 running awa-0.2.3. it takes almost 8-10 attempts before it can bootstrap to Ci40.
But after that (our button-sensor applications sends notifications for each button-press), notifications sent to Ci40 are not received there.
I can see with button-sensor app on clicker with awa-0.2.3 is trying to send notify to 13078 port.

�[0mButton press event received
�[37;01m [DEBUG] �[0m�[33m[lwm2m_observers.c:209] �[0m�[0mAll attributes checked out for server 0, Will notify change to /3200/0/5501 when possible.
�[0m�[37;01m [DEBUG] �[0m�[33m[lwm2m_tree_builder.c:62] �[0m�[0mTreebuilder length: 8
�[0m�[37;01m [DEBUG] �[0m�[33m[lwm2m_client_core.c:1355] �[0m�[0mSend Notify to coap://[2001:1418:0100:0000:0000:0000:0000:0001]:13078/3200/0/5501
�[0m�[37;01m [DEBUG] �[0m�[33m[network_abstraction_contiki.c:137] �[0m�[0mCache hit on look up [2001:1418:0100:0000:0000:0000:0000:0001]
�[0m�[37;01m [DEBUG] �[0m�[33m[coap_abstraction_erbium.c:528] �[0m�[0mCoap notify: coap://[2001:1418:0100:0000:0000:0000:0000:0001]:13078/3200/0/5501

where as when it used to succeed with awa-0.2.1 or earlier, it used to send notify to 5683 port.

�[0mButton press event received
�[37;01m [DEBUG] �[0m�[33m[lwm2m_observers.c:209] �[0m�[0mAll attributes checked out for server 0, Will notify change to /3200/0/5501 when possible.
�[0m�[37;01m [DEBUG] �[0m�[33m[lwm2m_tree_builder.c:62] �[0m�[0mTreebuilder length: 8
�[0m�[37;01m [DEBUG] �[0m�[33m[lwm2m_client_core.c:1335] �[0m�[0mSend Notify to coap://[2001:1418:0100:0000:0000:0000:0000:0001]:5683/3200/0/5501
�[0m�[37;01m [DEBUG] �[0m�[33m[coap_abstraction_contiki.c:558] �[0m�[0mCoap notify: coap://[2001:1418:0100:0000:0000:0000:0000:0001]:5683/3200/0/5501
�[0m�[37;01m [DEBUG] �[0m�[33m[coap_abstraction_contiki.c:559] �[0m�[0mCoap IPv6 request address: [2001:1418:0100:0000:0000:0000:0000:0001]
�[0m�[37;01m [DEBUG] �[0m�[33m[coap_abstraction_contiki.c:560] �[0m�[0mCoap request port: 5683


My question is are we missing anything in configuration ? why the behaviour has changed?

Thanks in advance!

@delmet
Copy link
Collaborator

delmet commented Aug 24, 2016

13078 is 5683 in network byte order, I will look into whether this just a display problem (ie need to convert back)

@abhijit-mahajani-imgtec
Copy link
Author

@abhijit-mahajani-imgtec
Copy link
Author

Actually i was wrong, its not 8-10 attempts, but it has taken almost 36 attempts to bootstrap the clicker to Ci40. Attached the both the logs, one with clickers having awa-0.2.1, where bootstrapping happens almost immediately in 1st attempt. where as with awa-0.2.3 it has taken hell lot of time, almost 36 attempts (its not always 36, it can be more or less, but far more time).
all these observations are with cascoda boards., we have seen that with TI boards, it has not able to bootstrap at all. we can upload those logs as well.

@abhijit-mahajani-imgtec abhijit-mahajani-imgtec changed the title clickers with awa-0.2.3 are not able to send notifications to Ci40 with awa-0.2.3 on proper port Bootstrapping and notification issues with awa-0.2.3 on contiki Aug 25, 2016
@abhijit-mahajani-imgtec abhijit-mahajani-imgtec changed the title Bootstrapping and notification issues with awa-0.2.3 on contiki Bootstrapping and notification issues with awa-0.2.3 on Clickers to Ci40 Aug 25, 2016
@abhijit-mahajani-imgtec
Copy link
Author

pcaps.tar.gz

Attaching both the packet captures.
Ci40 running with awa-0.2.3 and clickers with awa-0.2.3 (where clickers bootstrapping to Ci40 taking lots of time and then sending notifications to 13078)
Ci40 running with awa-0.2.3 and clickers with awa-0.2.1 (where clickers bootstrapping to Ci40 is almost immediate and send notifications to 5683 , works fine)

@abhijit-mahajani-imgtec
Copy link
Author

Another set of logs including awa_serverd and awa_bootstrapd logs with clicker(2.1/2.3), including matching pcaps.
awa_286_logs.tar.gz

@DavidAntliff DavidAntliff self-assigned this Aug 25, 2016
@DavidAntliff
Copy link
Collaborator

@abhijit-mahajani-imgtec thanks, we'll take a look soon.

@DavidAntliff
Copy link
Collaborator

@abhijit-mahajani-imgtec confirmed that there's an issue with IPv6. We're looking into it.

@datachi7d
Copy link
Collaborator

Hi @abhijit-mahajani-imgtec, in the main loop, have you changed PROCESS_WAIT_EVENT_UNTIL to PROCESS_YIELD?

Delme updated the docs when we switched to erbium:

diff --git a/doc/example_app_static_api.md b/doc/example_app_static_api.md
@@ -427,7 +425,7 @@ PROCESS_THREAD(lwm2m_client, ev, data)
         AwaStaticClient_ResourceChanged(awaClient, 1000, 0, 104);

         etimer_set(&et, (waitTime * CLOCK_SECOND) / 1000);
-        PROCESS_WAIT_EVENT_UNTIL(etimer_expired(&et));
+        PROCESS_YIELD();
         waitTime = 0;
     }

This allows the process to yield to the network stack for incoming packets, which was previously done in the contiki rest engine process.

@abhijit-mahajani-imgtec
Copy link
Author

Thanks @datachi7d , yes we have already update the button-sensor application to add this PROCESS_YIELD, see CreatorKit/button-sensor@d272b9c

@GonZo GonZo closed this as completed Dec 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants