BLE-Shield v1.0.0

The Bluetooth Low Energy (BLE) Shield for Arduino is a Shield that enables Arduino projects to communicate with Bluetooth Smart devices such as the iPhone 4s, iPhone5, iPad 3rd and 4th generation as well as the iPad Mini without Jailbreaking.

Simply attach the BLE Shield to an Arduino and write and read data to and from the Arduino using the Serial Port which can be the hardware Serial on pins 0 and 1 or a software serial port on pins 2 and 3. The selection is done using the switch on the BLE Shield.

How does the BLE Shield work?

The BLE Shield is using a Bluetooth Low Energy Module BLE112 from Bluegiga. It provides three services, where two services are BLE related services which are mandatory for BLE peripherals, and one service which is specific to the BLE Shield, the BLE Shield Service.

The view towards the mentioned characteristics is when you look from e.g. the iPhone to the BLE Shield. The data which is sent over the TX characteristic (max. 16 bytes of data) is transferred to the Arduino’s RX pin. Either pin 0 or pin 2 of the Arduino depending on the switch position of the shield. The transmitted data is then available to the Arduino using Serial.read() calls. On the other side the iPhone can read data from the Arduino using the RX characteristic. Here is a small difference compared to the TX characteristic. The data on the RX characteristic is only available after the internal 16 byte buffer is completely filled up. This means, if you are e.g. transferring a byte, you need to fill the buffer with leading zeros for instance. This internal buffer was necessary to implement, since otherwise the data you transfer from the Arduino to the iPhone is fragmented. This is a problem when you expect structured data sent from the Arduino, which is notified or indicated.

The RX characteristic can be read or notified. If you enable notifications on the RX characteristic there is no need to poll for new data. The BLE Shield will send you the 16 byte buffer automatically once it is filled up. Both the RX Buffer Count and Buffer Clear Characteristic are used to control this buffer. Read how many data has been already written from the Arduino to the buffer, or clear the buffer to zero.

Tested Arduino Boards

I have tested the following Arduino and Arduino Compatible boards with the BLE-Shield:

1) Using the Arduino Leonardo, the Serial Port switch must be on the Tx0/Rx1 position. The switch setting Tx2/Rx3 cannot be used, since it seems that SoftwareSerial is not supported on Pins 2 and 3. See the modified sample sketch for the Leonardo on the github repository in the Arduino directory.