April 2018
Beginner
552 pages
13h 58m
English
The Bluetooth module can be set to one of two different modes using the KEY pin.
In a normal operation, serial messages are sent over Bluetooth; however, if we need to change the settings of the Bluetooth module itself, we can do so by connecting the KEY pin to 3V3 and putting it into AT mode.
AT mode allows us to directly configure the module, allowing us to change the baud rate, the pairing code, the device name, or even set it up as a master/slave device.
You can use miniterm, which is part of pySerial, to send the required messages, as shown in the following code:
python3 -m serial.tools.miniterm
The miniterm program, when started, will prompt you for the port to use:
Enter port name: /dev/ttyAMA0 ...