Waveshare Electronics Pico-ble Dual-mode Bluetooth-compatible 5.1 Expansion Module User Manual

Waveshare Electronics Pico-ble Dual-mode Bluetooth-compatible 5.1 Expansion Module User Manual

waveshare logo

WAVESHARE ELECTRONICS Pico-BLE Dual-Mode Bluetooth-compatible 5.1 Expansion Module

WAVESHARE ELECTRONICS Pico-BLE Dual-Mode Bluetooth-compatible 5.1 Expansion Module

Product description

The Pico-BLE is a dual-mode Bluetooth 5.1 expansion module designed for Raspberry Pi Pico, which is controlled via UART AT commands, with SPP and BLE support. Combined with the Raspberry Pi Pico, it can be used for Bluetooth wireless communication applications.

Product parameters

CategoryParameter
BLUETOOTH MODULEDual-mode Bluetooth to UART module
DIMENSIONS(mm)56.5 x 21
TRANSMISSION DISTANCE30m (open-air)
COMMUNICATIONUART
ANTENNAOnboard PCB antenna
INPUT VOLTAGE5V/3.3V
 

 

OPERATING CURRENT

Startup transient current: about 25mA for about 300ms; Stable status current: about 6mA, nonlow power mode;

Low power mode current: refer to user manual

 

 

TRANSMISSION CACHE

 

1K bytes UART cache,

it is recommended to transmit less than 512 bytes per transmission for SPP

 

UART BAUDRATE

 

13 different baud rate configuration, 115200 bps by default

 

OPERATING TEMPERATURE

 

-40℃ ~ 80℃

 

Function pin

 

Description

VSYS3.3V/5V Power
GNDGND
GP0UART transmit pin (default)
GP1UART transmit pin (default)
GP4UART transmit pin (default)
GP5UART transmit pin (default)
 

GP15

Bluetooth connection status detection pin (high level means Bluetooth is connected)

Hardware connection

Direct connection:

WAVESHARE ELECTRONICS Pico-BLE Dual-Mode Bluetooth-compatible 5.1 Expansion Module FIG 1

Extended version connection:

Product use

WAVESHARE ELECTRONICS Pico-BLE Dual-Mode Bluetooth-compatible 5.1 Expansion Module FIG 2

Communication format

Support asynchronous serial communication mode, accept commands sent by the host computer through the serial port Communication Standard:115200 bps — Users can set through serial port commands, see: Module baud rate

setting and query     Data bits: 8   Stop bits: 1    Parity bits: none   Flow control: none

Note: The design of all instructions is regular, not randomly divided, you can find the rules by comparing the following

Control command format: AT+<CMD>[<param>]\r\n    —- All are characters, not hex numbers
Data Feedback Format::<IND>[<param>]\r\n
Data characteristics 

Detailed description

 

AT+

The control command is the control command given by the control host to the module, starting with “AT+”
<CMD>Followed by <CMD> control, usually 2 characters
[<param>]If there is a parameter after CMD, it is followed by [<param>]
 

\r\n

Finally, it ends with “\r\n”, the character type is linefeed, and windows is the enter key. 0x0D, 0x0A in hex
 

<IND>

1、Data feedback is that Bluetooth feeds back various status and data information to the host, starting with <IND>
A brief introduction to commands
FunctionalCommandRemark
Common  Command FeaturesAT+C?The public command starts with AT+C, followed by “?” is the detailed function command
Bluetooth Command FeaturesAT+B?The Bluetooth command starts with AT+B, followed by “?” is the detailed function command
Public inquiryAT+Q?The public query command starts with AT+Q, followed by “?” is the
Bluetooth query commandAT+T?The Bluetooth query command starts with AT+T, followed by “?” is the detailed function command

Communication command example

Common Part–Control Instructions–Description
CMDCorresponding functionDetailed description
AT+CTSet baud rateFor detail see: Module baud rate setting and query
AT+CZChip resetChip soft reset, see: Reset and restore factory
 

AT+CW

Chip reset to factory settingsRestore factory settings, clear all previously memorized parameters, see: Module reset and restore factory settings
 

AT+CL

 

Chip low power settings

See Chip low-power command description, the default is the normal working mode
 

AT+CR

