BLE.config 'rxbuf' in v1.20 #11865
Replies: 4 comments 9 replies
-
@Pawelinode |
Beta Was this translation helpful? Give feedback.
-
It is doing it, but the central is receiving 20 bytes
El El jue, 9 de nov. de 2023 a la(s) 03:57, Rinaldi Jandrinata <
***@***.***> escribió:
… the peripheral device in question should write to it's char to break 20
bytes limit.
—
Reply to this email directly, view it on GitHub
<#11865 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJJ2LCA7KXESQZGBGWE3PX3YDR5FDAVCNFSM6AAAAAAZS747PGVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM3TKMJYHAYTC>
.
You are receiving this because you commented.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
Sorry Jim, the issue is in the opposite way, the client (central) is
receiving 20 bytes. That is not the one registering the characteristic
El El jue, 9 de nov. de 2023 a la(s) 04:08, Jim Mussared <
***@***.***> escribió:
… Yep exactly what @puppet13th <https://github.com/puppet13th> said. The
server should do this (i.e. write to its own characteristic) just after
registering the characteristic.
Then when the client sends a remote write, the buffer on the server will
be large enough.
@nestorld <https://github.com/nestorld> In the latest version of aioble
you can also use BufferedCharacteristic(..., max_len=N) in place of
Characteristic(...) when registering. i.e. if your code previously had
temp_char = aioble.Characteristic(temp_service, _ENV_SENSE_TEMP_UUID, read=True, notify=True)
you can now do
temp_char = aioble.BufferedCharacteristic(temp_service, _ENV_SENSE_TEMP_UUID, read=True, notify=True, max_len=50)
—
Reply to this email directly, view it on GitHub
<#11865 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJJ2LCH7GLFZJNXTVFDCHI3YDR6QNAVCNFSM6AAAAAAZS747PGVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM3TKMJYHA4TG>
.
You are receiving this because you were mentioned.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
Thank all guys, But it still took me a long time to explore, and I have summarized it https://github.com/l00jj/MicroPython/wiki/bluetooth.BLE The key point is to set MTU when connecting devices, and set the MTU config and gatts buffer size before proceeding |
Beta Was this translation helpful? Give feedback.
-
In Micropython 1.20 I can't set 'rxbuf'. Has something changed?
Traceback (most recent call last):
File "", line 5, in
ValueError: unknown config param
Beta Was this translation helpful? Give feedback.
All reactions