Why is BLE().config giving me a ValueError unknown config param
?
#13773
Unanswered
brianreinhold
asked this question in
Libraries & Drivers
Replies: 0 comments
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.
-
At the start of my application I have
Then later I have the following conditional just before making a connection
When the application is run, all those
ble.config
methods at the start not only give rise to no error but they appear to work.However, when I dynamically set the secure connections to False ( a work around for a TI Bluetooth chip that chokes when it sees the secure connections flag set in a pairing request), the request to read back what I set gives
ValueError: unknown config param
.Note there is no error on setting the config. (Is there something missing in the documentation about reading back a config?) This is the sole example I could find in a test
BDADDR=ble.config("mac")
so it looks okay.I do not understand that behavior. We are using the btstack on the PICO-W and have had to do a lot of work to support client-side pairing (Micropython does not support the pairing/bonding functionality with the btstack out of the box.) So far, our modifications seem to have worked with the various types of bonding procedures peripherals can throw at our client.
I am not sure these configs can be dynamically set but from the low-level documentation it certainly seems okay. In the pairing/bonding section there is this text
I do not see any implied restriction on when these fields can be set. They are also options in the aioble pairing method but in the case of a security request, the btstack handles it and aioble knows nothing about it. Thus the reason to clear the le_secure flag so the btstack sends a pairing request with that bit cleared.
Beta Was this translation helpful? Give feedback.
All reactions