8devices Community
https://www.8devices.com/community/

Serial data getting lost - bug or a feature?
https://www.8devices.com/community/viewtopic.php?f=13&t=1069
Page 1 of 1

Author:  valent [ 16 Oct 2017, 20:15 ]
Post subject:  Serial data getting lost - bug or a feature?

Hi,
I'm working with Lede on Carambola2 to gather sensor data over serial, save it and transfer it to "cloud".

Previous firmware was based on OpenWrt Chaos Calmer but latest one is based upon Lede 17.01.01. I'll test it also with 17.01.03 soon.

What I have discovered is that now with using Lede sometimes there are missing characters while reading data from serial connection.

Data is not constantly being read, but sensor device is logging data usually for 8 hours and then data is read via serial in one big "download". During these downloads I have never seen a character go missing while Chaos Calmer was used.

What was even stranger is that sometimes I did get these "bad logs" (ie ones with few missing characters) but sometimes log download went perfectly!

After some head scratching and troubleshooting I managed to reproduce this "bug" 100% and it was due to wifi! But only if wifi was enabled and not being used!

So if radio was enabled, in sta mode but not connected to AP errors would happen! It I would disable wifi or if radio was associated with AP then there would be no errors during reading data from serial connection.

Is there any explanation for this behaviour? Is this a bug or a feature? Is there any change between OpenWrt CC version and Lede that could explain this?

Thanks in advance for any insight and answers,
Valent.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/