Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info
iconfalse
Excerpt

We detail how we used an nrf8001 Bluetooth low-energy (BLE) breakout board from Adafruit to demonstrate remote configuration of a mote.





...

Since transactions are asynchronous, it is possible to send a command while receiving incoming data or a response to a previous command.  The application could handle this by always transferring a maximum (32-byte) SPI buffer for each master transaction, but the mote SPI bus allows for more flexibility than that. Rather than using one of the built-in slave-select lines, the application uses an output line (S_MOSI) to stop the SPI transfer after receiving the incoming header. It decides which packet (incoming or outgoing) is longer, and only clocks out the needed bytes to send in each direction.  

Hardware Connection

LTC5800 pinDirection (from LTC5800)nrf8001 pinNotes
M_SCK
OUT (SPI)
SCK
SPI Master clock
M_MISO
IN (SPI)
MISO
SPI Master input
M_MOSI
OUT (SPI)
MOSI
SPI Master output
S_MOSI
OUT
REQn
Used in place of slave select (active low)
DP2
IN
RDYn
Signals that the nrf8001 is ready to transfer asynchronous data (active low)
NC

ACT
No connect
PWM0
OUT
RSTn
nrf8001 reset (active low)
NC

3Vo
No connect
GND

GND
Ground
VSUPPLY

VIN
3.6 volts

Mote CLI commands

The sample app adds two CLI commands to the basic set provided by the stack:

  • send - once connected, this command allows you to send text strings (<= 20 bytes) to the iOS Connect application. It prints an error if there is no BLE connection
  • reset - resets the mote (and the nrf8001 chip)

Running the Demo

Connect to the mote CLI (9600 baud, 8 data bits, 1 stop bit, no parity) to view mote prints.

...