Electronic – Periodic junk on serial interface

embeddeduart

I have an embedded board, based on Allwinner V40, which has a serial (UART) interface at TTL voltage levels. I access this interface with a little adapter board (MAX232) and a RS232->USB adapter.

Normally, this interface is configured to send debug information (/dev/ttyS0 under linux). I can turn that on and off, and I can send and receive data as I want. However, something else sends data exactly every ten seconds. This is what the junk looks like (10 seconds between each line, recorded at 9600 baud, the third line has been sent by me).

enter image description here

For reference, this is the first line in hex:

0A 05 31 04 41 6C 4E 0A 02 39 02 F3 F0 F4 F7 F1 F1 F6 F3 F1 F6 F1 FF FF FF FE FF FF FF FF FF FF FF

I've tried changing the baud settings etc., in case something else is sending with a different baud rate, but that lead to nothing. I also attempted disabling Bluetooth, since Raspberry Pis have a similar problem when Bluetooth is enabled. That did not help, but it also does not get worse if Bluetooth is actively used.

This is a two-wire UART, there is no flow control. UART 0 is wired up to PB22 and PB23 on the SoC, which seems correct. From my sys_config.fex (I'm using the legacy/Allwinner kernel):

[uart0]
uart0_used       = 1
uart0_port       = 0
uart0_type       = 2
uart0_tx         = port:PB22<2><1><default><default>
uart0_rx         = port:PB23<2><1><default><default>

[uart0_suspend]
uart0_tx         = port:PB22<7><1><default><default>
uart0_rx         = port:PB23<7><1><default><default>

I'm hoping somebody recognizes the bit pattern and could tell me what causes it. Any ideas?

Best Answer

Check with lsof /dev/ttyS0 if there is another process using the port?