You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, thank you for the great framework! I´ve been using AwaLWM2M as configuration and side monitoring channel on my own custom IoT solution. I use AwaLWM2M compiled as static client in more than one kind of arm based device. AwaLWM2M objects are dedicated to configuration and runtinme information channel (for IoT data I have my own framwrok objects and other channels completely independent). For what I need, it is working very well, but unfortunetly I detected a behavior that is causing a problem:
My framework is also based on a continuous loop with various steps, one of these steps is obviously to call: lwm2m_client_->Process(), which is no more than a wrapper to: AwaStaticClient_Process(...);
The solution works rock steady 24/7 (even with the Awa server down, no problem, I know that is by design it only logs registration unsucessfull. Once the server is up again, it connects with no problem).
BUT, if we disconnect the ethernet cable from the device and the ethernet link really goes down, the static client is not able to recover and the AwaStaticClient_Process(...) function blocks, blocking all the loop and the device becomes unresponsive.
As a workaround, I am thinking to put the Process() call inside some kind of worker thread to generate a timeout. Are you aware of the bahavior I described?
The other possibility is to try to look at the Awa source code and see if I can help. May you point the directions to where the problem may be? I am willing to help.
Regards,
Luiz Eduardo Giampaoli
The text was updated successfully, but these errors were encountered:
I'm not previously aware of this behaviour, however this is definitely an area that could benefit from some improvement. Please do look at the source code - you'll probably want to start here:
You may need to set an option on the socket to avoid the block. Or, if you need to write your own "Process" function, using this as a guide, that's perfectly acceptable.
Hello!
First of all, thank you for the great framework! I´ve been using AwaLWM2M as configuration and side monitoring channel on my own custom IoT solution. I use AwaLWM2M compiled as static client in more than one kind of arm based device. AwaLWM2M objects are dedicated to configuration and runtinme information channel (for IoT data I have my own framwrok objects and other channels completely independent). For what I need, it is working very well, but unfortunetly I detected a behavior that is causing a problem:
My framework is also based on a continuous loop with various steps, one of these steps is obviously to call: lwm2m_client_->Process(), which is no more than a wrapper to: AwaStaticClient_Process(...);
The solution works rock steady 24/7 (even with the Awa server down, no problem, I know that is by design it only logs registration unsucessfull. Once the server is up again, it connects with no problem).
BUT, if we disconnect the ethernet cable from the device and the ethernet link really goes down, the static client is not able to recover and the AwaStaticClient_Process(...) function blocks, blocking all the loop and the device becomes unresponsive.
As a workaround, I am thinking to put the Process() call inside some kind of worker thread to generate a timeout. Are you aware of the bahavior I described?
The other possibility is to try to look at the Awa source code and see if I can help. May you point the directions to where the problem may be? I am willing to help.
Regards,
Luiz Eduardo Giampaoli
The text was updated successfully, but these errors were encountered: