From 0c5880d2e4bb5394002b9ddb5650b06e94c0ab43 Mon Sep 17 00:00:00 2001 From: Andrew Leech Date: Fri, 16 Sep 2022 11:27:58 +1000 Subject: [PATCH] aioble/l2cap: Fix psm variable name. Signed-off-by: Jim Mussared --- micropython/bluetooth/aioble/aioble/l2cap.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/micropython/bluetooth/aioble/aioble/l2cap.py b/micropython/bluetooth/aioble/aioble/l2cap.py index e8e4c026..713c441f 100644 --- a/micropython/bluetooth/aioble/aioble/l2cap.py +++ b/micropython/bluetooth/aioble/aioble/l2cap.py @@ -178,14 +178,14 @@ class L2CAPChannel: # Use connection.l2cap_accept() instead of calling this directly. -async def accept(connection, psn, mtu, timeout_ms): +async def accept(connection, psm, mtu, timeout_ms): global _listening channel = L2CAPChannel(connection) # Start the stack listening if necessary. if not _listening: - ble.l2cap_listen(psn, mtu) + ble.l2cap_listen(psm, mtu) _listening = True # Wait for the connect irq from the remote connection. @@ -195,14 +195,14 @@ async def accept(connection, psn, mtu, timeout_ms): # Use connection.l2cap_connect() instead of calling this directly. -async def connect(connection, psn, mtu, timeout_ms): +async def connect(connection, psm, mtu, timeout_ms): if _listening: raise ValueError("Can't connect while listening") channel = L2CAPChannel(connection) with connection.timeout(timeout_ms): - ble.l2cap_connect(connection._conn_handle, psn, mtu) + ble.l2cap_connect(connection._conn_handle, psm, mtu) # Wait for the connect irq from the remote connection. # If the connection fails, we get a disconnect event (with status) instead.