mirror of
https://github.com/meshcore-dev/meshcore-cli.git
synced 2026-04-20 22:13:48 +00:00
addr mgmt for ble
This commit is contained in:
parent
22942061b6
commit
fe43c14e81
1 changed files with 6 additions and 1 deletions
|
|
@ -2216,7 +2216,12 @@ async def main(argv):
|
|||
elif not serial_port is None : # connect via serial port
|
||||
mc = await MeshCore.create_serial(port=serial_port, baudrate=baudrate, debug=debug, only_error=json_output)
|
||||
else : #connect via ble
|
||||
if device is None and (address is None or address == "" or len(address.split(":")) != 6) :
|
||||
client = None
|
||||
if device or address and address.split(":") == 6 :
|
||||
pass
|
||||
elif address and len(address) == 36 and len(address.split("-") == 5):
|
||||
client = BleakClient(address)
|
||||
else:
|
||||
logger.info(f"Scanning BLE for device matching {address}")
|
||||
devices = await BleakScanner.discover(timeout=timeout)
|
||||
found = False
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue