Main Menu

LBB Bluetooth Updater

Started by hakcenter, September 06, 2016, 07:42:56 PM

hakcenter

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...
TS2009 Deḇarim 8:2
"And you shall remember that יהוה your Elohim led you all the way these forty years in the wilderness, to humble you, prove you, to know what is in your heart, whether you guard His commands or not.

hakcenter

#1
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.


// HC-05
// AT                 = AT MODE                                 OK / ERROR(0)
// AT+ORGL            = Reset to defaults
// AT+RESET           = Reboot module                                     
// AT+PSWD=9220       = Set bluetooth pin 9222                  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

int timer = 0;

boolean interface = false;
boolean needs_endline = false;

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

boolean next_step = false;


Change the value at +PSWD=9220, to your pin numbers of preference
  * If setting the PIN errors, use pin2
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.
TS2009 Deḇarim 8:2
"And you shall remember that יהוה your Elohim led you all the way these forty years in the wilderness, to humble you, prove you, to know what is in your heart, whether you guard His commands or not.

hakcenter

TS2009 Deḇarim 8:2
"And you shall remember that יהוה your Elohim led you all the way these forty years in the wilderness, to humble you, prove you, to know what is in your heart, whether you guard His commands or not.