EmbeddedRelated.com
Forums

Monitoring RS485

Started by Daniele November 29, 2005
"Daniele" <daniele.gadaleta@gmail.com> wrote in message 
news:1133437674.119447.229060@g44g2000cwa.googlegroups.com...
>I think that's a big trouble, i don't know how this device work. I have > a keyboard connected with a device and i need to see what message are > exchanged from this two. But i see only that the two device use rs485 > to comunicate. Do you think this is an impossible mission? Some help > for me? > > Daniele >
To help further, 1) Do you mean that the keyboard is communicating with this 'device' using RS485 signal levels? 2) Do you know this because you have opened up the case and looked at the driver chip? 3) Have you monitored the data using a scope? 4) What is the 'device'? 5) Do you know if data is only on the bus when a key is pressed or is data always apparent (when no keys are pressed)? In this area nothing is impossible. If its genuine RS485 signal levels and uses a reasonble protocol (8 or 9 data bits, start & stop bits etc.), then it could be very easy to capture the data. What you do with that data is probably the hard part. If all you need is to see what data is sent on a keypress on the keyboard then this sounds easy... it all depends. It's hard not seeing the two devices and not knowing what you are after exactly, to say easy or hard. But generally getting the data is easy. Working out what the data does etc. is hard and sometimes VERY hard. If lots of continuous random looking data and/or data is encrypted in some way then I wouldn't even bother. But you won't know that unless you have a first stab at it. Get a scope on the job first. If you can capture a burst of data from a keypress and your scope has deep memory then you can decipher small packets by measuring the bits (I hate doing this as it takes ages, but in your case it would be a start) ... Jim .
Ok, i opened the box that contains the device, the Keybord isn't only a
keyboard but contains a display and some output device, the
comunication, I think, is full duplex.
1) The keybord is used to setting configuration parameter, the lcd
display and other led's to output the configuration and state
2) No, the driver chip isn't visible, is covered.
3) No, but this is a good idea
4) The device contains a microprocessor or microcontroller, but all the
Integrated Circuit is covered and serial number erased.
5) The data is bidirectional mode from the First device to the second
and return. My plan is to generate an output from the main device to
the keybord and display. Then press a key and see what data is
exchanged. Then i think to generate all the possible output to build
the tree of command and signal.

When I opened the main device I saw printed on board where the keyboard
is connected "RS485" with connections named "A, B , +, -". Only 4 wire.

Jim, thank you for help 
Daniele

Daniele wrote:

> Ok, i opened the box that contains the device, the Keybord isn't only a > keyboard but contains a display and some output device, the > comunication, I think, is full duplex. > 1) The keybord is used to setting configuration parameter, the lcd > display and other led's to output the configuration and state > 2) No, the driver chip isn't visible, is covered. > 3) No, but this is a good idea > 4) The device contains a microprocessor or microcontroller, but all the > Integrated Circuit is covered and serial number erased. > 5) The data is bidirectional mode from the First device to the second > and return. My plan is to generate an output from the main device to > the keybord and display. Then press a key and see what data is > exchanged. Then i think to generate all the possible output to build > the tree of command and signal. > > When I opened the main device I saw printed on board where the keyboard > is connected "RS485" with connections named "A, B , +, -". Only 4 wire. > > Jim, thank you for help > Daniele
Is this a keyboard for a Point of Sale device?
No, but this isn't a quiz like "what type of device is?" :) . The
device is a central for fire alarm.

