Bluetooth not working

Posted on
  • Hello,
    I'm trying to get Bluetooth working on an ESP32 but running into a problem.

    When I run


    I see an error like below. Not sure what it means.

    In the IDE I tried running the below code

      "3e440001-f5bb-357d-719d-179272e4d4d9": {
        "3e440002-f5bb-357d-719d-179272e4d4d9": {
          value : [0],
          maxLen : 1,
          writable : true,
          onWrite : function(evt) {
            // When the characteristic is written, raise flag
      NRF.setAdvertising({}, {name:"Flag"});

    The code uploads and I'm can connect to the device using NRF Connect app. However, when I try to send a value I get the below error

    Please let me know what I'm doing wrong.

  • I have a same problem. Someone resolved this problem?
    BTW: It's known when BLE/NRF will be supported on esp32? @Gordon

  • It's known when BLE/NRF will be supported on esp32?

    Right now there are no plans to fix it - but the code is all open so anyone could jump in, fix it themselves, and contribute their work back.

    I'm afraid ESP32 isn't a big priority for me right now - it brings in no money whatsoever and Espressif have no interest in helping out. I'm totally swamped with work on the official boards and Bangle.js right now so I just can't dedicate any time to it myself.

  • I looked to fix this but I don't know where the onWrite function is called in the NRF object. I found 2 places - first one 'esp32_gatts_func.c' second 'bluetooth.c'. I don't konow where is bug. If you give me tip it will be nice.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview

Bluetooth not working

Posted by Avatar for Chaapu @Chaapu