FlexSEA Wiki


User Tools

Site Tools


Using Bluetooth

Some FlexSEA boards come with onboard Bluetooth, and most can support an external module on their expansion connector. In all cases, a Microchip RN42 pre-certified Class 2 Bluetooth radio is used. Using the Serial Port Profile (SPP), it is seen as a COM port on your computer (same deal as with serial-over-USB).

Before starting this guide, please make sure that:

Connecting a module to your computer for the first time

  1. Write-down the Bluetooth address shortcut. If you look at the module, it's the last 4 characters of the 12-character long MAC address. The values are in hexadecimal. For this guide, we will assume our module's address is 00066612ABCD.
    1. All modules will start with 000666. Only the last 6 values will change.
    2. In this example, the value to remember is ABCD.
    3. Note that if you can't read the address, you can still proceed as long as you don't have many unknown FlexSEA devices powered near your computer.
  2. Power up the circuit. USB or battery power can be used. For USB it is recommended to use a good powered hub to guarantee a stable power supply.
  3. Look at the Bluetooth LEDs (if they are visible). You should see a slow green blink.
  4. In Windows Settings, open “Bluetooth & other devices” and click on “Add Bluetooth or other device”, then on Bluetooth.
    1. Wait until it finds FlexSEA-ABCD. If you see RBNT-ABCD you'll need to configure the module.
    2. Add the peripheral. If it requires a pin-code, use 1234. If it shows a long numerical code, confirm it as good and click on connect.
  5. After Windows indicates the peripheral has been installed and paired, click on “More Bluetooth Options” (either on the right column, or below the peripheral list depending on the Windows 10 version), and then on “COM Ports”
  6. Find your module. It will have two COM port numbers, one marked as incoming and one as outgoing (Direction column). Write down the outgoing port number (ex.: COM7).

You are now ready to use this module with the GUI.

Stream data with Bluetooth

Using the GUI with Bluetooth is almost the same as with USB. You start by opening a COM port, and you can stream sensor values and send control commands. The only difference is that with Bluetooth you should always be in Auto mode.

Plan 2.0:

Plan 3.0:

Normal mode: for every packet the GUI will send a Read request, and the circuit will send a Reply packet. If you are streaming at 100Hz, it means that you'll be sending Read packets every 10ms, and receiving replies shortly after. The packet rate will be 200/s.

Auto mode: the GUI will send one special configuration packet telling the circuit to send replies at the requested frequency. Streaming at 100Hz means a packet rate of 100/s, and unidirectional radio communication.

Using Normal mode at speeds above 30Hz while on Bluetooth can lead to communication crashes. Always use Auto and you'll be able to reliably stream at 200Hz.

After you open the COM port we recommend that you wait 10-15s before starting to stream at high-speeds.


  • My computer doesn't see the module:
    • Make sure that Bluetooth is turned ON, and the drivers are up to date
    • External adapters, such as the product from Pluggable, can sometimes be better than the onboard module that comes with computers
    • Make sure that your Bluetooth module is not held in reset by Manage/Mn. The LEDs will tell you (ie: no LEDs = reset or no power)
  • Everything was working flawlessly, I changed nothing and now it's broken…
    • Windows updates have a tendency to break Bluetooth. Update your drivers, or roll-back to the previous state.
    • Are you sure you didn't change something? Read the next section.
    • When in doubt, power cycle the hardware and restart your computer.
  • Inconsistent (aka “choppy”) data rates
    • Are you using other Bluetooth peripherals? Bluetooth headphones require significant bandwidth. And so does the Microsoft Pen, for no valid reason.
    • Is your CPU power-scaling? This is mostly an issue with tablets or laptops.
    • Make sure that you are not confusing two things by reading the Commands and Offsets page.
    • Make sure that your module is configured.
    • After you open the COM port we recommend that you wait 10-15s before starting to stream at high-speeds.
bluetoothconnect.txt · Last modified: 2020/06/16 16:17 by bbaig