BLE does not support config 'addr_mode'?

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
puppet13th
Posts: 9
Joined: Tue May 03, 2022 9:56 am

BLE does not support config 'addr_mode'?

Post by puppet13th » Wed Aug 24, 2022 6:08 am

Does esp32 port BLE does not support config('addr_mode') https://docs.micropython.org/en/latest/ ... =addr_mode
when i tried to setting addr_mode,it gave me error
example code:

Code: Select all

>>> from ubluetooth import BLE
ble = BLE()
ble.active(True)
ble.config('addr_mode')
True
Traceback (most recent call last):
  File "<stdin>", line 4, in <module>
ValueError: unknown config param

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

Re: BLE does not support config 'addr_mode'?

Post by jimmo » Wed Aug 24, 2022 6:33 am

puppet13th wrote:
Wed Aug 24, 2022 6:08 am
Does esp32 port BLE does not support config('addr_mode') https://docs.micropython.org/en/latest/ ... =addr_mode
when i tried to setting addr_mode,it gave me error
You can only set the addr_mode, not query. It does work on ESP32.

Code: Select all

MicroPython v1.19.1-278-g6dfb462ef on 2022-08-13; TinyPICO with ESP32-PICO-D4
Type "help()" for more information.
>>> import bluetooth
>>> ble = bluetooth.BLE()
>>> ble.config(addr_mode=2)
>>> 

puppet13th
Posts: 9
Joined: Tue May 03, 2022 9:56 am

Re: BLE does not support config 'addr_mode'?

Post by puppet13th » Wed Aug 24, 2022 7:07 am

jimmo wrote:
Wed Aug 24, 2022 6:33 am
You can only set the addr_mode, not query. It does work on ESP32.

Code: Select all

MicroPython v1.19.1-278-g6dfb462ef on 2022-08-13; TinyPICO with ESP32-PICO-D4
Type "help()" for more information.
>>> import bluetooth
>>> ble = bluetooth.BLE()
>>> ble.config(addr_mode=2)
>>> 
I see,that why it gave me error when i tried to queried the config.thank you very much for your pointer.

Post Reply