Bluetooth module configurations

For advance users who wish to customize their Bluetooth module configurations, this tutorial shows you how this can be done.

 

You will need to connect the bluetooth module directly to your PC through serial interface. Since these days hardly any PC has serial interface, a USB-to-RS232 converter like the one below may be used.

Connect this module to the Bluetooth module according to the table below

Bluetooth module USB to Serial Module
Vcc Vcc
GND GND
TXD RXD
RXD TXD

While configuring the bluetooth module, it shouldn't be connected wirelessly with any other bluetooth devices, so switch off the bluetooth of your PC and/or smart phones.

The default settings of the Bluetooth is:

Baudrate: 9600

Name: linvor

Pairing code: 1234

Any changes to the above configurations will be saved even when power is off.

All the commands sent to the Buetooth must not contain a 'newline' character at the end, puTTY doesn't do well in this regards. Hence we recommend using the 'Serial Monitor' in the Arduino IDE to configure the Bluetooth module. The procedures are as follows:

1, connect the Bluetooth to the pc, the LED should be flashing
2, If you have an Arduino board connecting to the pc via USB, please unplug it.
3, Launch the Arduino IDE (the program where you write Arduion code and download to the Arduino)
4, select the correct COM port that the Bluetooth is connected to.

5, Open the 'Serial Monitor'

 

Once the Serial Monitor pops up, make sure the 'no line ending' is selected. To test the communication between the Bluetooth and the PC, send the command AT (case sensitive), and hit the 'Send' button, the Bluetooth should reply 'OK'

If you can get the Bluetooth to reply, you are ready to configure the Bluetooth module to your preference!

 

Change the Baudrate

The example below shows how to set the baudrate to 4800 bps

Send the command (case sensitive!)

AT+BAUD3

the Bluetooth will reply:

OK4800

As shown in the figure below

Now, since the Baudrate of the Bluetooth has been changed, you need to change the Baudrate of the terminal program to 4800 in order to talk to the Bluetooth again.

The index  after the command AT+BAUD corresponds to the following Baudrate:

1----1200bps
2----2400bps
3----4800bps
4----9600bps
5----19200bps
6----38400bps
7----57600bps
8----115200bps
9----230400bps
A----460800bps
B----921600bps
C----1382400bps

The change of Baudrate takes effect immediately after the command is sent. So if you want to keep configuring the Bluetooth module, you need to set the Baudrate of your terminal program to the new Baudrate the Bluetooth is using. To test it, send AT again, you should receive 'OK'.

NOTE: some MAX 232 chips cannot work reliably for Baudrates faster than 115200bps, therefore, we don't recommend to set the Bluetooth to a Baudrate that is faster than 115200bps.

 

Change name

This example show you how to change the name of the Bluetooth module to hobbyist:

In the terminal program, send the command (case sensitive):

AT+NAMEhobbyist

The Bluetooth should reply:

OKsetname

as shown in the figure below

The Bluetooth needs to be reboot (power off then on) for the name to be changed

Please note that the length of the name cannot exceed 20 characters!

 

Change pairing code

The following example shows how to change the pairing code to 5566

In the terminal program, send the command (case sensitive):

AT+PIN5566

The Bluetooth should reply:

OKsetPIN

as shown in the figure below

The change of pairing code takes effect immediately.