micropython / micropython/micropython-lib
aioble 'BLE' object has no attribute 'l2cap_connect' on Pico-W
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.9k
- Forks
- 1.1k
- Avg merge
- 7d 6h
- Merged PRs (30d)
- 3
Description
I'm trying to run the l2cap_file_client.py and l2cap_file_server.py examples from https://github.com/micropython/micropython-lib/tree/master/micropython/bluetooth/aioble on my Pico-W. I'm currently running MicroPython v1.22.0-preview.236.ge1a7aa23f on 2023-12-09; Raspberry Pi Pico W with RP2040
It sounds like the BLE support for the Pico-W is missing l2cap functionality, I get stack traces like:
...
Connecting to Device(ADDR_PUBLIC, d8:3a:dd:94:88:0e)
Discovering...
Connecting channel
Task exception wasn't retrieved
future: <Task> coro= <generator object 'getPrefsFromServer' at 20012c60>
Traceback (most recent call last):
File "asyncio/core.py", line 1, in run_until_complete
File "l2cap_file_client.py", line 152, in getPrefsFromServer
File "l2cap_file_client.py", line 62, in connect
File "aioble/device.py", line 288, in l2cap_connect
File "aioble/l2cap.py", line 205, in connect
AttributeError: 'BLE' object has no attribute 'l2cap_connect'
What can I do to get this working? More documentation about what is/isn't supported on a given platform would be really helpful as I just blew an afternoon getting to this point. Seems to be a bit of a theme, see https://github.com/micropython/micropython-lib/issues/444 and https://github.com/micropython/micropython-lib/issues/686
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the l2cap_file_client.py and l2cap_file_server.py examples, then trace aioble/device.py and aioble/l2cap.py at the failing l2cap_connect call. Check the Pico-W BLE implementation to determine whether L2CAP is supported on that platform. Done should document the platform support and the available path to run these examples, or identify the missing implementation scope.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- embedded-iot
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100