About the coexistence of esp32WIFI and Bluetooth

Issue #345 resolved
C WEIB created an issue

I had a problem with the WIFI connection being turned on and then the BLE being turned on and then the WIFI would disconnect and the ESP32 BLE would reboot straight away when connected to the phone, they don't seem to co-exist in the VM. I wrote a simple program for WIFI and BLE coexistence using arduino alone and it seems to work fine, here is a screenshot of the error message.

Comments (6)

  1. C WEIB reporter

    @John Maloney I would like to ask if you have any suggestions or ways to solve the problem.

  2. John Maloney repo owner

    I have no experience with BLE on the ESP32. (BLE is an experiment. It is not officially supported by MicroBlocks.)

    From the error message, the error has something to do with advertising. Perhaps there is limit to the service name size? You could try "MyESP32" as the service name.

    Another experiment: Does BLE work if you do not start WiFi?

    If you want to dig deeper, try commenting out the line

    pServer->getAdvertising()->start();
    

    in primBLE_UART_ServerStart() in netPrims.cpp. That won't fix the problem, but if the error goes away you will know that the error has something to do with advertising.

    I believe the esp-ble entry was contributed by @Wenjie Wu, so he might have some suggestions.

    Good luck!

  3. John Maloney repo owner

    Did you get this working?

    I now know a little more about BLE and the advertising name size is limited. I can't recall the exact number but guess it is under 20 characters. So I would try starting the BLE server with a shorter name.

  4. Log in to comment