Author Topic: Reverse engineering and a logic analyzer  (Read 3482 times)

0 Members and 1 Guest are viewing this topic.

Offline JaneTopic starter

  • Frequent Contributor
  • **
  • Posts: 381
Reverse engineering and a logic analyzer
« on: August 22, 2015, 03:22:44 pm »
I need to find out how a device read some data from its CPU.
 It uses a program that runs on PC and the PC ,via 4 lines( 3.3V, ground and 2 more lines),   communicates to the device( uploads data to flash, reads registers from CPU etc). So, I used a logic analyzer but not sure how to start interpreting the output (waves) from the logic analyzer. It seems it  could be SDA/SCL protocol but not sure for 100%.
Can anyone provide a clue?
Thanks
 

Offline German_EE

  • Super Contributor
  • ***
  • Posts: 2399
  • Country: de
Re: Reverse engineering and a logic analyzer
« Reply #1 on: August 22, 2015, 03:49:15 pm »
USB is two wire. One signal wire is the inverse of the other so in this case look for signals that are a complementary pair.

I2C is two wire (plus Chip Select) and the signal and clock lines are normally high, pulled low by the sending device.

SDI is two wire (plus Chip Select) and the signal lines are normally low.

There is also a signaling format called 'One Wire' which is anything but, I have no experience of this signal format
« Last Edit: August 22, 2015, 03:51:02 pm by German_EE »
Should you find yourself in a chronically leaking boat, energy devoted to changing vessels is likely to be more productive than energy devoted to patching leaks.

Warren Buffett
 

Offline Godzil

  • Frequent Contributor
  • **
  • Posts: 458
  • Country: fr
    • My own blog
Re: Reverse engineering and a logic analyzer
« Reply #2 on: August 22, 2015, 05:12:39 pm »
German_EE: There is no ChipSelect for i2c, as there is no need for one, as device selection is part of the i2c protocol, so only two signals, SCL and SDA

For SPI it's 3 or 4 wires depending if the slave answer or nor, but it's generally 4: Clock, MISO, MOSI and CS (MISO : Master In Slave Out, MOSI is the reverse)

And the 1-Wire you speak about is a really slow serial interface, that use only one wire (as it's name) do I doubt that it is used on a board like this, it's generally only used for some specific need when we have only one wire that could be used, it's often use for the gas gauge we find insides batteries.


OP: If your logic analyser have i2c protocol decoding function, try it, it's should be fairly easy to find which one is the clock and which one is data.
Apart from that, the protocol used on top of i2c (if it is i2c) could be anything.
Could you explain more about the device you try to reverse?
How the 4 lines are connected to your PC? how it is connected on the other side?

etc.
« Last Edit: August 22, 2015, 05:16:44 pm by Godzil »
When you make hardware without taking into account the needs of the eventual software developers, you end up with bloated hardware full of pointless excess. From the outset one must consider design from both a hardware and software perspective.
-- Yokoi Gunpei
 

Offline mazurov

  • Frequent Contributor
  • **
  • Posts: 524
  • Country: us
Re: Reverse engineering and a logic analyzer
« Reply #3 on: August 22, 2015, 05:59:44 pm »
Asynchronous serial also uses 2 wires. Any decent LA software can decode it and most even auto-detect the speed. Just poke around with several decoders until you start getting info that makes sense. Post a screenshot with a capture, some protocols are trivial to guess.
With sufficient thrust, pigs fly just fine - RFC1925
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf