OTA Updates with SYSTEM_MODE(MANUAL);

I am developing a system that will be installed in a remote location that once installed, will be cumbersome to reach (physically access it).

The location has no access to the cloud but will have a network connection to a Xenon and a Featherwing. The current firmware has SYSTEM_MODE(MANUAL); to avoid cloud disruptions since the cloud will not be reachable anyway.

I would appreciate the community’s input on ways to update the firmware in this case. Of course I can also connect a USB cable to the Xenon and use the flash --serial command but the problem is that the cable length may need to exceed 150 feet.

What FeatherWing?
That is only a statement about the form factor of your auxilary device, it doesn't tell anything about its function.

If you want OTA update you need some way to inform your device about the fact and tell it to connect.

Thank you @ScruffR. I meant to say I have a Xenon connected to the Particle Ethernet FeatherWing.

Will it work if I connect the USB connector of the Xenon to a serial radio? Will this work to send it a firmware update from a laptop connected to a serial transceiver even if the Xenon is running SYSTEM_MODE(MANUAL)?

What would you consider a "serial radio"?
The USB port on the Xenon is not a host port but a client which requires a host to take control of the USB communication. If your "serial radio" would be a USB host device, then you could use the YModem feature to upload a new binary (that's how particle flash --serial works) but that requires the device to be put in Listening Mode.

However, if you have Ethernet connection then that would be the way to upload the data - SYSTEM_MODE(MANUAL) doesn't prevent you from initiating a cloud connection. You just need a way to tell the device to do so for the update.

Thank you again @ScruffR for your help.

I did not know that SYSTEM_MODE(MANUAL) doesn’t prevent me from initiating a cloud connection.

How can one do that?

Thanks again.

That depends on your use-case and options.

  • button
  • Ethernet transmission
  • IR receiver
  • hall sensor
  • ...

By “Ethernet transmission”, do you mean sending a TCP message to the Xenon? This is probably the best option because the Xenon will be cumbersome to physically reach and would also simplify the needed wiring.

What should the message say though? Shift to “SYSTEM_Mode(Automatic)” then reboot?

Thanks again.

TCP or UDP, however you prefer.

The message can be anything, the important bit is how your device reacts to that message.
The required action to take would be Particle.connect() and if you are running SYSTEM_THREAD(ENABLED) then that's all that's needed. If not, you need to keep calling Particle.process() regularly (best as often/fast as possible).

1 Like