"Daniele" <daniele.gadaleta@gmail.com> wrote in message 
news:1133536090.330205.134250@g47g2000cwa.googlegroups.com...
> No, but this isn't a quiz like "what type of device is?" :) . The > device is a central for fire alarm. >
Do you mean the main control panel device for a fire panel?. What manufacture and model number is it? I only ask because I have a college who used to work for a fire panel manufacturer. He might be able to shed some light on the subject. From your answers to my long query list it can almost be assumed that the (lets call it an FP for now), FP microcontroller is controlling the RS485 bus. Therefore it would also be reasonable assumption that it is using a standard UART and therefore that the data will be able to be picked out using PC software (Although standard PC UARTS do not support 9-bit data it is possible in most cases to use the parity bit for the 9th bit, unless the protocol is using parity as well - lets assume that this is not the case). So... My suggestion would be to get hold of one of those RS485 to RS232 converters. Hook it up to a PC serial port and connect the RS485 end to the bus. You will not need to transmit onto the bus and so this should be quite easy. Next, scope the waveform on the bus and determine the baud rate and bit depth, stop bits etc. Then set these parameters in hyperminal and see what data you capture. Unfortunately because hyperterminal is not a binary to ASCII converter you will only see ASCII valid charaters and its possbile that some data will be lost. Once you have this working then you need to find/beg/borrow/write etc. an application that allows you to capture binary data (0-255) and be able to display the digits 0-255. If you know VB or VC++ or whatever then this is quite easy using the MSCOM control and in fact if you got to the "code project" website (www.codeproject.com) you might find someone has already done one (not checked so I don't know if this is the case). Then... start deciphering.. Good luck! Jim www.picmodules.com
hello,

I thinking of realizing a wireless link, from a portable PIC system to a PC.
The needed datarate is about 100 kbit.
No (or maybe very slow) data from PC to PIC.

Another requirement is to use as much standard components as possible.

So there seems 2 ways to go:  wifi  or  bluetooth.

Now my guess is that bluetooth devices are easier to interface with a pic,
and more general available (in small quantities)  then wifi.

Anyone has experience with these interfaces ?
Any other comment ?

thanks,
Stef Mientki
In article <El0kf.9229$Cj5.3949@newsfe6-win.ntli.net>, 
tech@picmodules.com says...
> My suggestion would be to get hold of one of those RS485 to RS232 > converters. Hook it up to a PC serial port and connect the RS485 end to the > bus. You will not need to transmit onto the bus and so this should be quite > easy. Next, scope the waveform on the bus and determine the baud rate and > bit depth, stop bits etc. Then set these parameters in hyperminal and see > what data you capture. Unfortunately because hyperterminal is not a binary > to ASCII converter you will only see ASCII valid charaters and its possbile > that some data will be lost. Once you have this working then you need to > find/beg/borrow/write etc. an application that allows you to capture binary > data (0-255) and be able to display the digits 0-255.
Or just use a reasonable terminal emulator. For Windows based PCs Realterm come to mind but there are others. FOr that matter it was possible to do this with PC-Kermit if I remember correctly. Hyperterminal is worth rather less than you paid for it. Robert
Well, after some day of work i have this trouble:
- I don't know what is the speed of the device
- I don't know how many bit it ues
- I don't know if parity bit is present

Then when I connect the PC with the two device, the display of second
device (the keyboard, with lcd display) send a connection error (open
the connection via Hyperterminal).
What my problem? How i can decide what is the configuration parameters
for Hyperterminal (speed, data bit number, parity, stop bit number,
ecc...)? It's linked with integrate type? I can read the IC's part
number than I can search for spech?

Thanks in advanced
Daniele

"Daniele" <daniele.gadaleta@gmail.com> wrote in message
news:1134553987.032115.131100@o13g2000cwo.googlegroups.com...
> Well, after some day of work i have this trouble: > - I don't know what is the speed of the device
With an oscilloscope, you can tell the speed within seconds.
> - I don't know how many bit it ues
If single bytes are sent with delays between, see above.
> - I don't know if parity bit is present
See above.
> Then when I connect the PC with the two device, the display of second > device (the keyboard, with lcd display) send a connection error (open > the connection via Hyperterminal).
Hyperterminal is crap. When you open a com port with data present, hyperterm says it cannot open the port in 95% of the cases. This is a hyperterminal error. Use for instance TeraTerm (free), which works like a charm. With TT you can also change all com settings (baud, bits etc) on the fly without having to close the connection first, like hyperterm wants.
> What my problem? How i can decide what is the configuration parameters > for Hyperterminal (speed, data bit number, parity, stop bit number, > ecc...)? It's linked with integrate type? I can read the IC's part > number than I can search for spech?
Drop hyperterm and use decent software. Meindert
What software? can you give me some one?