Lines Matching refs:ble
77 def send_data(ble, conn_handle, cid): argument
85 if not ble.l2cap_send(conn_handle, cid, mv[:n]):
89 def recv_data(ble, conn_handle, cid): argument
100 n = ble.l2cap_recvinto(conn_handle, cid, buf)
112 multitest.globals(BDADDR=ble.config("mac"))
114 ble.gap_advertise(20_000, b"\x02\x01\x06\x04\xffMPY")
121 ble.l2cap_listen(_L2CAP_PSM, _L2CAP_MTU)
128 recv_bytes, recv_correct = recv_data(ble, conn_handle, cid)
129 send_data(ble, conn_handle, cid)
138 ble.active(0)
147 ble.gap_connect(*BDADDR)
151 ble.l2cap_connect(conn_handle, _L2CAP_PSM, _L2CAP_MTU)
156 send_data(ble, conn_handle, cid)
157 recv_bytes, recv_correct = recv_data(ble, conn_handle, cid)
161 ble.l2cap_disconnect(conn_handle, cid)
167 print("gap_disconnect:", ble.gap_disconnect(conn_handle))
170 ble.active(0)
173 ble = bluetooth.BLE() variable
174 ble.active(1)
175 ble.irq(irq)