Replies: 1 comment
-
Now I can confirm micropython will cut characteristic values longer than negotiated MTU minus 1. Yet there's no exposed procedure to do segmented long read(e.g. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I want my ESP32-S3 process input from arbitrary BLE keyboard(ZMK for example), and thus I need to read and process the HID Report Map, which can be a long value that cannot fit in a single packet(i.e. bigger than MTU). Micropython provides no API for a long read with offset which is essential when fragmentation comes.
From my understanding, a long read is basically a read operation with an offset.
ble_gattc_read_long()
,gatt_client_read_long_value_of_characteristic_using_value_handle_with_offset()
but it seems tend to read all chunks within one API call.bt_gatt_read()
.===
Here's my original attempt.
I tried to read the HID Report Map and parse it on ESP32-S3. But I can only get 22 bytes w/o mtu exchange and 64 bytes w/ mtu exchange. The central's MTU size is default to 256. The negotiated MTU is 65. My HID descriptor size is about 80 bytes.
ESP32-S3 works as central, and it connects to a ZMK-based bluetooth keyboard. ZMK uses zephyr 3.5.0.
I've seen a few similar issues/discussions(#7206 #11865 #12398 ), but non of the proposed solutions works for me.
Here's my testing code.
Beta Was this translation helpful? Give feedback.
All reactions