bluetooth ESP-IDF v3.x

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
Listian
Posts: 6
Joined: Tue Apr 14, 2020 8:05 pm

bluetooth ESP-IDF v3.x

Post by Listian » Tue Apr 14, 2020 8:13 pm

Hello!

1) Firmware built with ESP-IDF v3.x, with support for BLE, LAN and PPP

The description for ESP-IDF v3.x indicates BLE support, but I can’t find something to use it. How to do it?

2) GENERIC : esp32-idf3-20200414-v1.12-368-gbd63c26dd.bin

Installed the latest firmware and esp32 is constantly rebooted. is that so?
With esp32-idf3-20191220-v1.12.bin does not reboot.

Board: ESP32 Lolin32
Last edited by Listian on Wed Apr 15, 2020 12:43 am, edited 1 time in total.

User avatar
jimmo
Posts: 2754
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: bluetooth ESP-IDF v3.x

Post by jimmo » Wed Apr 15, 2020 12:19 am

Listian wrote:
Tue Apr 14, 2020 8:13 pm
The description for ESP-IDF v3.x indicates BLE support, but I can’t find something to use it. How to do it?
http://docs.micropython.org/en/latest/l ... tooth.html

and examples at

https://github.com/micropython/micropyt ... /bluetooth
Listian wrote:
Tue Apr 14, 2020 8:13 pm
Installed the latest firmware and esp32 is constantly rebooted. is that so?
With esp32-idf3-20191220-v1.12.bin does not reboot.
That's surprising... which ESP32 board/module do you have? Do you see the same issue with the IDF4 version? When does it reboot? Did you erase flash first?

The 1.12 stable release (i.e. esp32-*-20191220-v1.12.bin) only supports BLE in the IDF 4.0 version (at the time of the 1.12 release, Espressif hadn't added NimBLE support to IDF 3.3).

However, the nightly builds support BLE in both 3.3 and 4.0.

Listian
Posts: 6
Joined: Tue Apr 14, 2020 8:05 pm

Re: bluetooth ESP-IDF v3.x

Post by Listian » Wed Apr 15, 2020 1:25 am

How confusing they are with BLE. :shock:

p.s.

Sorry, forgot to indicate the board.

ESP32 lolin32

Image

esp32-idf4-20200415-v1.12-371-gf534b9976.bin - work it!

new firmware esp32-idf3-20200415-v1.12-371-gf534b9976.bin - does not work (constantly reboot).

I use ESP32 download tools v3.6.8. Erase flash, then download the firmware at 0x1000.

patrickw
Posts: 12
Joined: Sat Feb 01, 2020 7:51 pm
Contact:

Re: bluetooth ESP-IDF v3.x

Post by patrickw » Wed May 13, 2020 7:48 pm

I just ran a couple checks on IDF3 and IDF4 builds for the TinyPico builds.

I confirmed the ubluetooth module is only in nightly IDF3 builds as Jimmo stated.
The website says IDF4 doesn't support WLAN. Is that out of date or does it not _fully_ support WLAN, because I was able to connect and get an IP Address with IDF4 builds.

IDF3 1.12 Stable on 2020-03-16

Code: Select all

os.uname() ==  (
    sysname='esp32', nodename='esp32', release='1.12.0',
    version='v1.12 on 2020-03-16', machine='TinyPICO with ESP32-PICO-D4'
    )
ubluetooth module is NOT included


IDF3 1.12 Nightly Build 451 on 2020-05-13

Code: Select all

os.uname() == (
    sysname='esp32', nodename='esp32', release='1.12.0',
    version='v1.12-451-g18fb5b443 on 2020-05-13',
    machine='TinyPICO with ESP32-PICO-D4'
    )
ubluetooth module IS included

IDF4 1.12 Stable on 2020-03-16

Code: Select all

os.uname() == (
    sysname='esp32', nodename='esp32', release='1.12.0',
    version='v1.12 on 2020-03-16', machine='TinyPICO with ESP32-PICO-D4'
    )
ubluetooth module IS included
network IS included
wlan.connect() worked... Despite the notes on the site saying it does not.

IDF4 1.12 Nightly Build 451 on 2020-05-13

Code: Select all

os.uname() ==  (
    sysname='esp32', nodename='esp32', release='1.12.0',
    version='v1.12-451-g18fb5b443 on 2020-05-13',
    machine='TinyPICO with ESP32-PICO-D4'
    )
ubluetooth module IS included
network IS included
wlan.connect() worked... Despite the notes on the site saying it does not.

patrickw
Posts: 12
Joined: Sat Feb 01, 2020 7:51 pm
Contact:

Re: bluetooth ESP-IDF v3.x

Post by patrickw » Wed May 13, 2020 10:31 pm

One last comment... On the IDF3 and IDF4 nightly builds I was able to do a simple gap_scan and see the data. On the IDF4 stable build there are a few odd things that are fixed in the nightly build (no mac address, complaints about ble.active(True) before doing a scan are two) but as I said these go away in both night builds.

So, on May 13, 2020, if you're looking at BLE.. You gotta go to the nightly builds.

Post Reply