I have written multiple times about the problems of Xenons reliably re-connecting to a Boron/Argon when the Gateway is reset but have not received any good answers leading me to believe that the initial mesh firmware is buggy. Obviously losing Mesh connectivity and not reconnecting prevents this hardware from becoming a serious platform.
Due to the lack of input, I used SYSTEM_MODE(MANUAL); and a Mesh.Connect statement to establish the initial connection which I am realizing is not a good solution. My challenge is aggravated because I need to test the system outdoors at a remote site an hour away.
How do I update the Xenon firmware in this case? I recall on the Photon, pressing its two buttons then releasing one put it in a mode to receive firmware through the cloud. How would this be done in the case of the Xenon?
I hear you that there are issues with xenons connecting successfully to a gateway when a user firmware is OTA-ed to the gateway.
Would like to understand what you plan to test at the remote site and whether there’s another workaround instead whilst waiting for deviceOS improvements.
Thank you @ScruffR, will change it but the question is what is the delay to check if Mesh is connected? Of course I can just check every few minutes rather than on each loop iteration.
Also, wouldn’t Mesh.ready require a Mesh.connect()?
The Xenon is connected to a sensor with a refresh rate of over 100Hz. After data is accumulated by the Xenon, it is then sent to a Boron which collects (in the future) from 3-6 Xenons.
The Xenon updates its Gateway once every 5 minutes.
The spacing between the Xenon and the Boron is now only a few feet. I am trying to setup a system which is “forgiving” of OTA updates to both Gateway and attached mesh devices. I am however “almost” happy with the Boron firmware.
==============================================
Do you recommend I avoid SYSTEM_MODE(MANUAL) in my case?
The spacing between the Xenon and the Boron is now only a few feet. I am trying to setup a system which is “forgiving” of OTA updates to both Gateway and attached mesh devices. I am however “almost” happy with the Boron firmware.
If this is your primary concern, it sounds better to have this flagged up as an issue to be looked into for the firmware team.
I will not be performing OTA updates during the on-site testing (not because it is not reliable now), but instead, ensure that the use case of collecting data and publishing data works reliably.
But, just my opinion based on field testing that I do quite a fair bit.
Based on my testing where i OTA to an Argon every 30 seconds, this code allows a Xenon to connect back reliably, but not 100%. Read, not 100%, maybe 99%
OK, I will avoid SYSTEM_MODE(MANUAL) in my case but my question is what is the latency in putting your code in the loop() section? I am looking for incidents lasting about 100 ms.
==============================
But how do I update Xenon firmware if it is no longer connecting to the cloud?
Not sure what you mean here. The code above will ensure that the Xenon always try to have connectivity.
I am looking for incidents lasting about 100 ms.
Tough question. I don't even know how fast you can have an empty loop() function running to begin with. You might need to measure this alongside exploring threading.
I mean the Xenon at the site is not connected to the cloud (just the mesh with the Gateway) because I do not have Particle.connect in my code. So how can I flash new firmware to it?
Do you also recommend not using?
SYSTEM_THREAD(ENABLED);
cloud_check_time > 5000) {
Sorry, I missed that you are not checking on each loop iteration.
In my application, I will have multiple Xenons connected to a Boron. I really do not care if the Xenons connect to the cloud (actually to save on data, eventually I do not want them to connect to the cloud).
So, should I change the code in the loop section to:
If you are using purely SYSTEM_MODE(AUTOMATIC) without messing around with Particle/Mesh. (connect/disconnect), there should be no with mesh disconnecting.