Skip to main content
Topic: Learning to use BP's binary mode: Chipcon proprietary protocol (Read 3079 times) previous topic - next topic

Learning to use BP's binary mode: Chipcon proprietary protocol

I am interested in writing a program that uses Bus Pirate's binary mode to implement Chipcon's proprietary CC1110/ CC2430/ CC2510 Debug and Programming protocol. (Documented here)

Can anyone point me to examples (especially in python) that use any of the binary modes? I see BPbinmode.pl in svn, I'm looking for all I can find.

The protocol is described as "SPI-like", but without SPI's SS pin. It uses three wires: CLK, DATA, and !RST, which resets when held low. Given that, I'm trying to figure out which binary mode would work best to implement this, and really needing to see code where modes are being used to do that.

Thanks for reading
Phip

Re: Learning to use BP's binary mode: Chipcon proprietary protocol

Reply #1
I would suggest first try to manually interact with it using the 2wire interface. You need the 2wire interface because the data in and data out are on the same wire.

Just from the timing diagram on page3, I would say use this:

Code: [Select]
0bCCCCCIOO out1 .. out4 r

CCCCCC is the comand
I is the number of bytes in (read)
OO is the number of bytes out (write)

in the wiki the 2wire interface is described here: http://dangerousprototypes.com/docs/Raw_2-wire . the binary mode to use 2wire is here: http://dangerousprototypes.com/docs/Raw-wire_(binary) . Be sure to put /rst in the right state and mind the bitorder.

Re: Learning to use BP's binary mode: Chipcon proprietary protocol

Reply #2
Thank you, this helps tremendously!

I am studying over the RAW_WIRE.py / rawwire.py classes in pyBusPirateLite, and the main thing I'm confused about is whether the clock pulses need to be triggered manually. Nothing I've found seems to manage the clock pin explicitly when sending data. Meanwhile there are clock_low, clock_high, and clock_tick functions but I haven't seen them used.

Re: Learning to use BP's binary mode: Chipcon proprietary protocol

Reply #3
the clock is done automatically when sending data no need to take care of that. Those function are for weird busses and general not needed.

Re: Learning to use BP's binary mode: Chipcon proprietary protocol

Reply #4
I'm not sure if you are still having a problem, but I just posted code which makes it easier to do these kind of things (an update to pyBusPirateLite).  Your best bet for communication is probably bin mode, and communicating it bit by bit (I think it is called 'bit bang').  The updated library is made just to do this sort of thing!

A word of caution though is that it can currently only send/receive at around 500 Hz.  This is a bug that I am trying to fix.

Re: Learning to use BP's binary mode: Chipcon proprietary pr

Reply #5
I have also been intrested in working with the CC2533, it has built-in I2C and SPI interfaces, so you can hook up all those fancy sensors right in.
As far as I know Goodfet support this protocol, you may get some PCBs from the developer.
It's easy to build it and currently support a lot of features, a nice project, by the way, inspired by the bus pirate.