0
\$\begingroup\$

I'm reversing a RS485 comunication. I have purchased a logical analyzer for reversing and sniffing the data packets. But i have a problem, don't knowing the exactly comunication parameters i can't "decrypt" the data passing over the bus. How i can reverse this?

I attach a screenshot about the analysis and the used comunication parameters.

Edit: I know that this data segment work at 250kbps and are a segment of varius packet each constructed by 38 bytes. These bytes are some ASCII characters.

The data packets All entire packet First configuration parameters Second configuration parameters

\$\endgroup\$
6
  • 2
    \$\begingroup\$ The best shot you may get answered is: add (more) waveform screen captures, please, along with expected/known message/data associated with that segment of the signal. \$\endgroup\$
    – jay
    Commented Aug 9, 2021 at 14:31
  • \$\begingroup\$ I know that this data segment work at 250kbps and are a segment of varius packet each constructed by 38 bytes. These bytes are some ASCII characters. \$\endgroup\$ Commented Aug 9, 2021 at 14:37
  • \$\begingroup\$ You have set the data bits to 6, but you need 7 bits for ASCII. The most common format for UART ASCII communications is 8 bits, no parity, one stop bit. \$\endgroup\$ Commented Aug 9, 2021 at 14:42
  • \$\begingroup\$ @PeterBennett i tried in this configuration. But not resolved :( I used the second probe for analyzing the signal and i'm starting to reading some real bytes but not resolving yet imgur.com/a/1qI5HGw \$\endgroup\$ Commented Aug 9, 2021 at 14:54
  • 5
    \$\begingroup\$ Would you please tell us what are you reverse-engineering? If you know it's 250kbps, what else you do know? Also what is the logic analyzer sampling rate? I would suggest it is set much beyond 1 MHz to see anything useful. A real UART would use 4 MHz or 2 MHz to sample 250kbps signal. Also which pin are you measuring, RS485 bus directly or RX/TX data pin at transceiver? \$\endgroup\$
    – Justme
    Commented Aug 9, 2021 at 14:56

2 Answers 2

2
\$\begingroup\$

UART data is sent with one active bit to start, and at least one inactive bit to stop.

Here:

enter image description here

It seems to be plain old 8,n,1 (8 data bits, no parity, one stop bit), sending 0x00. It could also be that stop is 2, or since data are always zero in the captured frames, parity is odd. Or even that it's transmitting a ninth bit and data are 0x100.

As for the packet, it looks all zeroes? Not exactly enough pixels in the view but it looks very regular regardless. You'll need some way to stimulate data out of the thing to make any progress decoding it. Sharing what the device is, would likely prove useful, and you may also consider reverse-engineering it, for various methods of attack: direct connections to data sources (ADCs, other comm channels, etc.), dumping the firmware (it might be locked, but there's a chance it's not, and there are ways to bypass the check) and reverse-engineering that, etc.

\$\endgroup\$
0
\$\begingroup\$

The second waveform is a packet (?), then, assuming it is common UART serial data format, and assuming it has protocols in good shape:
The very beginning of the packet has "flag" and "headers". In the middle somewhere has "payload". If the data are for sure ASCII; capture a few, expand the timing, find the patterns of '0' or '1' appearing at either the b[0] or b[7] (since it likely is 8 bits data stream). ASCII data is loaded in 7 bits, so the MSB likely be the same, unless it does "don't care". Start/stop bits can be resolved by a similar analisys. Please do the capture, and post.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.