LBB Bluetooth Updater

  • 2 Replies
  • 272 Views
*

Offline hakcenter

  • developer
  • Hero Member
  • *****
  • 623
    • 1998 12v Ram
LBB Bluetooth Updater
« on: September 06, 2016, 07:42:56 PM »
Latest Version
You will need to be a registered forum user to see the attachment, but there is a Arduino Sketch attached to this post.

Detailed list of code will follow...

*

Offline hakcenter

  • developer
  • Hero Member
  • *****
  • 623
    • 1998 12v Ram
Re: LBB Bluetooth Updater
« Reply #1 on: September 06, 2016, 07:43:00 PM »
The bluetooth unit installed on the LBB's are HC-05. It is a seemingly robust bluetooth module, with a simple AT interface, and has been absolutely rock solid during hours of testing.

If you ever want to change the bluetooth name of the device, or the pin #, this is the sketch that you'll want to use.

Code: [Select]
// AT                 = AT MODE                                 OK / ERROR(0)
// AT+ORGL            = Reset to defaults
// AT+RESET           = Reboot module                                     
// AT+PSWD=9220       = Set bluetooth pin 9220                  OK
// AT+UART=115200,1,0 = 115200 Baud, 1 Stop Bit, 0 Parity       OK
// AT+ROLE=1          = 0 Slave, 1 Master, 2 Slave-Loopback     OK
// AT+CMODE=1         = 0 Fixed, 1 Any, Slave-Loop              OK
// AT+NAME=LBB                                                  OK
// AT+RMAAD           = Remove paired devices                   OK
// AT+INIT            = Reboot and intialize module             OK

String lbb_value[9] = { "AT", "AT+ORGL", "AT+PSWD=9220", "AT+UART=115200,1,0", "AT+ROLE=0", "AT+CMODE=1", "AT+NAME=LBB", "AT+RMAAD", "AT+INIT" };

Change the value at +PSWD=9220, to your pin numbers of preference
Change the value at +NAME=LBB, to change the name, do not use spaces

The rest should be left alone unless you know what you are doing.

  • Setup the serial interface on the Arduino IDE to baud rate 38400, upload the code to your LBB
  • Move the J_PRG jumper to both pins
  • Turn the BT Switch off, then back on
  • Wait for the state light to blink slowly, and remove the J_PRG jumper back to a single pin

Using the Arduino IDE, open the serial monitor and watch.

If the screen just spams AT, with no progress. Press the reset button on the LBB, then the code should execute.

*

Offline hakcenter

  • developer
  • Hero Member
  • *****
  • 623
    • 1998 12v Ram
Re: LBB Bluetooth Updater
« Reply #2 on: September 06, 2016, 07:45:53 PM »
reserved