I2C bus sniffer
- Project: I2cDebugger
- Project status: Finished
- Page created: 2008-12-03,
last update: 2009-03-19
For some electronics projects, I use the I2C bus for connecting parts of the
circuit. It would be nice to have a device that can sniff that bus at
runtime of the circuit, decode that data and save it for future analysis.
It might also prove handy to be able to send handcrafted data packets to
given addresses on the bus. Such a device should be possible to build, at
least for standard speed I2C communications.
The device I have built is able to sniff an I2C bus and show the gathered
data in a textual user interface. Once the need arises, I might implement
some more features of it, but until then, I am marking this as "finished".
- I2C interface easy to integrate in hardware designs by means of a "standard" connector (my standard or public standard)
- USB attached to computer (my notebook, for example) running FreeBSD
- Graphical user interface (GUI) on computer
- Plugin mechanism to decode data in GUI
- GUI way to input recipient's address and data byte-by-byte or in larger
chunks, this data then being injected into the I2C bus
- probably also automatically encoded by a plugin?
- Verifying signal timings and I2C compliance would be nice to have, but
complicated to include (high sample rate required)
- For data injection, configure being either master or slave, and pulling up
SDA/SCL or not
- Can we somehow sense which line is clock and which is data (if there is
traffic on the bus at least)?
- Keep I2C wires to the converter box short for signal integrity
- Write GUI in Python?
- Do I need some data buffer space in the device, or can I transfer through
USB in i2c realtime?
- Rough sketches and implementation
- How microcontroller device and PC application talk to each other: The USB
- The board: ID-B01