Chip power-on callback information settingsSee: Chip power-on callback information setting, the default is open
AT+BMSet BLE Bluetooth nameSee: Set the name and address of Bluetooth
AT+BNSet the MAC address of BLESee: Set the name and address of Bluetooth
AT+BDSet SPP Bluetooth nameSee: Set the name and address of Bluetooth
AT+QTQuery the baud rate of theSee: Module baud rate setting and query
AT+QLQuery the low-power stateSee: Set the name and address of Bluetooth
AT+TMQuery BLE Bluetooth nameSee: Set the name and address of Bluetooth
AT+TNQuery BLE BluetoothSee: Set the name and address of Bluetooth
AT+TDQuery SPP Bluetooth nameSeel: Set the name and address of the Bluetooth

Module baud rate setting and query

 

AT+CT??\r\n

Baud rate setting command, ?? represents the serial number of the baud rate
 

AT+QT\r\n

Baud rate query command, return QT+?? ?? represents the serial number of the baud rate
Baud rate serial number
01020304050607
9600192003840057600115200256000512000
080910111213
23040046080010000003125024004800

 

  1. Once the baud rate is set, the chip will memorize it. The next time you turn it on, the baud rate will be the one you set.
  2. After setting the baud rate, please wait for 1 second, then send the reset [AT+CZ], or power off.
  3. If you want to restore the default baud rate, please send the command to restore the factory settings, then the chip will automatically erase all configurations.

Module reset and factory reset

Reset command: AT+CZ\r\n
Please wait one second after entering the reset command

Factory reset command: AT+CW\r\n
Please wait five seconds after entering the factory reset command

Set the name and address of the Bluetooth

AT+BMBLE-Waveshare\r\nSet BLE Bluetooth name to “BLE-Waveshare”
 

AT+BN112233445566\r\n

Set the address of BLE. The address displayed on the mobile phone is: 66 55 44 33 22 11
AT+BDSPP-Waveshare\r\nSet the SPP Bluetooth name to “SPP-Waveshare”
  1. After setting the Bluetooth name, please reset the module, and use the mobile phone to search again after reset.
  2. The maximum length of the Bluetooth name is 30 bytes
  3. After modifying the Bluetooth name, if the device name displayed on the mobile phone does not change, the main reason may be that you have not modified the Bluetooth address, resulting in the mobile phone not being updated synchronously. At this time, what you need to do is to change the pairing information on the mobile phone. Delete and search again, or search with another device.

Query the name and address of Bluetooth

AT+TM\r\nReturn TM+BLE-Waveshare\r\n for Bluetooth   name BLE-Waveshare
AT+TN\r\nReturns the Bluetooth address of TN+12345678AABB\r\n  BLE: 0xBB, 0xAA, 0x78, 0x56, 0x34, 0x12
AT+TD\r\nReturn to TD+SPP-Waveshare\r\n for Bluetooth name SPP-Waveshare

There is no SPP address whether it is set or queried, because the SPP address is obtained by +1 on the
highest byte of the BLE MAC address, for example:
The address of BLE is returned as: TN+32F441F495F1,
This means the address of BLE is: 0xF1 , 0x95 , 0xF4 , 0x 41 , 0xF4 , 0x32
Then the address of SPP is: 0xF2 , 0x95 , 0xF4 , 0x 41 , 0xF4 , 0x32

Chip low power instruction description

 

AT+CL00\r\n

Do not enter low power mode. It will be valid at the next power-on. Be careful to restart the power after setting
 

AT+CL01\r\n

Enter low power mode. It is valid at the next power-on. After setting, pay attention to power on again — the chip enters this state by default, no need to set
 

AT+QL\r\n

Low-power query command. The return value is QL+01\r\n, indicating that the current working state is low power consumption mode
  1. After setting, you need to power on again to update the configuration
  2. This command is memorized. After the command is sent successfully, the chip will save it.
  3. After starting the low-power mode, there are many restrictions, which are generally turned off by default.
  4. After the setting, the chip will return to the device information normally when it is powered on. AT commands can be set within 5 seconds, and after 5 seconds, any AT commands will be ignored before the Bluetooth connection.
  5. The difference between low power consumption and normal operation is mainly due to the difference in the way of Bluetooth broadcasts when Bluetooth is not connected. During normal operation, Bluetooth is always in the broadcasting state. During low power consumption, it broadcasts every 0.5 seconds, once every 0.1 seconds, and the rest of the time is in a sleep state. When connected to Bluetooth, the power consumption of the two working modes is similar (of course,
    the low power consumption will be a little lower),If it is not particularly sensitive to power consumption or it will be in a disconnected state for a long time after power-on, it is better to keep the module in a normal working state.
  6. The following table is the current under each working state, which is measured in the experimental environment, and the results are for reference only.
