And BTW I took some ESP32 C3 board from drawer, installed latest Arduino, then installed ESP32 as per https://github.com/espressif/arduino-esp32 and tried to do some example too. The one you are using look a bit strange but I see where it comes from :-) https://github.com/espressif/arduino-esp32/blob/master/libraries/BLE/examples/BLE_notify/BLE_notify.ino
Well it is Arduino after all so no wonder it is so sketchy :-)
Anyway, going through the BLE library sources is interesting - when calling notify() nothing is actually sent unless someone subscribed for notifications (which is good). Also I compiled that example and unfortunately it is working for me from Espruino side. My device is named C3 so this
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
And BTW I took some ESP32 C3 board from drawer, installed latest Arduino, then installed ESP32 as per https://github.com/espressif/arduino-esp32 and tried to do some example too. The one you are using look a bit strange but I see where it comes from :-)
https://github.com/espressif/arduino-esp32/blob/master/libraries/BLE/examples/BLE_notify/BLE_notify.ino
Well it is Arduino after all so no wonder it is so sketchy :-)
Anyway, going through the BLE library sources is interesting - when calling
notify()
nothing is actually sent unless someone subscribed for notifications (which is good). Also I compiled that example and unfortunately it is working for me from Espruino side. My device is named C3 so thisgives me
and your code just with my mac address
gives me immediate connect
So I am not sure what is wrong in your case.
My example is here https://gist.github.com/fanoush/cf64ab204f9f200ee15cf1c1ec60ed1c it is mostly the same as yours.