[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bluetooth-dev] UART problems




Hi, 
as we have seen that some of you are experiencing problems
with 'trashed data on the uart' when running the stack on 
a standard linux machine we would like to find out whether
this is caused by the stack or errors on the serial port. 
Especially when running on certain laptop models there has
been problems at higher speeds.

Since HCI isn't capable of handling erroneous data on the
UART the whole stack is malfunctioned as a result when only 
a single byte is trashed or lost on the serial port.

If you repeatedly experience 'trashed data on UART' messages 
when using the stack please run the attached test application
on the two serial ports that you normally use when running the
stack.

See README.txt for details

brgds
Axis Bluetooth Team

sertest.tgz


A small program to test a serialport
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

It simply sends a string of data over a serial cable, on the other side
the data is echoed back if it was correct, when received it is once again 
checked.

"Server" side - echoes back received data if ok
"Client" side - starts sending data and checks echoed data for errors

The program uses default /dev/ttyS0 and 115200 bps, if you need other 
setting simply change defines in serialtest.c and recompile.

tar xvzf sertest.tgz
cd sertest
'make'


Start the application (as root) on server side with 

./sertest -e  
which waits for 127 chars (0,1,2,3...) and when all are received it 
checks that they look ok. Then it echoes it back to the initiator.


On the 'client' side start (as root) 

./sertest 
which will start sending 127 characters on the serial port. After getting 
the echo response back it checks the data for errors and then sends 
another chunk of data if the received data was ok.


As soon as either side sees any errors it will stop.
If you see this happening try using another computer, preferably a 
stationary (some laptops has strange voltage levels on their serial 
port...)


If errors occur on either of the serialports the program is stopped.

* When using older Ericsson modules like P9A and below there are quite often 
  trashed data on the modules uart (especially when running at higher speeds).

* Old computer (e.g i386/486) with 'bad' IRQ setttings for
  serial port might cause trashed data on the uart.

* Especially when running on a some laptops we have experienced errors 
  after just a couple of seconds when running this program.

* We have never seen any problems on a stationary computer.

---

brgds
Axis Bluetooth Team