← index #6570Issue #5716
Related · high · value 1.050
QUERY · ISSUE

_IRQ_GATTC_NOTIFY not compatible

openby arthurj58opened 2020-10-25updated 2020-10-27

Hello there
I am working on microPython BLE support
The _IRQ_GATTC_NOTIFY function of Bluetooth ble_temperature.py is not compatible
The physical device is connected to nrf51822 uart.
I installed LightBlue -> Virtual Device -> HeartRate -> 180D -> 2A37 microPython NOTIFY on iPhone not working
mycropython ubluetooth.BLE enable "Listen for notifications" function?

EPS-WROOM-32
esp32-idf4-20201024-unstable-v1.13-126-g05f95682e
thank

CANDIDATE · ISSUE

Is esp32 ble irq() missing resp_data receiving event?

closedby walklinewangopened 2020-03-03updated 2020-03-05

According to BLE.gap_advertise(), when we act as the Advertiser, we can broadcasting 'adv_data' and 'resp_data', and the 'resp_data' can be read by the Central after they were connected.

In the opposite case, when we act as the Central, there isn't an irq events to receive 'resp_data' from the Peripheral after connected. In otherwise, maybe something wrong I have made?

Here is some piece of my code:

def irq(event, data):
    if event == BLEConst.IRQ_SCAN_RESULT: ...
    elif event == BLEConst.IRQ_SCAN_COMPLETE: ...
    elif event == BLEConst.IRQ_PERIPHERAL_CONNECT: ...
    elif event == BLEConst.IRQ_PERIPHERAL_DISCONNECT: ...
    elif event == BLEConst.IRQ_GATTC_NOTIFY: ...
    elif event == BLEConst.IRQ_GATTC_INDICATE: ...
    elif event == BLEConst.IRQ_GATTC_SERVICE_RESULT: ...
    elif event == BLEConst.IRQ_GATTC_CHARACTERISTIC_RESULT: ...
    else:
        print("event: {}, data: {}".format(event, data))

And here is the repl information, I adjusted the output order of some information, but it has no effect on the logic:

connecting to [A4:C1:38:0C:15:FD]
GAP procedure initiated: connect; peer_addr_type=0 peer_addr=a4:c1:38:0c:15:fd scan_itvl=16 scan_window=16 itvl_min=24 itvl_max=40 latency=0 supervision_timeout=256 min_ce_len=16 max_ce_len=768 own_addr_type=0
[A4:C1:38:0C:15:FD] connected

GATT procedure initiated: discover all services
service result: [(0, 1, 7, UUID16(0x1800))]
service result: [(0, 8, 11, UUID16(0x1801))]
service result: [(0, 12, 24, UUID16(0x180a))]
service result: [(0, 25, 28, UUID16(0x180f))]
service result: [(0, 29, 32, UUID128('00010203-0405-0607-0809-0a0b0c0d1912'))]
service result: [(0, 33, 75, UUID128('ebe0ccb0-7a0a-4b0c-8a1a-6ff2997da3a6'))]
service result: [(0, 76, 95, UUID16(0xfe95))]
service result: [(0, 96, 104, UUID128('00000100-0065-6c62-2e74-6f696d2e696d'))]

GAP procedure initiated: connection parameter update; conn_handle=0 itvl_min=12 itvl_max=24 latency=0 supervision_timeout=90 min_ce_len=16 max_ce_len=768

[A4:C1:38:0C:15:FD] notify: b'\xb3\x08$\xae\x0b'
[A4:C1:38:0C:15:FD] notify: b'\xb0\x08#\xae\x0b'
[A4:C1:38:0C:15:FD] notify: b'\xb4\x08#\xae\x0b'
[A4:C1:38:0C:15:FD] notify: b'\xb2\x08#\xae\x0b'
[A4:C1:38:0C:15:FD] notify: b'\xb3\x08$\xae\x0b'
[A4:C1:38:0C:15:FD] notify: b'\xb1\x08$\xae\x0b'
[A4:C1:38:0C:15:FD] notify: b'\xb4\x08$\xae\x0b'

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