openwsn-berkeley / opentestbed

Lean OpenWSN/OpenMote testbed
5 stars 10 forks source link

Firmware programming fails when multiple requests come at different timings #102

Open yatch opened 5 years ago

yatch commented 5 years ago

If you do something like shown below, some of, or all of the programming tasks could fail:

for mote_id in motes_under_certain_otbox:
   exec "opentestbed/deviceType/mote/deviceId/{mote_id}/cmd/program"
   sleep(3)  // wait for 3 seconds

It seems the cause of the failure is that, an OpenTestbed instance uses one single temporary file, firmware_temp, to keep firmwares to program. Because of this, a firmware image stored in the temporary file could be corrupted by a following request.