path: root/src/host/osmocon/osmocon.c
diff options
authorChristian Vogel <>2010-04-12 12:29:00 +0200
committerHarald Welte <>2010-04-12 12:29:00 +0200
commit9b7dbede26d58e80ec920e2d550e2d862a8d706d (patch)
treeae33a0033c00b54d968175e7ada39647a3376051 /src/host/osmocon/osmocon.c
parent93b04a5d32c553b7eaa10361afc57b5efafba064 (diff)
UART initialisation, serial port errors
Additional initialisations for the UART to make the data corruption from the PC to the Phone go away. I've seen a lot of systematic character swaps on the serial port, especially in the vincinity of 0-bytes. As the XON/XOFF registers are the only thing in the UART that look like they would consider the actual data sent, I've added this initialisation to uart.c This makes the problem go away completely on my C123. To check for it I've added CRCs to the HDLC protocol and checked for bad frames, and also compared them in a (patched) osmocon that just sends random garbate in a special DLCI. The bad frames I observed always looked like this (number in parenthesis define number of omitted bytes, for brevity): <------ good bytes ----------> <-recvd|sent-> <----- identical again ------> d0 e0 00 00..(107)..f7 ce 17 c4 < 0c 00|00 0c > db 70 ba cb..(67)..d8 6d 3a 1f 31 e1 00 00..(47)..38 ca 2f e5 < 0c 00|00 0c > f8 a3 77 5f..(127)..5b 72 ff 4a <-- good -> <--- bad -----> <---- good again -------------> dc e1 00 00 < 0c 00|00 0c > 87 cb 24 83..(178)..2f 69 b3 51 ae e2 00 00..(167) 18 6f a1 < 0c 00|00 0c > 2f 53 d2 b2..(7)..da c7 1b 63 dc e3 00 00..(131)..8e 2c b0 a8 < 0c 00|00 0c > 40 62 56 5f..(43)..f0 3a 47 f7 Formerly I was observing about 10 packets for every 2000 sent (with 192 bytes of payload each). Now, with the added initialisation, I see (as the time of writing this email) 12000 packets with 192 bytes each sent, with 0 bytes missing, corrupted, flipped).
Diffstat (limited to 'src/host/osmocon/osmocon.c')
0 files changed, 0 insertions, 0 deletions