Hi everyone,
I'm experiencing a strange behavior whilst in BLE SPP mode.
My use case is the following:
1. Setup ESP-C6 as BLE server
2. Pair with client
3. Trigger the SPP trasnmission (AT+BLESPP)
4. Send/recv data over BLE
5. Client (Linux python script using bluepy stack) stops streaming and triggers disconnect
What kind of response should I expect when the client is disconnecting from the BLE server?
I would expect the following flow to be sent from ESP as AT messages:
1. +QUITT - SPP data mode turned off
2. +BLEDISCONN
I receive the following information in a single message:
+WRITE: <data>
+BLEDISCONN
The next message that I receive the end SPP data mode event:
+QUITT
My questions are:
1. Should I receive AT events whilst in BLE SPP data mode? Are we suppose to parse each message to avoid such a behavior?
2. Shouldn't +QUITT be sent before +BLEDISCONN has been generated?
Thanks
BLE SPP mode sending unexpected AT events
-
- Posts: 188
- Joined: Sun Jun 23, 2024 6:18 pm
Re: BLE SPP mode sending unexpected AT events
On receiving +BLEDISCONN, check for +QUITT if it hasn’t already been received. This way, you can handle state cleanup in the correct sequence.
Re: BLE SPP mode sending unexpected AT events
Unfortunately that notification hasn't been transmitted. I only got it if I performed the disconnection from the other endpoint.
Who is online
Users browsing this forum: No registered users and 11 guests