Infinite recursion in asyncio.run? #13707
Unanswered
fipscode
asked this question in
Libraries & Drivers
Replies: 2 comments 9 replies
-
|
Beta Was this translation helpful? Give feedback.
9 replies
-
Try this: # peripheral.py
from asyncio import run, sleep_ms
from ble import UUID, Service, Characteristic, Peripheral
async def main():
print("starting")
nus_uuid = UUID("6E400001-B5A3-F393-E0A9-E50E24DCCA9E")
nus_rx_uuid = UUID("6E400002-B5A3-F393-E0A9-E50E24DCCA9E")
nus_tx_uuid = UUID("6E400003-B5A3-F393-E0A9-E50E24DCCA9E")
nus = Service(nus_uuid)
nus_rx = Characteristic(nus, nus_rx_uuid, read=True, notify=True)
nus_tx = Characteristic(nus, nus_tx_uuid, write=True, capture=True)
peripheral = Peripheral('Fipstest Peripheral', (nus,))
print("listening")
conn = await peripheral.listen()
print('connected')
async with conn:
received_on_connection, data = await nus_tx.written()
nus_rx.notify(conn, data=bytearray(b'Response'+data) )
peripheral.disconnect(conn.device)
run(main()) |
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.
-
MP:
MicroPython v1.23.0-preview.126.gf9704ce36.dirty on 2024-02-16; NUCLEO-WB55 with STM32WB55RGV6
I'm trying to get along with aioble and hopefully hit the last showstopper:
But I get the following infinite recursion for this and can't see the cause of the problem?
Any hints?
Beta Was this translation helpful? Give feedback.
All reactions