-
Notifications
You must be signed in to change notification settings - Fork 7.6k
BLE client has Problem disconnecting 1 of 2 connected servers #3566
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Why not switching to 1.0.4? |
sorry i think i misunderstood what core installation version was, in |
Could you try this to get more info? |
@chegewara thanks for your help AGAIN!!! static void my_gattc_event_handler(esp_gattc_cb_event_t event, esp_gatt_if_t gattc_if, esp_ble_gattc_cb_param_t* param) { static void my_gatts_event_handler(esp_gatts_cb_event_t event, esp_gatt_if_t gattc_if, esp_ble_gatts_cb_param_t* param) { void setup() {
BLEDevice::init(""); Backtrace: 0x40091448:0x3ffcff20 0x40091679:0x3ffcff40 0x400e9583:0x3ffcff60 0x400910d5:0x3ffcff90 0x40084b26:0x3ffcffb0 0x400850e1:0x3ffcffd0 0x4000bec7:0x3ffcfff0 0x400d5992:0x3ffd0010 0x400d625d:0x3ffd0050 0x400d4771:0x3ffd0070 0x400d54f1:0x3ffd0120 0x40106c2d:0x3ffd0190 0x400ffda2:0x3ffd01e0 0x4008e089:0x3ffd0210 Rebooting...
after a few reboots the first ITag did connect ok without crashing, i tried connecting the second one but it did not connect, this gave a repeating output on the serial monitor as follows i have now reached a point where i do not understand what i am doing so i need to learn |
Im not sure, but this may be related |
Would you like to try my Fork? The sample I published uses the newly prepared method, but keeps forward compatibility as much as possible. I know it should ideally be PR, but I modified too many. I need a tester because we are still worried about whether it is worth the PR. |
@wakwak-koba thank you yes i will try, i had given up but i can resurrect the project again and test in the next few days and let you know how i get on |
i have one other question if anyone can answer please |
I don't care much, but I think there is another reason why behavior changes depending on delay (). |
I asked an acquaintance whether delay () was necessary. |
@wakwak-koba thank you for that but it still confuses me a little as to why the functionality should change with / without it unless something takes time to recover from the extra power useage |
@wakwak-koba /* multi connect support / |
It is possible that removePeerDevice() has not been called when disconnecting/closing. There are cases where events arrive in the order of ESP_GATTC_DISCONNECT_EVT and ESP_GATTC_CLOSE_EVT, and vice versa. I want to deal with it by the weekend. |
ok, no problem i'm in no rush if you let me know i'll test again after its done |
[STALE_SET] This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions. |
[STALE_DEL] This stale issue has been automatically closed. Thank you for your contributions. |
Hardware:
Board: ESP32 Dev Module
Core Installation version: 1.0.1
IDE name: Arduino IDE
Flash Frequency: ?40Mhz?
PSRAM enabled: no
Upload Speed: 115200
Computer OS: Windows 10
Description:
disconnecting 1 of 2 connected ITags causes both ITags to be disconnected
I have written a client sketch for connecting 2 BLE ITags to one client ESP32.
connecting to the ITags works well and i can pass information to the client.
My problem comes when i disconnect one of the ITags by switching it off, Instead of just disconnecting the tag i have switched off, onDisconnect is called twice and both tags are disconnected, the debug messages shows this happening.
As expected in this scenario the second ITag starts beeping because it has been disconnected.
debug messages show that both times onDisconnect is called the peer address is the same, my 2 ITag addresses are ff:ff:c5:14:e3:c7 and ff:ff:c5:14:e3:c4
can anyone please explain to me why this is happening and / or how i can resolve the problem
my only guess is that as both tags have the same service uuid this is causing some confusion somewhere
thanks in advance
Dave
relevant part of sketch, I can show whole sketch if necessary
Debug Messages: while disconnecting
The text was updated successfully, but these errors were encountered: