itm / wsn-device-drivers

Drivers for Wireless Sensor Network Devices
Other
6 stars 4 forks source link

iSense nodes losing their IDs #71

Closed danbim closed 12 years ago

danbim commented 12 years ago

Every now and then we have the problem that our iSense nodes lose their IDs. After flashing, they have the MAC address 0xff...ff.

This happened both with the Testbed Runtime (https://github.com/itm/testbed-runtime) and some months ago from time to time with a Python script (http://www.jennic.com/support/forums/thread.php?postID=0000005564).

We use the old iSense nodes (with JN5139), having 30 nodes with 10 nodes per one mini-PC (each 5 nodes at one active USB hub).

An answer on the iSense mailing list was the following:

Hello,

we know this problem exists with iShell and assume it has something to do with USB hubs and/or nodes that are sleeping right before they are about to get flashed.

During programming, the MAC address is read and integrated into the binary, which is about to be flashed to the node. Sometimes the MAC address is read as 0xFF..FF and so this is integrated into the binary.

Our workaround in current iShell distributions is to abort programming in such cases. You'll have to restart the programming then, but at least the MAC address is not getting lost.

mlegenhausen commented 12 years ago

What is the appropriated strategy? Throw an exception when an ID 0xff...ff was read? Or how many times should the operation retry?

danbim commented 12 years ago

I guess it is a good idea to wait for 1 second and try again, repeating this behavior three times. If the device has not woken up by then we can interpret this as an error and throw an exception.