I am logging data through the Serial output, for long periods…for days, weeks.
I am using Particle CLI “particle serial monitor --follow”. It works fine, but after awhile, the serial port disconnects and wont reconnect.
The Particle is still online, and is still sending Publish events. Checking the particle in the Console, all health checks come back fine.
DeviceOS 1.2, but this also happened on 1.1
The only way for me to get it to work again is to power cycle the Particle.
Has anyone else experienced this? It seems as though the “Serial” class in the DeviceOS stops working and maybe needs to be reinitialized? I dont see any API to check if this needs to be done, and I wouldn’t want to continuously call Serial.Begin in the loop() would i?
I would try this with a different serial port tool - something like this. I use this daily and have had multiple particle devices running for days/weeks with no issues
While I’ll give that a try, I don’t think it has anything to do with the client side. Even after rebooting the PC, the virtual COM port for the Particle still won’t open. Leading me to believe it’s really an issue on the Particle side.
Interesting - I have never had an issue so far (about 4 month of exposure to this platform so far) - how do you initialise the serial port (in Setup()) ? Are there any loggers also using serial port or multiple threads that attempt to access the serial?