Pages: [1]   Go Down
Author Topic: Sniffing communication  (Read 1142 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 10
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I want to interface with a device with Arduino but first I need to completely decode the communication protocol used between native devices.

I connected a logic analyzer and saw all the pulses between the two devices fine. However the communication appears to be bi-directional on a single data line. What's the easiest way to find out which side is sending and which side is receiving?

Thanks.

Max
Logged

UK
Offline Offline
Faraday Member
**
Karma: 17
Posts: 2884
Gorm deficient
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
What's the easiest way to find out which side is sending and which side is receiving?
Ask the manufacturer.
Logged

Per Arduino ad Astra

0
Offline Offline
Newbie
*
Karma: 0
Posts: 10
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I  don't think they are willing to give out proprietary information like that.
Logged

UK
Offline Offline
Faraday Member
**
Karma: 17
Posts: 2884
Gorm deficient
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If you told us stuff like what the devices are, what the communications look like, what rate they run at..., we might be able to help.
But you asked for the easiest way.
Logged

Per Arduino ad Astra

0
Offline Offline
Newbie
*
Karma: 0
Posts: 10
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I didn't think those information is necessary since it is a generic question on how to find out the source of a bidirectional communication.

There are three lines involved. All are high when idle. One line appears to be clock line, it pulsess eight times in a group.  Another line goes low during the eight cycles of clock. The third line is data. The bit appears on the rising edge of the clock.

The clock period is 16 microseconds.

All three lines may be bidirectional. I want to find out which side sends out the bytes and how the other side responds.

Thanks.

Max

Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 639
Posts: 34726
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
What's the easiest way to find out which side is sending and which side is receiving?

Put a small potential divider one side of your sniffing point, so that it just drops the voltage by say half a volt from one device.
Then the signals that are slightly lower are the ones coming from the device up stream of the divider.
Make sure you don't stop it from working like this and also make sure your logic analyser will differentiate between slightly different height pulses.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 10
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Mike,

Interesting idea. The logic analyzer has a fixed logic high voltage. I will see if the device has a lower logic high voltage so both can work.

Thanks.
Logged

0
Offline Offline
Shannon Member
****
Karma: 223
Posts: 12745
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You need a 'scope, not a logic analyser for this.  The protocol is likely to be either some sort of SPI or I2C so mug up on those protocols and you might well figure it out.
Logged

[ I won't respond to messages, use the forum please ]

Norway
Offline Offline
Sr. Member
****
Karma: 0
Posts: 344
Just dip it in mercury and power it up
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

have you g**gled up the individual chips?
There might be a datasheet on the communication protocoll
the odds are that these chips are used by more than one manufacturer.

David
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 10
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It has features similiar to many bus protocols. The SS line, clock, and data seem like a 3-wire SPI but the data pulses also seem to have start and stop bit like I2C.

The chip might be an ASIC and I couldn't find any datasheet.

Max
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 639
Posts: 34726
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
The logic analyzer has a fixed logic high voltage.

In that case you need a bit of extra help from some external circuits. Take a diode and resistor and put it series with the data line. Now data will only flow one way. So now repeat the arrangement but with the diode going the other way in parallel with the first diode and resistor.

Now you will get a voltage drop across one of the resistors when there is a high level, the resistor that you see the drop across will be dependent on the direction of the signal. This isn't a very big drop so to make it suitable for your logic analyser you need to wire a comparator across each of the resistors. You then have two signals to feed into the analyser, representing the two direction of travel of the signals.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 10
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Mike,

This is an interesting idea. I wil try it. However I am not sure it will work if the input end has very high impediance. There will be virtually no current and therefore no voltage drop across the resistors.

Actually the divider idea worked to certain degree. I used a pot and tried to see how the communication was affected by the pot position/output voltage. I was able to identify some data direction but not all since I couldn't maintain the communition.

Thanks.
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 639
Posts: 34726
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
However I am not sure it will work if the input end has very high impediance.

You can always load the line with a resistor across it.
Logged

Pages: [1]   Go Up
Jump to: