I2C bus capture

I may be missing something, but does bus pirate actually work to receive and display data on a bus? That’s what I most often need to do, and usually end up writing some hacky arduino code for a Pi Pico. Currently I need to see what’s happening on an I2C bus, and from the instructions it does not obvious how.

Look at the SI7021/HTU21/SHT21 device demo. It shows you how to explicitly transmit an I2C code, and the response you get back. There is also a macro that does this and more. And there is an I2C address scan macro.

1 Like

Thanks, but again, that is not what I want to do. I want to spy a bus with several devices on it (one master and some slaves) and capture the small bursts of data that are used to initialize those devices. I do not want to transmit.
Is this possible?

There is Experimental scope mode, and you can use the BP with sigrok to get a logic analyzer. I think this post is a start but perhaps there is a further development?

Since I2C is fairly slow, a logic analyzer is useful for recording most bus traffic. The Bus Pirate has a fairly fast logic analyzer with 128K samples. In my experience this is almost always the best approach to reverse engineering because it shows you everything going on, even non-standard stuff.

Something that just sits there and dumps all the traffic is generally called a bus sniffer. I haven’t implemented this yet, but I will eventually. Sniffers fall short because they expect the bus to operate precisely according to standard.

I stated an SPI sniffer, but it is incomplete. Grabbing the byte values with the PIO is easy. However, the tricky bit is how to mark the Chip Select changes. This will be the same challenge with sniffing I2C - how to mark the START and STOP conditions.

1 Like