Skip to content
Discussion options

You must be logged in to vote

The code in recv_coro runs only once. There is no loop.

Change

async def recv_coro():
    rx = await modem.recv(2000)
    if rx:
        print(f'Received: {rx}')
    else:
        print('Timeout!')

to

async def recv_coro():
    while True:
        rx = await modem.recv(2000):
        if rx:
            print(f'Received: {rx}')
        else:
            print('Timeout!')

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@davefes
Comment options

Answer selected by davefes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants