RS-485/RS-422

Hacking multi-tool. Get one for $30, including worldwide shipping.

RS-485/RS-422

Postby signal15 » Wed Sep 21, 2016 3:09 pm

I have a system that consists of a controller, keypads, and modules. They all communicate using either RS-422 or RS-485, based on the chip that's on the board. I don't know which protocol it's using.

I did some searching and couldn't find any answers. Can I use Bus Pirate to figure out if it's RS-485 or RS-422? How?

Also, I'm assuming that if this is possible, I'll also be able to sniff the data going over it so I can reverse engineer the protocol.
signal15
Newbie
Newbie
 
Posts: 2
Joined: Wed Sep 21, 2016 3:02 pm

Re: RS-485/RS-422

Postby signal15 » Tue Nov 08, 2016 9:55 pm

Ok, using an oscilloscope, it looks like the thing I am interested in has a 20v potential difference, 4800 baud (based on ~200us pulse width), and it appears to be inverted as it goes low when data is sent.

Do I use the MOSI and GND to sniff this? How do I deal with inverted data?
signal15
Newbie
Newbie
 
Posts: 2
Joined: Wed Sep 21, 2016 3:02 pm

Re: RS-485/RS-422

Postby Graham242 » Wed Nov 09, 2016 1:10 pm

You don't want to be feeding 20v into the bus pirate. RS-485 and RS-422 are both balanced line, so they both have a pair of wires for TX. These two wires alternate polarity to indicate the signal level. Neither RS-485 nor RS-422 specify anything other than the physical layer, so don't be surprised if it's not a standard serial protocol. (on the other hand, it's not uncommon for a UART to be used, so you may still have joy)

If you don't have a suitable line receiver for this, you might be better off trying to tap the signal at a line driver or receiver and using that instead - at least it's more likely to be at a safer voltage for your bus pirate (5.5v or less!).

On the apparent inversion, don't worry, that's actually normal - if the line was low when idling you'd need to do some inversion. The bus pirate can handle this though.
Graham242
Jr. Member
Jr. Member
 
Posts: 57
Joined: Wed Dec 14, 2011 3:57 am


Return to Bus Pirate Support