Hi everyone,
I have an ESP32-WROOM-32D, and I’ve installed the AT firmware. I'm currently trying to execute this example: Establish SPP connection between ESP32 and mobile phone and transmit data in UART-Bluetooth LE passthrough mode. I'm using the following commands:
AT+BLEINIT=2
AT+BLEGATTSSRVCRE
AT+BLEGATTSSRVSTART
AT+BLEADVPARAM=50,50,0,0,7,0,,
AT+BLEADVDATA="0201060809534F434F52524F030302A0"
AT+BLEADVSTART
After these steps, I successfully establish a connection:
18:24:07.849 -> +BLECONN:0,"51:4a:42:d8:92:12"
18:24:08.129 -> +BLECONNPARAM:0,0,0,6,0,500
18:24:08.631 -> +BLECFGMTU:0,517
18:24:08.678 -> +WRITE:0,1,6,1,2,�
18:24:08.678 -> +BLECONNPARAM:0,0,0,39,0,500
Then I configure and start SPP mode:
AT+BLESPPCFG=1,1,6,1,4
AT+BLESPP
Everything works well, but I’m wondering: How can I exit SPP mode without resetting the board?
How can I exit SPP mode?
Re: How can I exit SPP mode?
Perhaps you could read the introduction to the AT+BLESPP command to find the answer (+++) you're looking for.
Re: How can I exit SPP mode?
Hi,
Hope this information helps you out.
There are 2 ways:
1. When the central is disconnected, if you configured the SYSMSG correspondingly, you will get the +QUITT message and you will automatically exit the SPP mode.
2. By sending the +++ data. Once you request SPP via AT+BLESPP command, you automatically enter a passthrough data mode, similar to the WiFi passthrough mode. Therefore similar to the TCP/IP part, this should work in a similar manner. Unfortunately this isn't explained somewhere, it was more of a bit and piece for here and there and trying it out.
I also have a question to you, not on topic, hope you might be able to help me with some info since I haven't managed to do that yet.
Did you do something in particular to change the MTU to 517 bytes? What client do you have?
I've tried setting the MTU from the server (although this is negociated and should work only for client mode anyway), change the PHY and also trying to change the advertisement, however nothing helped here, the MTU was still 23 bytes:
Hope this information helps you out.
There are 2 ways:
1. When the central is disconnected, if you configured the SYSMSG correspondingly, you will get the +QUITT message and you will automatically exit the SPP mode.
2. By sending the +++ data. Once you request SPP via AT+BLESPP command, you automatically enter a passthrough data mode, similar to the WiFi passthrough mode. Therefore similar to the TCP/IP part, this should work in a similar manner. Unfortunately this isn't explained somewhere, it was more of a bit and piece for here and there and trying it out.
I also have a question to you, not on topic, hope you might be able to help me with some info since I haven't managed to do that yet.
Did you do something in particular to change the MTU to 517 bytes? What client do you have?
I've tried setting the MTU from the server (although this is negociated and should work only for client mode anyway), change the PHY and also trying to change the advertisement, however nothing helped here, the MTU was still 23 bytes:
Re: How can I exit SPP mode?
Hi,
Actually this is something that I also experience.
I'm tried the following snippet:
1. Wait 5 seconds after the BLE connection with a client has been established and SPP have started.
2. Send the "+++" message to exit passthrough and enter command mode
3. Wait 3 seconds
4. Send an AT command (AT+BLEDISCONN=0).
Although after sending the "+++" message I do manage to receive the "+QUITT" response, expected, after issueing the AT command I'm not receiving any response.
Any thoughts on this?
Thank you
Actually this is something that I also experience.
I'm tried the following snippet:
1. Wait 5 seconds after the BLE connection with a client has been established and SPP have started.
2. Send the "+++" message to exit passthrough and enter command mode
3. Wait 3 seconds
4. Send an AT command (AT+BLEDISCONN=0).
Although after sending the "+++" message I do manage to receive the "+QUITT" response, expected, after issueing the AT command I'm not receiving any response.
Any thoughts on this?
Thank you
Who is online
Users browsing this forum: No registered users and 7 guests