BreeeZe / rpos

Raspberry Pi Onvif Server
http://breeeze.github.io/rpos
MIT License
659 stars 147 forks source link

Baudrate is not stable #122

Closed bagrintech closed 2 years ago

bagrintech commented 2 years ago

I set the UART speed to 4800 baudrate (in the rposConfig.json). When I send the "zoom in" command, the baudrate is 4800 5 times out of 10. But 5 times out of 10 the baudrate is 2400 randomly. I observe this with an oscilloscope. An interesting fact is that this happened after the last upgrade of RPI 3. Everything works fine on RPI 4.

RogerHardiman commented 2 years ago

I think the Pi 3 has two UARTs. One uses proper UART hardware inside the Soc The other uses a 'software UART'. I think on the Pi3 the real UART got wired to the Bluetooth chip and the GPIO pins were mapped to the software UART, which did have bugs when CPU speeds where changed, overclocked or throttled. But those bugs were 3 years ago or something like that. There were instructions to switch the GPIO pins over to the real UART.

So this may the cause of the problem.

RogerHardiman commented 2 years ago

https://openenergymonitor.org/forum-archive/node/12311.html

this page had some stuff on re-mapping the UART from the Bluetooth chip to the pins. I'd forgotten all about this problem as I use USB to Serial Adapters (usually USB to RS485 adapters) on the Pi for Serial comms