meshcore 2.3.15__tar.gz → 2.3.17__tar.gz
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-2.3.17/.github/workflows/python-import.yml +24 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/PKG-INFO +1 -1
- {meshcore-2.3.15 → meshcore-2.3.17}/pyproject.toml +1 -1
- {meshcore-2.3.15 → meshcore-2.3.17}/src/meshcore/commands/messaging.py +6 -2
- {meshcore-2.3.15 → meshcore-2.3.17}/.github/funding.yml +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/.github/python-test.yml +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/.gitignore +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/LICENSE +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/README.md +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/examples/.pubsub_example.py.swp +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/examples/ble_chat.py +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/examples/ble_pin_pairing_example.py +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/examples/ble_private_key_export.py +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/examples/ble_sign_example.py +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/examples/ble_stats.py +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/examples/ble_t1000_chan_msg.py +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/examples/ble_t1000_custom_vars.py +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/examples/ble_t1000_infos.py +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/examples/ble_t1000_msg.py +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/examples/ble_t1000_msg_retries.py +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/examples/ble_t1000_set_cv.py +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/examples/chan_recv_with_path.py +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/examples/connection_events_example.py +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/examples/mepo_mc_gps.py +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/examples/pubsub_example.py +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/examples/rf_packet_monitor.py +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/examples/serial_battery_monitor.py +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/examples/serial_channel_manager.py +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/examples/serial_chat.py +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/examples/serial_contacts.py +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/examples/serial_infos.py +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/examples/serial_meshcore_ollama.py +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/examples/serial_msg.py +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/examples/serial_pingbot.py +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/examples/serial_repeater_status.py +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/examples/serial_repeater_telemetry.py +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/examples/serial_rss_bot.py +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/examples/serial_trace.py +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/examples/tcp_chat.py +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/examples/tcp_login_status.py +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/examples/tcp_mchome_contacts.py +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/examples/tcp_mchome_infos.py +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/examples/tcp_mchome_msg.py +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/examples/tcp_mchome_readmsgs.py +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/pytest.ini +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/src/meshcore/__init__.py +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/src/meshcore/ble_cx.py +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/src/meshcore/commands/__init__.py +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/src/meshcore/commands/base.py +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/src/meshcore/commands/binary.py +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/src/meshcore/commands/contact.py +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/src/meshcore/commands/control_data.py +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/src/meshcore/commands/device.py +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/src/meshcore/connection_manager.py +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/src/meshcore/events.py +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/src/meshcore/lpp_json_encoder.py +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/src/meshcore/meshcore.py +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/src/meshcore/meshcore_parser.py +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/src/meshcore/packets.py +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/src/meshcore/parsing.py +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/src/meshcore/reader.py +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/src/meshcore/serial_cx.py +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/src/meshcore/tcp_cx.py +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/tests/README.md +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/tests/test_ble_connection.py +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/tests/test_ble_pin_pairing.py +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/tests/test_meshcore_ble_pin.py +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/tests/unit/test_asyncio_lifecycle.py +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/tests/unit/test_ble_reconnect_cleanup.py +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/tests/unit/test_commands.py +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/tests/unit/test_connection_manager.py +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/tests/unit/test_error_handling.py +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/tests/unit/test_events.py +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/tests/unit/test_lpp_parsing.py +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/tests/unit/test_parse_status.py +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/tests/unit/test_path_discovery_response.py +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/tests/unit/test_private_key_export.py +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/tests/unit/test_protocol_surface_gaps.py +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/tests/unit/test_reader.py +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/tests/unit/test_rxlog_keyerror_regression.py +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/tests/unit/test_send_msg_with_retry.py +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/tests/unit/test_serial_connection.py +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/tests/unit/test_standalone_fixes.py +0 -0
- {meshcore-2.3.15 → meshcore-2.3.17}/tests/unit/test_transport_symmetry.py +0 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
name: Python package import
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: ["main"]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: ["main"]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
import:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
strategy:
|
|
13
|
+
fail-fast: false
|
|
14
|
+
matrix:
|
|
15
|
+
python-version: ["3.10", "3.11"]
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v4
|
|
18
|
+
- uses: actions/setup-python@v5
|
|
19
|
+
with:
|
|
20
|
+
python-version: ${{ matrix.python-version }}
|
|
21
|
+
- name: Install package
|
|
22
|
+
run: python -m pip install .
|
|
23
|
+
- name: Import installed package
|
|
24
|
+
run: python -c "import meshcore"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: meshcore
|
|
3
|
-
Version: 2.3.
|
|
3
|
+
Version: 2.3.17
|
|
4
4
|
Summary: Base classes for communicating with meshcore companion radios
|
|
5
5
|
Project-URL: Homepage, https://github.com/fdlamotte/meshcore_py
|
|
6
6
|
Project-URL: Issues, https://github.com/fdlamotte/meshcore_py/issues
|
|
@@ -370,7 +370,8 @@ class MessagingCommands(CommandHandlerBase):
|
|
|
370
370
|
return await self.send(data, [EventType.OK, EventType.ERROR])
|
|
371
371
|
|
|
372
372
|
async def send_channel_data(
|
|
373
|
-
self, chan: int, data_type: int, payload: bytes,
|
|
373
|
+
self, chan: int, data_type: int, payload: bytes,
|
|
374
|
+
path: Optional[bytes] = None, path_hash_mode: Optional[int] = 0
|
|
374
375
|
) -> Event:
|
|
375
376
|
"""Send a binary datagram to a channel via CMD_SEND_CHANNEL_DATA (0x3E).
|
|
376
377
|
|
|
@@ -382,6 +383,7 @@ class MessagingCommands(CommandHandlerBase):
|
|
|
382
383
|
data_type: Application identifier, 0x0001-0xFFFF (0xFFFF is the developer namespace).
|
|
383
384
|
payload: Binary payload, at most 163 bytes (MAX_CHANNEL_DATA_LENGTH).
|
|
384
385
|
path: Optional path bytes to send along (default None = flood, path_len 0xFF).
|
|
386
|
+
path_hash_mode: Optional path_hash_mode (size of the hash - 1)
|
|
385
387
|
|
|
386
388
|
Returns:
|
|
387
389
|
Event with OK or ERROR.
|
|
@@ -400,7 +402,9 @@ class MessagingCommands(CommandHandlerBase):
|
|
|
400
402
|
path = bytes(path)
|
|
401
403
|
if len(path) >= 0xFF:
|
|
402
404
|
raise ValueError("path must be shorter than 255 bytes")
|
|
403
|
-
|
|
405
|
+
path_len = int(len(path) / (path_hash_mode + 1))
|
|
406
|
+
path_bytes = bytes([path_len | (path_hash_mode << 6)]) + path
|
|
407
|
+
logger.debug(f"Sending raw data {payload.hex()} through path {'Flood' if path is None else path.hex()} of len {'-1' if path is None else path_len} with mode {path_hash_mode} (raw path: {path_bytes.hex()})")
|
|
404
408
|
data = bytes([CommandType.SEND_CHANNEL_DATA.value, chan]) + path_bytes + data_type.to_bytes(2, "little") + bytes(payload)
|
|
405
409
|
return await self.send(data, [EventType.OK, EventType.ERROR])
|
|
406
410
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|