簡介
ESP32-WROOM-32模組集成了雙模藍(lán)牙包括傳統(tǒng)藍(lán)牙(BR/EDR)、低功耗藍(lán)牙(BLE)和 Wi-Fi,具有廣泛的用途:Wi-Fi 支持極大范圍的通信連接,也支持通過路由器直接連接互聯(lián)網(wǎng);而藍(lán)牙可以讓用戶連接手機(jī)或者廣播 Bluetooth LE Beacon 以便于信號檢測。
藍(lán)牙特性:
? 支持標(biāo)準(zhǔn) Class-1、Class-2 和 Class-3,且無需外部功率放大器
? 增強(qiáng)型功率控制 (Enhanced Power Control)
? 輸出功率高達(dá) +9 dBm
? NZIF 接收器具有–94 dBm 的 BLE 接收靈敏度
? 自適應(yīng)跳頻 (AFH)
? 基于 SDIO/SPI/UART 接口的標(biāo)準(zhǔn) HCI
? 高速 UART HCI,最高可達(dá) 4 Mbps
? 支持藍(lán)牙 4.2 BR/EDR 和 Bluetooth LE 雙模 controller
? 同步面向連接/擴(kuò)展同步面向連接 (SCO/eSCO)
? CVSD 和 SBC 音頻編解碼算法
? 藍(lán)牙微微網(wǎng) (Piconet) 和散射網(wǎng) (Scatternet)
? 支持傳統(tǒng)藍(lán)牙和低功耗藍(lán)牙的多設(shè)備連接
? 支持同時廣播和掃描
開發(fā)板集成Type-C USB轉(zhuǎn)TTL串口芯片CH343可以實現(xiàn)一鍵串口下載程序和串口打印。
ESP32開發(fā)板Arduino程序
開發(fā)板管理器搜索安裝ESP32開發(fā)板
選擇好自己手里所用的對應(yīng)開發(fā)板
打開BluetoothSerial示例程序
//This example code is in the Public Domain (or CC0 licensed, at your option.)
//By Evandro Copercini - 2018
//
//This example creates a bridge between Serial and Classical Bluetooth (SPP)
//and also demonstrate that SerialBT have the same functionalities of a normal Serial
#include "BluetoothSerial.h"
#if !defined(CONFIG_BT_ENABLED) || !defined(CONFIG_BLUEDROID_ENABLED)
#error Bluetooth is not enabled! Please run `make menuconfig` to and enable it
#endif
BluetoothSerial SerialBT;
void setup() {
Serial.begin(115200);
SerialBT.begin("ESP32test"); //Bluetooth device name
Serial.println("The device started, now you can pair it with bluetooth!");
}
void loop() {
if (Serial.available()) {
SerialBT.write(Serial.read());
}
if (SerialBT.available()) {
Serial.write(SerialBT.read());
}
delay(20);
}
手機(jī)與ESP32開發(fā)板進(jìn)行藍(lán)牙串口透傳通信
編譯上傳例程到ESP32開發(fā)板,在手機(jī)應(yīng)用市場搜索下載安裝“SPP藍(lán)牙串口”APP,本實驗中用的是"Arduino bluetooth controller"APP,打開APP搜索ESP32tset藍(lán)牙設(shè)備并建立連接。
選擇Terminal mode
Arduino IDE打開串口助手,手機(jī)藍(lán)牙串口APP和串口助手互發(fā)信息,即可顯示出收到信息。通過修改例程中的波特率參數(shù)即可更改藍(lán)牙串口通信的波特率。
總結(jié)
通過本實驗可把ESP32用作一個藍(lán)牙串口透傳設(shè)備使用,功能和常用的HC-05/06串口藍(lán)牙設(shè)備一樣。
審核編輯 黃宇
-
串口通信
+關(guān)注
關(guān)注
34文章
1638瀏覽量
56683 -
藍(lán)牙串口
+關(guān)注
關(guān)注
1文章
12瀏覽量
7500 -
透傳模塊
+關(guān)注
關(guān)注
0文章
40瀏覽量
3491 -
ESP32
+關(guān)注
關(guān)注
21文章
1012瀏覽量
19044
發(fā)布評論請先 登錄
請問ESP32 BLE透傳如何主動發(fā)送數(shù)據(jù)?
串口透傳——你不可不知的藍(lán)牙模塊最簡便的通信方式
詳解藍(lán)牙52832模塊的串口透傳通訊方式
如何用Ardunio IDE對ESP32 NodeMCU板子刷入藍(lán)牙BLE串口透傳固件
RK3399 Android下實現(xiàn)藍(lán)牙串口透傳
詳解藍(lán)牙4.2模塊的串口透傳通訊方式

基于Arduino構(gòu)建NodeMCU藍(lán)牙透傳

HC05 藍(lán)牙模塊 連接 ESP32 經(jīng)典藍(lán)牙

ESP32 BLE藍(lán)牙 使用AT指令與其他BLE藍(lán)牙模塊透傳 配置教程

ESP32學(xué)習(xí)記錄<三>串口通信

BLE TPT藍(lán)牙串口透傳模塊手冊

BLE DSER藍(lán)牙串口透傳模塊

評論