Skip to main content
Topic: Suggestion for Bus pirate - slave mode (Read 1012 times) previous topic - next topic

Suggestion for Bus pirate - slave mode

Hello!

I hope i am not saying something stupid here but i think this is a good idéa.

I would like to suggest creating an i2c macro for bus pirate making the bus pirate act as an i2c slave acking everything sent from a master on the bus, and responding to read requests on the different registers with predetermined values.

This could be useful when trying to reverse engineer the communication from an i2c master.


Regards Michael

Re: Suggestion for Bus pirate - slave mode

Reply #1
Hi Michael,

I have been thinking about a SPI/I2C/etc slave device. I would want to do it in a new firmware/device because it will be quite complex and making it fit to the Bus Pirate framework would be a pain.

I think the main thing is that some PC software is needed to configure/setup the slave mode.

Option to ACK every byte.
Store/report activity.
Setup registers - what are the commands, how many bytes for each command, what to reply with,
For EEPROMs how much memory to you emulate
etc

This should probably be combined with a really good I2C sniffer based in a CPLD.
Got a question? Please ask in the forum for the fastest answers.

Re: Suggestion for Bus pirate - slave mode

Reply #2
The upcomming demoboard can simulate various slaves. I dunno if the pic24 has the same hardware (MSSP) to easily simulate the protocols? in software it is nearly impossible to do due to timing.

The commands '{' and '}' are perfect for this, otherwise it can be implemented as a macro.

 

Re: Suggestion for Bus pirate - slave mode

Reply #3
I was thinking a really fast dsPIC (40MIPS) with slave hardware. You'll have to do command lookup really fast through a clumsy, generic kind of thing that abstracts every possible action - before the host wants data back. It could be tricky. A FPGA would be the "proper" thing I think :)
Got a question? Please ask in the forum for the fastest answers.