Skip to main content

Topics

This section allows you to view all Topics made by this member. Note that you can only see Topics made in areas you currently have access to.

Topics - krishnak

1
Bus Pirate Support / SPISniffer Unix Grep
I am using SPISniffer and I am trying to filter out the output on screen by trying to use grep

/spisniffer -d /dev/ttyUSB0 -s 115200 | egrep -w 'Starting|Configuring|Entering|Happy|0xA8'

The problem I encounter is that only stderr messages are grepped.

Basically only the fprintf messages from SPISniffer

Is there a way I can grep the printf messages from SPISniffer which print out to stdout?
2
Bus Pirate Support / Buspirate SPISniffer Solved
Hi

I got the bus pirate  V3 yesterday. So still a newbie with it.

I am trying to snoop SPI data using it and have hit some problems.

I have a Wiimote like remote control for a game console.

The remote and the console both communicate wirelessly using NRF24L01 nordic chip.

The remote has a led on it to show that it is paired with the game console (you need to press a button on the console and the remote simultaneously to pair them, once paired they are paired for ever).

In the remote, a micro controller communicates with the nRF via SPI.

I am trying to  use buspirate along with SPIsniffer utility to capture the data transfer between the microcontroller and the nrf chip on the remote.

On the buspirate, I run SPIsniffer program - it shows the following at start up

 Parameters used: Device = /dev/ttyUSB0,  Speed = 115200, Clock Edge= 1, Polarity= 0
 Opening Bus Pirate on /dev/ttyUSB0 at 115200bps...
 Starting SPI sniffer...
 Configuring Bus Pirate...
 Entering binary mode...
 (OK) Happy sniffing! Press ESC to stop.
Sync

At this point I have the remote and the game console both powered ON, the LED on the remote shows that it is paired with the game console.

When I start connecting the MISO,MOSI,CLK and CSN to corresponding pins on the remote control (there are proper header)
the pairing light on the remote control goes off - i.e the remote and console no longer communicate.

After some trial and error, I have narrowed it to MOSI pin, i.e when the MOSI pin from bus pirate gets connected to the corresponding SPI pin on the remote, the pairing on the remote switches off. The remote has to be power cycled and bus pirate disconnected to enable the pairing again.

Because of this I am not able to get the SPI data when the remote is paired with the game console.

However I do get SPI data when there is no pairing - the following data gets repeated again and again from the SPI bus
[0x03(0x0E)0x20(0x03)]
[0x00(0x0E)0x0C(0x08)]
[0x03(0x0E)0x20(0x03)]
[0x00(0x0E)0x12(0x08)]
[0x03(0x0E)0x20(0x03)]
[0x00(0x0E)0x00(0x08)]
[0x03(0x0E)0x20(0x03)]
[0x00(0x0E)0x07(0x08)]
[0x03(0x0E)0x20(0x03)]
[0x00(0x0E)0x00(0x08)]
[0x03(0x0E)0x20(0x03)]
[0x00(0x0E)0x01(0x08)]
[0x03(0x0E)0x20(0x03)]
[0x00(0x0E)0x00(0x08)]

Could some one throw some light on to why the nordic chip looses its pairing as soon as a SPI probe is plugged in from buspirate and any ideas to over come it.

Many thanks

( ! ) Fatal error: Uncaught exception 'Elk_Exception' with message 'Please try again. If you come back to this error screen, report the error to an administrator.' in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
( ! ) Elk_Exception: Please try again. If you come back to this error screen, report the error to an administrator. in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
Call Stack
#TimeMemoryFunctionLocation
10.01212278080session_write_close ( )...(null):0
20.01242409672ElkArte\sources\subs\SessionHandler\DatabaseHandler->write( )...(null):0
30.01242410448Database_MySQL->query( ).../DatabaseHandler.php:119
40.06152549184Database_MySQL->error( ).../Db-mysql.class.php:273