How to send a Bluefruit UART message with a null character

Oscar de la Hera Gomez
Two flowers that represent Arduino and Bluetooth side by side. Beneath them sits the text "Bluefuit UART message terminating in a null character."

To send a Bluetooth Low Energy (BLE) UART message that ends with a null character (i.e. "\0"), create a uint_8 array that holds the bytes of your message and send the message using the bleuart.write function.

The following project assumes that you have setup your Arduino project to work with an Adafruit nRF52 Bluefruit LE chip.

To learn how to set this up, consult the guide below.

After setting up the Adafruit nRF52 Bluefruit LE, you can send a message that ends with a null character use code similar to that below.

As noted in the code above, this message breaks the default 20 byte Maximum Transmission Unit (MTU) and requires you to change the Bluefruit's MTU to allow for it.

To learn how to do this, consult the tutorial linked below.

Looking to send a UART message that does not terminate with a null character ?

To learn how to send a UART message using an Adafruit Bluefruit nRF52 LE that does not end with a null character, consult the tutorial below.

Any Questions?

We are actively looking for feedback on how to improve this resource. Please send us a note to inquiries@delasign.com with any thoughts or feedback you may have.
delasign logo

Book a Free Consultation.

An icon of an email.

Click here to email us.

Fill in the details below to book a free consultation or to let us know about something else. Whatever it is, we are here to help.

How can we help you ?

Contact Details