Page 1 of 1

AT+BLEDISCONN blocking issue

Posted: Tue Oct 22, 2024 9:23 am
by espc6user
Hi,

I'm trying to setup an application that uses ESP-C6 with ESP-AT 4.0 for sending/receiving some data over BLE SPP.
I'm doing the following steps:
ATE0
AT+SYSLOG=1
AT+SYSMSG=5
AT+BLEINIT=2
AT+BLEADVPARAM=32,32,0,0,7,0
AT+BLEADVDATAEX=adv_params
AT+BLEADVSTART

Once connection is received from ESP via
+BLECONN:0, remote_addr

I'm setting up the SPP connection
AT+BLECONNPARAM=0,6,6,0,30
AT+BLESPPCFG=config
AT+BLESPP

After ">" response is received data is sent via SPP.
After a period of time I want shutdown the SPP and disconnect from the client and do:
+++ - for exiting the passtrough mode. I do receive the confirmation message from ESP: +QUITT
AT+BLEDISCONN=0

After sending the disconnection request AT command ESP seems to not responding anymore until I reset the ESP.

I suspected that it might be something on my end, hence I tried sending another command and seems to be working
AT+BLECFGMTU?
+BLECFGMTU:0,23

I also tried to message that sets data:
AT+BLESETPHY=0,2
+BLESETPHY:remote,2,2


What worked and triggered a disconnection, by receiving an asynchronous message, of the ESP server from the client was deinitializing the BLE
AT+BLEINIT=0

I tried to check whether sending AT+BLEDISCONN=0 might provide any response after the BLE has been deinitialized. I experienced the same issue.


Any thoughts on what I might be doing wrong here?
Is it possible that AT+BLEDISCONN=0 is intended only for client role and not for server role? The only instance I found in the manual for this commands was for client role, hence the questions.
Any advice or information is highly appreciated.