-
I found this sketch that permit to connect two Pi Pivo W via BLE and exchange messages between a Ble Server and a Ble Client including also an acknoledge msg from the Client to the Server: (https://github.com/kevinmcaleer/pi_to_pico_bluetooth/blob/main/lesson_01/pico_a.py). The pico_a.py can be customised to works as client or serve changing only the variable at line 12 " IAM = 'Peripheral' or IAM = 'Client' "
The same sketch loaded on the Pi Pico w works fine.
At this point I don't know if the issue could be inside the aioble module "/lib/aioble/peripheral.py", line 158 Any suggestion is wellcome. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
The ESP32-C3 has a slightly different BLE stack than the Pi Pico W. It’s possible that the aioble module (which is often based on the ubluetooth or other BLE libraries) handles advertising differently on these platforms. |
Beta Was this translation helpful? Give feedback.
-
I just tried running the same code on a C3 and ran into the same issue, there's certainly something wrong there. As a point of comparison I just ran the aioble test sensor example on the C3 and it did run correctly - I think from a quick look it's quite similar to |
Beta Was this translation helpful? Give feedback.
-
@andrewleech , I've verified that with the ESP32_C3 setting the advertising interval in pico_a.py above 600 fails with the original error while a value below works fine . Unfortunately for some weeks I will not have no possibility to verify if this advertise interval setting works fine also on pi picow. What I've not clear is the format used in temp_sernsor.py to set advertise interval . tks |
Beta Was this translation helpful? Give feedback.
-
@andrewleech |
Beta Was this translation helpful? Give feedback.
@andrewleech ,
I've found the problem comparing how are set the advertising interval in pico_a.py vs temp_sensor_.py , because the syntax of advertising code is almost the same in both programs .
I've verified that with the ESP32_C3 setting the advertising interval in pico_a.py above 600 fails with the original error while a value below works fine .
Unfortunately for some weeks I will not have no possibility to verify if this advertise interval setting works fine also on pi picow.
What I've not clear is the format used in temp_sernsor.py to set advertise interval .
How is interpreted _ADV_INTERVAL_MS = 250_000 ?
250 ms ?
Is the first time that I see these format .
tks