User Tools

Site Tools


pidflight:bluetooth

This is an old revision of the document!


PIDflight Lap

How to setup Bluetooth module for lap timing device

By default most modules are set to 9600 baud rate. The Bluetooth module must be configured to 115200 baud rate.

Please be aware the AT commands to configure your Bluetooth module may vary. Below are examples of typical AT commands for most common modules.

HC-06

  1. Connect the HC-06 to PC with an FTDI adapter (ensure RX and TX are crossed over).
  2. Open a serial terminal to the COM port on baud rate 9600.
  3. Type “AT” into the terminal, a “OK” response should be returned. Proceed to step 4.
  4. Type “AT+BAUD8” into the terminal, a “OK115200” response should be returned.
  5. All done!

The following AT commands are used to configure the name and passcode on the Bluetooth module.

  • AT+NAME<new name> (e.g AT+NAMEPIDflight to set module name to “PIDflight”)
  • AT+PIN<XX… X> (e.g AT+PIN0000 to set module pairing pin to “0000”)

Alternative

  1. Connect the HC-06 to Arduino Nano:
    1. Arduino (5V) → HC-06 (VCC)
    2. Arduino (D6) → HC-06 (TX)
    3. Arduino (D7) → HC-06 (RX)
    4. Arduino (GND) → HC-06 (GND)
  2. Flash the bluetooth-hc06.zip HEX file to the Arduino Nano.
  3. Once the HEX file has been flashed, allow 5 seconds for the Bluetooth module settings to take effect.
  4. Done.

The bluetooth-hc06.hex will set the HC-06 Bluetooth module name to PIDFLIGHT and baud rate to 115200.

HM-10

This module is supported as of PIDflight Lap v1.0.0-alpha.5.

This module should be set to 9600 baud rate by factory default and require no further changes.

If you need to configure your HM-10 module to use baud rate 9600, following these steps:

  1. Connect the HM-10 to PC with an FTDI adapter (ensure RX and TX are crossed over).
  2. Open a serial terminal to the COM port on baud rate 9600.
  3. Type “AT” into the terminal, a “OK” response should be returned. Proceed to step 4.
  4. Type “AT+BAUD0” into the terminal, a “OK+Set:1” response should be returned.
  5. All done!
ParameterBaud rate
09600
119200
238400
357600
4115200
54800
62400
71200
8230400

IMPORTANT: Please be careful, if you set the baud rate to 1200, the module may no longer support the configurations of the AT command. You may need to short-circuit the PIO0 to ground to restore factory settings.

The following AT commands are used to configure the name and passcode on the Bluetooth module.

  • AT+NAME<new name> (e.g AT+NAMEPIDflight to set module name to “PIDflight”)
  • AT+PASS<XX… X> (e.g AT+PASS0000 to set module pairing pin to “0000”)
  • AT+RENEW to restore factory settings, recommend to issue a AT+RESET afterwards to restart the device with factory settings.
  • AT+ROLE0 to set the module as slave.
pidflight/bluetooth.1500883889.txt.gz · Last modified: 2017/07/24 18:11 by cmengler