You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 16, 2024. It is now read-only.
(sysname='LoPy', nodename='LoPy', release='1.6.13.b1', version='v1.8.6-607-g9c8a0e9e on 2017-05-01', machine='LoPy with
ESP32', lorawan='1.0.0')
Attempting to connect from one LoPy to another LoPy device:
fromnetworkimportBluetoothimportbinasciibluetooth=Bluetooth()
# scan until we can connect to any BLE device aroundbluetooth.start_scan(-1)
adv=NonewhileTrue:
adv=bluetooth.get_adv()
ifadv:
try:
print(binascii.hexlify(adv.mac))
bluetooth.connect(adv.mac)
except:
# start scanning againbluetooth.start_scan(-1)
continuebreakprint("Connected to device with addr = {}".format(binascii.hexlify(adv.mac)))
Error arises after the connecting LoPy finds the address of the advertising device and attempts to connect.
b'240ac40061fa'
Traceback (most recent call last):
File "<stdin>", line 50, in <module>
OSError: connection already closed