meshcore 2.3.13__tar.gz → 2.3.14__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.
Files changed (83) hide show
  1. {meshcore-2.3.13 → meshcore-2.3.14}/PKG-INFO +1 -1
  2. {meshcore-2.3.13 → meshcore-2.3.14}/pyproject.toml +1 -1
  3. {meshcore-2.3.13 → meshcore-2.3.14}/src/meshcore/commands/messaging.py +5 -4
  4. {meshcore-2.3.13 → meshcore-2.3.14}/tests/unit/test_reader.py +2 -2
  5. {meshcore-2.3.13 → meshcore-2.3.14}/.github/funding.yml +0 -0
  6. {meshcore-2.3.13 → meshcore-2.3.14}/.github/python-test.yml +0 -0
  7. {meshcore-2.3.13 → meshcore-2.3.14}/.gitignore +0 -0
  8. {meshcore-2.3.13 → meshcore-2.3.14}/LICENSE +0 -0
  9. {meshcore-2.3.13 → meshcore-2.3.14}/README.md +0 -0
  10. {meshcore-2.3.13 → meshcore-2.3.14}/examples/.pubsub_example.py.swp +0 -0
  11. {meshcore-2.3.13 → meshcore-2.3.14}/examples/ble_chat.py +0 -0
  12. {meshcore-2.3.13 → meshcore-2.3.14}/examples/ble_pin_pairing_example.py +0 -0
  13. {meshcore-2.3.13 → meshcore-2.3.14}/examples/ble_private_key_export.py +0 -0
  14. {meshcore-2.3.13 → meshcore-2.3.14}/examples/ble_sign_example.py +0 -0
  15. {meshcore-2.3.13 → meshcore-2.3.14}/examples/ble_stats.py +0 -0
  16. {meshcore-2.3.13 → meshcore-2.3.14}/examples/ble_t1000_chan_msg.py +0 -0
  17. {meshcore-2.3.13 → meshcore-2.3.14}/examples/ble_t1000_custom_vars.py +0 -0
  18. {meshcore-2.3.13 → meshcore-2.3.14}/examples/ble_t1000_infos.py +0 -0
  19. {meshcore-2.3.13 → meshcore-2.3.14}/examples/ble_t1000_msg.py +0 -0
  20. {meshcore-2.3.13 → meshcore-2.3.14}/examples/ble_t1000_msg_retries.py +0 -0
  21. {meshcore-2.3.13 → meshcore-2.3.14}/examples/ble_t1000_set_cv.py +0 -0
  22. {meshcore-2.3.13 → meshcore-2.3.14}/examples/chan_recv_with_path.py +0 -0
  23. {meshcore-2.3.13 → meshcore-2.3.14}/examples/connection_events_example.py +0 -0
  24. {meshcore-2.3.13 → meshcore-2.3.14}/examples/mepo_mc_gps.py +0 -0
  25. {meshcore-2.3.13 → meshcore-2.3.14}/examples/pubsub_example.py +0 -0
  26. {meshcore-2.3.13 → meshcore-2.3.14}/examples/rf_packet_monitor.py +0 -0
  27. {meshcore-2.3.13 → meshcore-2.3.14}/examples/serial_battery_monitor.py +0 -0
  28. {meshcore-2.3.13 → meshcore-2.3.14}/examples/serial_channel_manager.py +0 -0
  29. {meshcore-2.3.13 → meshcore-2.3.14}/examples/serial_chat.py +0 -0
  30. {meshcore-2.3.13 → meshcore-2.3.14}/examples/serial_contacts.py +0 -0
  31. {meshcore-2.3.13 → meshcore-2.3.14}/examples/serial_infos.py +0 -0
  32. {meshcore-2.3.13 → meshcore-2.3.14}/examples/serial_meshcore_ollama.py +0 -0
  33. {meshcore-2.3.13 → meshcore-2.3.14}/examples/serial_msg.py +0 -0
  34. {meshcore-2.3.13 → meshcore-2.3.14}/examples/serial_pingbot.py +0 -0
  35. {meshcore-2.3.13 → meshcore-2.3.14}/examples/serial_repeater_status.py +0 -0
  36. {meshcore-2.3.13 → meshcore-2.3.14}/examples/serial_repeater_telemetry.py +0 -0
  37. {meshcore-2.3.13 → meshcore-2.3.14}/examples/serial_rss_bot.py +0 -0
  38. {meshcore-2.3.13 → meshcore-2.3.14}/examples/serial_trace.py +0 -0
  39. {meshcore-2.3.13 → meshcore-2.3.14}/examples/tcp_chat.py +0 -0
  40. {meshcore-2.3.13 → meshcore-2.3.14}/examples/tcp_login_status.py +0 -0
  41. {meshcore-2.3.13 → meshcore-2.3.14}/examples/tcp_mchome_contacts.py +0 -0
  42. {meshcore-2.3.13 → meshcore-2.3.14}/examples/tcp_mchome_infos.py +0 -0
  43. {meshcore-2.3.13 → meshcore-2.3.14}/examples/tcp_mchome_msg.py +0 -0
  44. {meshcore-2.3.13 → meshcore-2.3.14}/examples/tcp_mchome_readmsgs.py +0 -0
  45. {meshcore-2.3.13 → meshcore-2.3.14}/pytest.ini +0 -0
  46. {meshcore-2.3.13 → meshcore-2.3.14}/src/meshcore/__init__.py +0 -0
  47. {meshcore-2.3.13 → meshcore-2.3.14}/src/meshcore/ble_cx.py +0 -0
  48. {meshcore-2.3.13 → meshcore-2.3.14}/src/meshcore/commands/__init__.py +0 -0
  49. {meshcore-2.3.13 → meshcore-2.3.14}/src/meshcore/commands/base.py +0 -0
  50. {meshcore-2.3.13 → meshcore-2.3.14}/src/meshcore/commands/binary.py +0 -0
  51. {meshcore-2.3.13 → meshcore-2.3.14}/src/meshcore/commands/contact.py +0 -0
  52. {meshcore-2.3.13 → meshcore-2.3.14}/src/meshcore/commands/control_data.py +0 -0
  53. {meshcore-2.3.13 → meshcore-2.3.14}/src/meshcore/commands/device.py +0 -0
  54. {meshcore-2.3.13 → meshcore-2.3.14}/src/meshcore/connection_manager.py +0 -0
  55. {meshcore-2.3.13 → meshcore-2.3.14}/src/meshcore/events.py +0 -0
  56. {meshcore-2.3.13 → meshcore-2.3.14}/src/meshcore/lpp_json_encoder.py +0 -0
  57. {meshcore-2.3.13 → meshcore-2.3.14}/src/meshcore/meshcore.py +0 -0
  58. {meshcore-2.3.13 → meshcore-2.3.14}/src/meshcore/meshcore_parser.py +0 -0
  59. {meshcore-2.3.13 → meshcore-2.3.14}/src/meshcore/packets.py +0 -0
  60. {meshcore-2.3.13 → meshcore-2.3.14}/src/meshcore/parsing.py +0 -0
  61. {meshcore-2.3.13 → meshcore-2.3.14}/src/meshcore/reader.py +0 -0
  62. {meshcore-2.3.13 → meshcore-2.3.14}/src/meshcore/serial_cx.py +0 -0
  63. {meshcore-2.3.13 → meshcore-2.3.14}/src/meshcore/tcp_cx.py +0 -0
  64. {meshcore-2.3.13 → meshcore-2.3.14}/tests/README.md +0 -0
  65. {meshcore-2.3.13 → meshcore-2.3.14}/tests/test_ble_connection.py +0 -0
  66. {meshcore-2.3.13 → meshcore-2.3.14}/tests/test_ble_pin_pairing.py +0 -0
  67. {meshcore-2.3.13 → meshcore-2.3.14}/tests/test_meshcore_ble_pin.py +0 -0
  68. {meshcore-2.3.13 → meshcore-2.3.14}/tests/unit/test_asyncio_lifecycle.py +0 -0
  69. {meshcore-2.3.13 → meshcore-2.3.14}/tests/unit/test_ble_reconnect_cleanup.py +0 -0
  70. {meshcore-2.3.13 → meshcore-2.3.14}/tests/unit/test_commands.py +0 -0
  71. {meshcore-2.3.13 → meshcore-2.3.14}/tests/unit/test_connection_manager.py +0 -0
  72. {meshcore-2.3.13 → meshcore-2.3.14}/tests/unit/test_error_handling.py +0 -0
  73. {meshcore-2.3.13 → meshcore-2.3.14}/tests/unit/test_events.py +0 -0
  74. {meshcore-2.3.13 → meshcore-2.3.14}/tests/unit/test_lpp_parsing.py +0 -0
  75. {meshcore-2.3.13 → meshcore-2.3.14}/tests/unit/test_parse_status.py +0 -0
  76. {meshcore-2.3.13 → meshcore-2.3.14}/tests/unit/test_path_discovery_response.py +0 -0
  77. {meshcore-2.3.13 → meshcore-2.3.14}/tests/unit/test_private_key_export.py +0 -0
  78. {meshcore-2.3.13 → meshcore-2.3.14}/tests/unit/test_protocol_surface_gaps.py +0 -0
  79. {meshcore-2.3.13 → meshcore-2.3.14}/tests/unit/test_rxlog_keyerror_regression.py +0 -0
  80. {meshcore-2.3.13 → meshcore-2.3.14}/tests/unit/test_send_msg_with_retry.py +0 -0
  81. {meshcore-2.3.13 → meshcore-2.3.14}/tests/unit/test_serial_connection.py +0 -0
  82. {meshcore-2.3.13 → meshcore-2.3.14}/tests/unit/test_standalone_fixes.py +0 -0
  83. {meshcore-2.3.13 → meshcore-2.3.14}/tests/unit/test_transport_symmetry.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: meshcore
