ESP32-C3模块下载的官方固件V3.3.0.0版本,用AT指令按官方教程进入透传模式,手机连接蓝牙进入透传模式,断开蓝牙重新广播。用BLE调试助手操作:连接蓝牙,断开蓝牙,连续上续动作几次模块就会重启?以下是日志:
STM32发送指令:
Composite command
Send command
cmd = AT+BLEGATTSSRV?
cmd = AT+BLEGATTSCHAR?
cmd = AT+BLESPPCFG=1,1,6,1,5
cmd = AT+BLESPP
Composite command
Send command
cmd = +++
cmd = AT+BLEADVPARAM=50,50,0,0,7,0,,
cmd = AT+BLEADVDATA="0201060A09457370726573736966030302A0"
cmd = AT+BLEADVSTART
cmd = AT
cmd = AT+SYSMSG=5
cmd = AT+BLEINIT=2
cmd = AT+BLEGATTSSRVCRE
cmd = AT+BLEGATTSSRVSTART
cmd = AT+BLEADDR?
cmd = AT+BLEADVPARAM=50,50,0,0,7,0,,
cmd = AT+BLEADVDATA="0201060A09457370726573736966030302A0"
cmd = AT+BLEADVSTART
Composite command
Send command
cmd = AT+BLEGATTSSRV?
cmd = AT+BLEGATTSCHAR?
cmd = AT+BLESPPCFG=1,1,6,1,5
cmd = AT+BLESPP
ESPC3模块回复:
+BLECONN:2,"66:36:af:f4:40:f6"
+BLECONNPARAM:0,0,0,12,0,500
AT+BLEGATTSSRV?
+BLEGATTSSRV:1,1,0xA002,1
+BLEGATTSSRV:2,1,0xA003,1
OK
AT+BLEGATTSCHAR?
+BLEGATTSCHAR:"char",1,1,0xC300,0x02
+BLEGATTSCHAR:"desc",1,1,1,0x2901
+BLEGATTSCHAR:"char",1,2,0xC301,0x02
+BLEGATTSCHAR:"desc",1,2,1,0x2901
+BLEGATTSCHAR:"char",1,3,0xC302,0x08
+BLEGATTSCHAR:"desc",1,3,1,0x2901
+BLEGATTSCHAR:"char",1,4,0xC303,0x04
+BLEGATTSCHAR:"desc",1,4,1,0x2901
+BLEGATTSCHAR:"char",1,5,0xC304,0x08
+BLEGATTSCHAR:"char",1,6,0xC305,0x10
+BLEGATTSCHAR:"desc",1,6,1,0x2902
+BLEGATTSCHAR:"char",1,7,0xC306,0x20
+BLEGATTSCHAR:"desc",1,7,1,0x2902
+BLEGATTSCHAR:"char",1,8,0xC307,0x02
+BLEGATTSCHAR:"desc",1,8,1,0x2901
+BLEGATTSCHAR:"char",2,1,0xC400,0x02
+BLEGATTSCHAR:"desc",2,1,1,0x2901
+BLEGATTSCHAR:"char",2,2,0xC401,0x02
+BLEGATTSCHAR:"desc",2,2,1,0x2901
OK
AT+BLESPPCFG=1,1,6,1,5
OK
AT+BLESPP
OK
+BLESETPHY:"66:36:af:f4:40:f6",2,2
+BLEDISCONN:0,"66:36:af:f4:40:f6"
+QUITT
AT+BLEADVPARAM=50,50,0,0,7,0,,
OK
AT+BLEADVDATA="0201060A09457370726573736966030302A0"
OK
AT+BLEADVSTART
OK
*********************在此处重启了**********
ready
AT
OK
AT+SYSMSG=5
OK
AT+BLEINIT=2
OK
AT+BLEGATTSSRVCRE
OK
AT+BLEGATTSSRVSTART
OK
AT+BLEADDR?
+BLEADDR:"54:32:04:b7:cd:a6"
OK
AT+BLEADVPARAM=50,50,0,0,7,0,,
OK
AT+BLEADVDATA="0201060A09457370726573736966030302A0"
OK
AT+BLEADVSTART
OK
+BLECONN:0,"66:36:af:f4:40:f6"
+BLECONNPARAM:0,0,0,12,0,500
AT+BLEGATTSSRV?
+BLEGATTSSRV:1,1,0xA002,1
+BLEGATTSSRV:2,1,0xA003,1
OK
AT+BLEGATTSCHAR?
+BLEGATTSCHAR:"char",1,1,0xC300,0x02
+BLEGATTSCHAR:"desc",1,1,1,0x2901
+BLEGATTSCHAR:"char",1,2,0xC301,0x02
+BLEGATTSCHAR:"desc",1,2,1,0x2901
+BLEGATTSCHAR:"char",1,3,0xC302,0x08
+BLEGATTSCHAR:"desc",1,3,1,0x2901
+BLEGATTSCHAR:"char",1,4,0xC303,0x04
+BLEGATTSCHAR:"desc",1,4,1,0x2901
+BLEGATTSCHAR:"char",1,5,0xC304,0x08
+BLEGATTSCHAR:"char",1,6,0xC305,0x10
+BLEGATTSCHAR:"desc",1,6,1,0x2902
+BLEGATTSCHAR:"char",1,7,0xC306,0x20
+BLEGATTSCHAR:"desc",1,7,1,0x2902
+BLEGATTSCHAR:"char",1,8,0xC307,0x02
+BLEGATTSCHAR:"desc",1,8,1,0x2901
+BLEGATTSCHAR:"char",2,1,0xC400,0x02
+BLEGATTSCHAR:"desc",2,1,1,0x2901
+BLEGATTSCHAR:"char",2,2,0xC401,0x02
+BLEGATTSCHAR:"desc",2,2,1,0x2901
OK
AT+BLESPPCFG=1,1,6,1,5
OK
+BLESETPHY:"66:36:af:f4:40:f6",2,2
AT+BLESPP
OK