Copyright ©2012–2022
,
Chengdu Ebyte Electronic Technology Co.,Ltd
7
2. Command AT+SCAN=1, start master scanning function
3. Support multi-master and multi-slave connection. Up to 2 slaves can be connected.
4. Print status information when the host connection status changes. See status printing.
5.1.1.1 Master connection method
Condition filtering
The device can be configured to filter by binding MAC address and service UUID.
UUID filtering is based on the content filtering configured by AT+UUIDSVR, and the filtering conditions cannot
be turned off. If MAC address filtering is not enabled, the master will automatically connect to the slave when the
MAC address matches and the service UUID matches.
If users need MAC address filtering, add MAC addresses to the device through AT+BONDMAC. After the master
scans the slave, if it is the same as the binding list MAC address and service UUID, the master automatically
connects to the slave device.
Auto connection
The master automatically connects to the slave device after metting the condition filtering.
5.1.2 Slave
1. AT+ROLE=0 select slave mode
2. 2. AT+ADV=1 to configure normal advertising mode
3. 3. The advertising switch is configured to be on, and it will automatically enter the advertising state after
power-on.
If the advertising switch is configured to be off, the device will not be found after power-on.
4. 4. After receiving the host connection request, establish a Bluetooth connection to stop Bluetooth advertising
and enter the data transmission mode.
5. 5. For advertising data configuration, see 5.5 Advertising.
5.1.3 Observer
1. Command AT+ROLE=2 to select the observation mode (valid after restart)
2. After receiving the advertising, print out all the contents of the advertising package through the serial port.
3. The observer device cannot be connected to any device.
Check format below
LEN
MAC
RSSI
Advdata
1 byte
6 byte
1 byte
No more than 31 byte
Note: LEN is the sum of MAC, RSSI, and advertising data length.
1. The scan window and scan gap are consistent with the scan parameters.
2. The AT command is valid during the period.