Skip to content

Commit 6711b31

Browse files
committed
revisions to section 12.3 AT commands
1 parent cf46bba commit 6711b31

File tree

1 file changed

+25
-15
lines changed

1 file changed

+25
-15
lines changed

src/12-bluetooth-setup/at-commands.md

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,53 @@
11
## AT commands
22

3-
> **NOTE** incomplete
3+
The Bluetooth module and the F3 need to be configured to communicate at the same baud rate. The tutorial code initializes the UART1 serial device to a baud rate of 115200. The HC-05 Bluetooth module is configured at a baud rate of 9600 by default.
4+
5+
The Bluetooth module supports an AT mode that allows you to examine and change its configuration and settings. To utilize the AT mode, connect the Bluetooth module to the F3 and FTDI as shown in the following diagram.
46

57
<p align="center">
68
<img height=640 title="Bluetooth <-> Serial connection" src="assets/bluetooth-serial.png">
79
</p>
810

9-
Entering AT mode:
10-
11-
- Power off the Bluetooth module
12-
- Press and hold the button on the Bluetooth module
13-
- Power on the Bluetooth module
14-
- Now, release the button
11+
Recommended steps to enter AT mode:
1512

16-
> **TODO** blinking pattern
13+
- Disconnect the F3 and FTDI from your laptop.
14+
- Connect F3's GND pin to the Bluetooth's GND pin using a Female/Female (F/F) wire
15+
(preferably, a black one).
16+
- Connect F3's 5V pin to the Bluetooth's VCC pin using a F/F wire (preferably, a
17+
red one).
18+
- Connect the FTDI RXI pin to the Bluetooth's TXD pin using a Female/Male (F/M) wire.
19+
- Connect the FTDI TXO pin to the Bluetooth's RXD pin using a Female/Male (F/M) wire.
20+
- Now connect the FTDI to your laptop via USB cable.
21+
- Next connect the F3 to your laptop via USB cable while simultaneously pressing and holding the button on the Bluetooth module (kinda tricky).
22+
- Now, release the button and the Bluetooth module will enter AT mode. You can confirm this by observing that the red LED on the Bluetooth module is blinking in a slow pattern (approx 1-2 seconds on/off).
1723

18-
The AT mode always operates at a baud rate of 38,400.
24+
The AT mode always operates at a baud rate of 38400, so configure minicom/putty for that baud rate and connect to the FTDI device.
1925

20-
Commands (via minicom)
26+
When your serial connection to the FTDI is established, you may get a bunch of `ERROR: (0)` repeatedly being displayed. If this happens, just hit ENTER to stop the errors.
2127

22-
- Sanity check
28+
### Sanity check
2329

2430
```
2531
$ at
2632
OK
2733
OK
28-
(..)
34+
(etc...)
2935
```
3036

3137
Answers `OK` repeatedly until you hit ENTER again.
3238

33-
- Rename
39+
### Query for the current baud rate of the Bluetooth module
3440

3541
```
36-
$ at+name=ferris
42+
at+uart?
43+
+UART:9600,0,0
44+
OK
45+
+UART:9600,0,0
3746
OK
47+
(etc ...)
3848
```
3949

40-
- Change the baud rate
50+
### Change the baud rate
4151

4252
```
4353
$ at+uart=115200,0,0

0 commit comments

Comments
 (0)