meshcore-cli 1.1.40__py3-none-any.whl → 1.1.41__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- meshcore_cli/meshcore_cli.py +19 -11
- {meshcore_cli-1.1.40.dist-info → meshcore_cli-1.1.41.dist-info}/METADATA +1 -1
- meshcore_cli-1.1.41.dist-info/RECORD +8 -0
- meshcore_cli-1.1.40.dist-info/RECORD +0 -8
- {meshcore_cli-1.1.40.dist-info → meshcore_cli-1.1.41.dist-info}/WHEEL +0 -0
- {meshcore_cli-1.1.40.dist-info → meshcore_cli-1.1.41.dist-info}/entry_points.txt +0 -0
- {meshcore_cli-1.1.40.dist-info → meshcore_cli-1.1.41.dist-info}/licenses/LICENSE +0 -0
meshcore_cli/meshcore_cli.py
CHANGED
|
@@ -9,6 +9,7 @@ import getopt, json, shlex, re
|
|
|
9
9
|
import logging
|
|
10
10
|
import requests
|
|
11
11
|
from bleak import BleakScanner, BleakClient
|
|
12
|
+
from bleak.exc import BleakError
|
|
12
13
|
import serial.tools.list_ports
|
|
13
14
|
from pathlib import Path
|
|
14
15
|
import traceback
|
|
@@ -23,7 +24,7 @@ from prompt_toolkit.shortcuts import radiolist_dialog
|
|
|
23
24
|
from meshcore import MeshCore, EventType, logger
|
|
24
25
|
|
|
25
26
|
# Version
|
|
26
|
-
VERSION = "v1.1.
|
|
27
|
+
VERSION = "v1.1.41"
|
|
27
28
|
|
|
28
29
|
# default ble address is stored in a config file
|
|
29
30
|
MCCLI_CONFIG_DIR = str(Path.home()) + "/.config/meshcore/"
|
|
@@ -2600,23 +2601,30 @@ async def main(argv):
|
|
|
2600
2601
|
return
|
|
2601
2602
|
case "-l" :
|
|
2602
2603
|
print("BLE devices:")
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2604
|
+
try :
|
|
2605
|
+
devices = await BleakScanner.discover(timeout=timeout)
|
|
2606
|
+
if len(devices) == 0:
|
|
2607
|
+
print(" No ble device found")
|
|
2608
|
+
for d in devices :
|
|
2609
|
+
if not d.name is None and d.name.startswith("MeshCore-"):
|
|
2610
|
+
print(f" {d.address} {d.name}")
|
|
2611
|
+
except BleakError:
|
|
2612
|
+
print(" No BLE HW")
|
|
2609
2613
|
print("\nSerial ports:")
|
|
2610
2614
|
ports = serial.tools.list_ports.comports()
|
|
2611
2615
|
for port, desc, hwid in sorted(ports):
|
|
2612
2616
|
print(f" {port:<18} {desc} [{hwid}]")
|
|
2613
2617
|
return
|
|
2614
2618
|
case "-S" :
|
|
2615
|
-
devices = await BleakScanner.discover(timeout=timeout)
|
|
2616
2619
|
choices = []
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
+
|
|
2621
|
+
try :
|
|
2622
|
+
devices = await BleakScanner.discover(timeout=timeout)
|
|
2623
|
+
for d in devices:
|
|
2624
|
+
if not d.name is None and d.name.startswith("MeshCore-"):
|
|
2625
|
+
choices.append(({"type":"ble","device":d}, f"{d.address:<22} {d.name}"))
|
|
2626
|
+
except BleakError:
|
|
2627
|
+
logger.info("No BLE Device")
|
|
2620
2628
|
|
|
2621
2629
|
ports = serial.tools.list_ports.comports()
|
|
2622
2630
|
for port, desc, hwid in sorted(ports):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: meshcore-cli
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.41
|
|
4
4
|
Summary: Command line interface to meshcore companion radios
|
|
5
5
|
Project-URL: Homepage, https://github.com/fdlamotte/meshcore-cli
|
|
6
6
|
Project-URL: Issues, https://github.com/fdlamotte/meshcore-cli/issues
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
meshcore_cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
+
meshcore_cli/__main__.py,sha256=PfYgibmu2LEtC-OV7L1UgmvV3swJ5rQ4bbXHlwUFlgE,83
|
|
3
|
+
meshcore_cli/meshcore_cli.py,sha256=Q2bWOgvFYayO03ur0TUgKuFqkvGypyM5sKloCqZfuSk,116590
|
|
4
|
+
meshcore_cli-1.1.41.dist-info/METADATA,sha256=ABH3OZvHZn3S8CUAwjSUp3RC339dngd4bFwBfISlRO8,11630
|
|
5
|
+
meshcore_cli-1.1.41.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
6
|
+
meshcore_cli-1.1.41.dist-info/entry_points.txt,sha256=77V29Pyth11GteDk7tneBN3MMk8JI7bTlS-BGSmxCmI,103
|
|
7
|
+
meshcore_cli-1.1.41.dist-info/licenses/LICENSE,sha256=F9s987VtS0AKxW7LdB2EkLMkrdeERI7ICdLJR60A9M4,1066
|
|
8
|
+
meshcore_cli-1.1.41.dist-info/RECORD,,
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
meshcore_cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
meshcore_cli/__main__.py,sha256=PfYgibmu2LEtC-OV7L1UgmvV3swJ5rQ4bbXHlwUFlgE,83
|
|
3
|
-
meshcore_cli/meshcore_cli.py,sha256=oWPnTuetuus4oaP-QQlNJx7IIeRRYGCXUG4FSYTF7AM,116312
|
|
4
|
-
meshcore_cli-1.1.40.dist-info/METADATA,sha256=wsHZfVpYP4kvQMI2KvKyHbygTO-Sgq_-8Nr6ghnnPrk,11630
|
|
5
|
-
meshcore_cli-1.1.40.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
6
|
-
meshcore_cli-1.1.40.dist-info/entry_points.txt,sha256=77V29Pyth11GteDk7tneBN3MMk8JI7bTlS-BGSmxCmI,103
|
|
7
|
-
meshcore_cli-1.1.40.dist-info/licenses/LICENSE,sha256=F9s987VtS0AKxW7LdB2EkLMkrdeERI7ICdLJR60A9M4,1066
|
|
8
|
-
meshcore_cli-1.1.40.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|