By placing the BLEFriend module in 'UART Data' mode (set the mode selection switch to UART or setting the MODE pin to gound) you can use the module as a 'transparent UART connection' to the Bluefruit app. This makes data transfer super simple. Data is sent to the app when any 9600 baud data is received on the RXI pin and any data from the app is automatically transmitted via the TXO pin

In order to keep from overloading your microcontroller, you can use the flow control pins. Keep the CTS pin high until you're ready for more data, then ground it to let the Bluefruit module know you're ready for more data!

This mode uses hardware flow control! You must set the CTS pin to ground in order to enable the TXO pin, so if you're wondering why its not sending data, check that CTS is being used right!

You can determine if you are in Data Mode by looking at the mode LED.  It should blink two times followed by a three second pause, as shown below:

You can then connect the the app in UART mode and send/receive data transparently

Switching Command/Data Mode via +++

On either side of the connection (via the Arduino Uno or in your mobile app), you can dynamically switch between command and data mode by sending the "+++\n" string, as detailed in the +++ command summary.

If you start in data mode, you can send text for example, with "+++\nATI\n+++\n", which will cause the Bluefruit LE module to switch to command mode, execute the ATI command, and then switch back to data mode.

The +++ command can be sent from either side, making it possible to execute commands from the mobile application as well as on the Bluefruit LE side.
# Start in Data Mode
> Hello, World! Data mode!
# Send command to switch modes
> +++
# Bluefruit LE module switches to CMD mode
# Send ATI command and wait for the response
< nRF51822 QFAAG00
< B122AAC33F3D2296
< 0.6.2
< 0.6.2
< May 01 2015
< OK
# Switch back to DATA mode
> +++
< OK
# We're back in data mode now
Welcome back!

This guide was first published on May 01, 2015. It was last updated on Mar 08, 2024.

This page (Data Mode) was last updated on Mar 08, 2024.

Text editor powered by tinymce.