Device keeps giving old response. How to get back to previous working condition?

#1

Hey,

I was configuring a uart with the 5th parameter as CALLBACK_WITH_FLAGS and TIMING_ENABLED, I think one of them triggered a repetitive response on the Device and now its emitting that response regardless of the code I use on any of the Device/Agent sides.

How can I reset it? Can I use the option on “DDG Task Deployments” and click on “Restart Devices” to get rid of this?

Thanks for your time.

#2

The device has to be listening to inbound data for restart to do anything (that sends a message to the device to restart its VM).

If, for example, the device is in an infinite loop and never idling, then you’ll need to power cycle it to get it to pick up the new code.

#3

Ok, so a physical reboot only will get it from there?

I wouldn’t say its an infinite loop though, more like repeating a response from an older execution. My thinking is that if it was an infinite loop it would send the same messages endlessly. It only does it when I try to execute new code on the device.

Additionally: what does the “Restart Device” do? I’m curious.

Thanks for your assistance Hugo!

#4

Restart device sends a message to the device which causes it to tear down the squirrel vm and restart it.

The complexity comes because this is a low memory system; the TCP input buffer is only processed when the user code is idle, as this removes the need for staging/buffering space (messages sent to/from the VM may be large). So, if your code is super busy (including transmitting logs up to the server) it may not ever get to hear this message.

We have improvements on the roadmap that would address this condition (device never reading the stream for a long period would result in an automatic reboot).

2 Likes