3
- Version: 2.3.13
3
+ Version: 2.3.14
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
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "meshcore"
7
- version = "2.3.13"
7
+ version = "2.3.14"
8
8
  authors = [
9
9
  { name="Florent de Lamotte", email="florent@frizoncorrea.fr" },
10
10
  { name="Alex Wolden", email="awolden@gmail.com" },
@@ -73,10 +73,11 @@ class MessagingCommands(CommandHandlerBase):
73
73
  timestamp = int(time.time())
74
74
 
75
75
  if dst_type is None:
76
- dst_type = dst["type"]
77
- else: # assume destination is a repeater
78
- logger.warning("Can't determine destination type, please ensure contacts first or specify dst_type when calling `send_cmd`. Assuming it's a repeater.")
79
- dst_type = AdvType.REPEATER.value
76
+ if isinstance(dst, dict) and "type" in dst:
77
+ dst_type = dst["type"]
78
+ else: # assume destination is a repeater
79
+ logger.warning("Can't determine destination type, please ensure contacts first or specify dst_type when calling `send_cmd`. Assuming it's a repeater.")
80
+ dst_type = AdvType.REPEATER.value
80
81
 
81
82
  cmd_data = bytearray([CommandType.SEND_TXT_MSG.value])
82
83
  if dst_type == AdvType.CHAT.value :
@@ -286,10 +286,10 @@ async def test_advert_path_preserves_embedded_zero_bytes():
286
286
  dispatcher = _CapturingDispatcher()
287
287
  reader = MessageReader(dispatcher)
288
288
 
289
- # ADVERT_PATH (0x0e), 2 hops, 3-byte hashes.
289
+ # ADVERT_PATH (0x16), timestamp 1, 2 hops, 3-byte hashes.
290
290
  # path_len byte: hash mode 2 (3 bytes) + 2 hops = 0x82.
291
291
  # The first hash deliberately contains an embedded 0x00 byte.
292
- packet = bytearray.fromhex("0e8212003456789a")
292
+ packet = bytearray.fromhex("16010000008212003456789a")
293
293
 
294
294
  await reader.handle_rx(packet)
295
295
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes