# Intercept SPI of RC helicopter controller

I've got this radio communication with an RC helicopter. I found that the RX on the heli is using an AVR MCU and a CYRF6989 2.4Ghz chip to communicate with the controller of the heli and translates it to drive the servos and motors. The MCU and the CYRF chip communicate by SPI. I want to intercept and interpret the signal so I soldered some wires on it. I am able to read the signal (either MOSI or MISO) using an Arduino prototype board. But I am having trouble understanding/interpreting the datastream. So I need a different approach than reading only MOSI OR MISO.

My current situation is that the Arduino is the slave, and it will either read the MOSI or MISO signal, but I can't figure out how I would go about reading the whole 'conversation', so both the MOSI and MISO signal. The only thing I can come up with is to connect MOSI and MISO to 1 wire using a diode (so the MCU and CYRF chip on the RX board aren't getting mixed signals) and read the data flowing over that one wire with the arduino board (using the SPI pins of the Atmega 328P). So MOSI and MISO come in over the same wire, which shouldn't be a problem really, as MOSI and MISO will never occur simultaneously. But the problem with that approach is that I do not have an indication of the origin (MOSI or MISO?) of the signal. It would be the easiest to have to SPI buses on the MCU, but thats against principles of SPI and AtMega2560 doesn't have so either.

Basicly my question is, what is a good approach to intercept the SPI conversation, so I am more able to interpret its meaning?

• Get a "soft" SPI implementation for the Arduino/Atmega, and use that for one direction of the conversation and the hardware SPI for the other? Nov 13 '13 at 14:47
• Your challenge may actually be the bandwidth of the back end data export, since you will likely need to store more for analysis than the Arduino can hold. Nov 13 '13 at 18:58
• @ChrisStratton Yes you are totally right. I used a buffer of 1024 bytes on the AtMega328P (Arduino Uno) before printing it over UART to the computer. Now its not possible to add to the byte buffer when the SS has changed, as all byte values are reserved, so going one up to a buffer of unsigned short to be able to add SS changed (value 256) to the buffer, but that reduces buffer size!The 2560 can probably handle a larger buffer. Nov 14 '13 at 6:21
• I'm trying to do same thing, intercepting spi of rc transmitter. Have you succeeded? Did you need any extra tools other than arduino? May 21 '14 at 13:01