0

I'm connecting two PCs (one Windows, one Linux) with two RS485 Adapters (A,B,C wire). The problem is.. although both devices are set identically to "19200 8N1" ... I cannot get a working connection, because the bytes arrive in only one direction and the content is scrambled somehow.

I open the device by stty -F /dev/ttyS1 19200 cs8 -parity and do an echo 12345 > /dev/ttyS1 and on windows I always receive the same amount of bytes but scrambled data. With this I receive 0x67 0xb3 0xb2 0x59 0xd9 0xbd. When I do the opposite and send something from windows and try to read in linux I receive nothing ( cat /dev/ttyS1 or od -x < /dev/ttyS1).

Can I somehow figure out what's wrong with the connection by trying to decode how the data is scrambled? Is some sort of UART crypto-analysis possible to figure out wrong settings? Or any ideas what is wrong here?

Hhut
  • 1,128
  • 1
  • 12
  • 24
  • 1
    The bit patterns are too wildly off. I'd look for an electrical problem, starting with proper bus termination. And never skimp on error checking, you ought to get a lot of frame and parity errors. – Hans Passant Jun 21 '14 at 09:46
  • Try transmitting from Linux pc with a default baud rate.I guess it is 115200. – ddpd Jun 21 '14 at 12:20

0 Answers0