Serial numberCurrentDescription
 

 

 

 

 

 

 

 

 

AT+CL00\r\n

 

Low power working mode

 

 

 

 

Boot moment

 

 

 

 

12mA

When the chip is powered on, the peripherals need to be initialized. The instantaneous current is relatively large, and this time is maintained for 300ms, and it enters a low-power state.
 

 

 

Working Status – Not Connected

 

 

 

1mA, 5mA

alternately

The chip is in normal working state, broadcasts normally, and is in a periodic state of sleep, wake-up broadcast, and sleep. The purpose is to save power consumption, the cycle is 500ms. 100ms broadcast once, 400ms sleep
 

Working status – to connect

 

6mA

When the connection is successful, the chip will no longer go to sleep. but at work
 

 

 

 

AT+CL01\r\n

 

normal working mode

 

 

 

Boot moment

 

 

 

25mA

When the chip is powered on, the peripherals need to be initialized. The instantaneous current is relatively large, this time is maintained for 300ms, and it enters the 5mA working state
 

Whether connected or not

 

6.5mA

The chip is always working. Small fluctuations in current, negligible

If you feel that the above power consumption is relatively high, you can use 3.3V to directly supply power to the module and the current will further

decrease

WAVESHARE ELECTRONICS Pico-BLE Dual-Mode Bluetooth-compatible 5.1 Expansion Module FIG 3

Chip BLE enable and SPP enables

AT+B401\r\nEnable BLE function. Of course AT+B400\r\n is closed
AT+B500\r\nDisable the function of SPP. Of course AT+B501\r\n is turned on
AT+T4\r\nCheck whether the BLE function is enabled. The chip will return T4+01 or T4+00
AT+T5\r\nCheck whether the SPP function is enabled. The chip will return T5+01 or T5+00
  1. After the BLE/SPP function is turned off, it must be powered on again for this function to take effect. Of course it’s the same
  2. You only need to set it once, the chip automatically saves the parameters, and you don’t need to set it next time
  3. After the BLE/SPP function is turned off, the mobile phone cannot search for the name of BLE.

Description of the error message returned by the chip

ER+1\r\nThe received data frame is incorrect
ER+2\r\nThe received command does not exist, that is, the string like AT+KK you sent cannot be
found
ER+3\r\nThe received AT command did not receive a carriage return and line feed, that is, \r\n
ER+4\r\nThe parameter sent by the command is out of range, or the command format is incorrect. Please check your AT commands
ER+7\r\nThe MCU sends data to the mobile phone, but the mobile phone does not open notify. In the successful state of BLE connection

Focus on the description of notify [monitoring]. After the test APP on the mobile phone is connected to the Bluetooth chip, notify must be turned on. The bluetooth chip can
send data to the mobile phone. When the mobile phone sends data to the Bluetooth chip,it is enough to use the write feature.

Chip power-on callback information settings

AT+CR00\r\nTurn off postback messages for power-on. Be careful to restart the power after setting
 

AT+CR01\r\n

Enable the return message of chip power-on. It is valid at the next power-on. Be careful to restart the power after setting

Note: After this function is turned off, it will also turn off the OK or ER+X return information that is actively returned after the AT command is executed. It is recommended to keep it turned on here.

Transparent transmission description

  1. After the Bluetooth connection, the module automatically enters the transparent transmission mode. Except for the completely correct AT command, the rest of the data will be transparently transmitted.
  2. The maximum amount of data that can be handled in a single time is 1024 bytes. SPP recommends that it should not exceed 512 bytes at a time.
  3. The MTU (maximum communication packet length) of the mobile phone APP generally defaults to 20 bytes for 1 data packet; when the data packet sent by the module exceeds 20 bytes, the module will automatically divide the packet according to the set MTU; you can Modify the MTU to modify the data interaction speed (the larger the
    MTU, the faster the data interaction speed).

Documents / Resouces

Download manual
Here you can download full pdf version of manual, it may contain additional safety instructions, warranty information, FCC rules, etc.


Related Manuals