← index #7220Issue #5600
Related · high · value 2.961
QUERY · ISSUE

BLE: Advertising name stays as 'ESP32'

openby plugowskiopened 2021-05-05updated 2021-05-10
extmod

I have an issue while advertise my device, I used ble_advertise helper from examples, which generates payload as below:

payload = b'\x02\x01\x06\x05\tLEDs\x11\x07\xdb\xa7\x7fgl\xbfG\x9c\x89@\x16\x05S@\x8a<'

So visible name in Bluetooth scanners should be LEDs but it is advertising as ESP32 all the time (I saw LEDs, few times only, after that it has been override as ESP32).

Any suggestions?

CANDIDATE · ISSUE

BLE Server for ESP32

closedby francescofactopened 2020-02-01updated 2020-02-03

Hi.
i just started with micropython. but i can't get a BLE server working on my ESP32 with micropython.
I want to connect to my esp32 via my phone with an app like "BLE IO".
I'm using ubluetooth and this is my code:

import bluetooth
bt = bluetooth.BLE()
bt.active(True)
bt.gap_advertise(1000)

but this goes into "OSError: [Errno 5] EIO". I can't understand how to do it.

i also tried to copy the example "bt_advertising", but if i edit the demo() as this:

def demo():
    payload = advertising_payload(name='micropython', services=[bluetooth.UUID(0x181A), bluetooth.UUID('6E400001-B5A3-F393-E0A9-E50E24DCCA9E')])
    print(payload)
    print(decode_name(payload))
    print(decode_services(payload))
    
    bt = bluetooth.BLE()
    bt.active(True)
    bt.gap_advertise(1000, adv_data=payload)

it always give me errorno 5

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied