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 pin2Change 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.