I'm a bit of newb to Pis but done plenty of stuff in the world of PCs (now a total Pi convert tho)
I'm trying to interface an RFID head to my Pi 3 using RS485 (with the AB electronics 485 board), didn't have too much luck (none); so decided to start with the basics and make sure I was getting sensible comms. I have a RS485-USB dongle on my PC (RS components 687-7837) connected to the pi board on about 12 inches of twisted pair, with the 120ohm resistor across the A-B lines as per instructions, its definitely needed as without it I get nothing.
The Pi is running latest Jessie and I've done all the stuff with turning off the console, swapping the ports about etc so my 485 is appearing on AMA0 (I assume it is all connecting OK as I am getting something out the other end -- bad assumption ?..)
I'm running python code (2.7) on the Pi to output 'x' on the UART :
ser = serial.Serial(
port = '/dev/ttyAMA0',
baudrate = 4800,
parity = serial.PARITY_NONE,
stopbits = serial.STOPBITS_ONE,
bytesize = serial.EIGHTBITS,
I'm using ComDebug on the windows PC to see what is coming in: ( and tried with putty and a visual studio c# app that i knocked up to try too)
All the baud rates etc match exactly.
I see 3 bytes coming in (HEX values) with each transmission from the Pi
But the bytes don't decode to the correct ascii.... its always the same data and I have played with every combination of baud/rts/xon/stop bits etc.
I've googled my heart out and I either don't understand the posts i find or I'm missing something somewhere.
Hope someone can point out the schoolboy error.....thanks for reading