Commit Graph
160 Commits
Author SHA1 Message Date
Ian McEwen 17f3605736 Ensure set-owner combined with set-owner-short sets both values 2024-09-05 13:58:02 -07:00
Derek Arnold 3811226a61 add a configurable timeout 2024-09-03 22:12:03 -05:00
Derek Arnold 9612aea9b9 Add in a retry mechanism for channel settings
Attempts multiple times to fetch things over the admin channel
before giving up.
2024-09-03 21:58:16 -05:00
Ian McEwen e7ed254d9d appease pylint, tests, mypy 2024-08-24 22:00:29 -07:00
Ian McEwen dfa29bbb7c Add ensureSessionKey to setURL and setFixedPosition calls 2024-08-24 21:50:44 -07:00
Jonathan Bennett a9e2168f1d Refactor to add ensureSessionKey function 2024-08-24 20:18:57 -05:00
Jonathan Bennett 4cc283d004 Add the admin sessionkey_only request 2024-08-24 17:27:42 -05:00
Ian McEwen bc508ff9e6 cleanup admin stuff a little 2024-08-24 14:15:37 -07:00
Jonathan Bennett 78399503c5 Adds handlers to get and set admin session_key for remote admin 2024-08-24 15:32:44 -05:00
Ian McEwen 58466f2ab7 Add wiring for security config in node.py 2024-08-21 22:11:45 -07:00
Ian McEwen 15b03b704c Correctly detect LocalConfig vs. LocalModuleConfig, again. fixes #630 2024-07-03 20:35:58 -07:00
Kevin Hester 88b73611f0 Move protobufs to meshtastic.protobuf python namespace 2024-06-26 10:05:59 -07:00
Ian McEwen 5441266565 Wait for response with --device-metadata. Fixes #527 2024-06-08 07:26:20 -07:00
Ian McEwen 1746ad15d7 Use new fixed position admin messages and add --remove-position argument. Fixes #525 2024-05-31 18:44:33 -07:00
Ian McEwen 9fc86f9450 Merge pull request #558 from geeksville/pr-fixjson
Pretty indent --info JSON output (see below for details)
2024-04-28 21:40:43 -07:00
geeksville 3886bc16d7 Update python client to use the 'modern' meshtastic protocol init flow
Some time ago I updated the protocol so that after sending NODEINFOs to
client devices (via fromRadio protobufs), it would proactively send the
channel definitions.  Prior to this the client had to ask for each channel
by sending an admin request.  This handshaking was really slow for mobile/
bluetooth clients.  So in the current device code (last couple of years)
the device automatically sends this info to the client during initial config
download.

Unfortunately I never updated the python client to expect this.  I assumed
(incorrectly) that it would just cope and keep sending the channel requests
the old way it always had (which is still supported by devices - and
required for remote administration of nodes).

This change removes sending channel requests (for the local node only)
from the python startup code.  It also now understands (no longer ignoring)
the channels which were sent proactively by the local device.

This makes connection/config/api operations from the python client 100%
reliable again.  Previously it would only work sometimes depending on how
quickly it was able to get the local node db downloaded.

Also this flow is much faster - which should help all users of the python
api.
2024-04-27 11:59:17 -07:00
geeksville 7fe98bc266 Pretty indent --info JSON output (see below for details)
Changes to make --info much more human readable (while still keeping
machine readabilty for anyone foolish enough to be parsing the existing
output as text)

* change message_to_json to optionally not strip the multiline JSON
* use multiline=True for the two places we are printing to the console
* make the node list JSON indented
2024-04-26 15:15:57 -07:00
Ian McEwen 6812f508bc Add --enter-dfu for entering DFU mode on NRF52 devices via admin message 2024-04-25 11:21:27 -07:00
Ian McEwen 243b310eb2 Allow generating QR codes for remote nodes and for all channels 2024-04-21 09:41:07 -07:00
Ian McEwen 6e7933a3ce Fix my own pylint mistakes 2024-04-11 18:40:10 -07:00
Ian McEwen f449ff9506 Add a variety of type annotations, primarily in mesh_interface 2024-04-11 18:28:01 -07:00
Ian McEwen 439b1ade2e Add --remove-node (fixes #514) 2024-04-08 14:58:15 -07:00
Ian McEwen b57d1d81ff Fix up pylint from merged PR 2024-04-02 15:15:22 -07:00
Ian McEwen 4c97866875 Merge pull request #511 from flavoromission/506-show-all-module-settings
feat:506 show all module settings
2024-04-02 13:11:35 -07:00
Ian McEwen 59091664db Check against proper full name for moved protobufs 2024-03-29 18:38:26 -07:00
Ian McEwen b8640666d7 Fix some outstanding pylint issues (or disable the checks) 2024-03-19 12:47:08 -07:00
flavor omission 27be73c707 feat:506 show all module settings
Problem:
Missing fields are omitted.

Solution:
This fix sets the flag `always_print_fields_with_no_presence`
in the invocation of the protobuff method
`MessageToJson` will display the missing fields.

see: MessageToJson https://github.com/protocolbuffers/protobuf/blob/6b36eb633ccc9c585ed1ead117fca91702814027/python/google/protobuf/json_format.py#L82
see: issue #506 https://github.com/meshtastic/python/issues/506
2024-03-18 00:01:47 -04:00
Ben Meadors 67636c4ce2 Revert "Move pb2 Files to Own Folder" 2024-03-11 12:18:25 -05:00
foglet15 df8ea85873 change to PbDefinitions for clearer naming 2024-02-25 14:22:15 -05:00
foglet15 9a4feecea8 move pb2 to own folder, regen script writes to new folder, update imports 2024-02-25 13:11:36 -05:00
Jonathan Bennett a067c9295e Fixup handling for radio configs with disabled channel 2024-02-22 00:44:25 -06:00
Thomas Herrmann 22f2168bfd add paxcounter moduleConfig
(fixes Bug #485 "No valid config with name paxcounter" for me)
2024-02-10 14:06:02 +01:00
Timothy Harder 52f8e82ea1 _getAdminChannelIndex can get the index of the admin channel regardless of case. 2024-01-07 14:02:44 -06:00
GUVWAF e25b183c23 Add getter/setter for AmbientLighting Module 2023-11-02 20:35:57 +01:00
Ben Meadors 52cc825b3e Update protobufs 2023-08-21 14:56:26 -05:00
Ben Meadors e76c9852d6 2.2 changes and added device_metadata 2023-08-08 16:40:15 -05:00
luzpaz 0a88ca6a5c Fix various source comment typos
Found via `codespell -q 3`
2023-07-15 01:04:47 +00:00
Ben Meadors 9dda5d6d2d Merge pull request #449 from pdxlocations/no-psk
Show Channels with No PSK on --info
2023-06-25 14:48:04 -05:00
GUVWAF 959c597e33 Setter for NeighborInfo 2023-06-25 15:50:59 +02:00
pdxlocations 4b0ca13ad1 list channels with no psk 2023-06-15 21:29:46 -07:00
Thomas Göttgens 97aa8a8d74 fixing a few linter errors. 2023-03-31 20:09:59 +02:00
Thomas Göttgens 7e6f13f0a2 establish trunk format 2023-03-31 20:09:59 +02:00
Manuel Verch 193c3faca5 Fix remote_hardware configuration 2023-03-26 16:25:59 +02:00
GUVWAF 55f6494681 Wait for ACK after setting remote config 2023-03-19 14:42:12 +01:00
GUVWAF b2cfebc5a7 '--set' works as well, also chained commands 2023-03-18 21:12:05 +01:00
GUVWAF 802768e0cc Nicer printing 2023-03-18 16:40:27 +01:00
GUVWAF f68e4112e1 Remote get method works 2023-03-18 15:20:00 +01:00
Thomas Göttgens 7b8a83ade7 get and set RTTTL ringtone 2023-01-04 19:52:24 +01:00
Ben Meadors 254e9f4015 Typos 2022-12-22 14:35:48 -06:00
GUVWAF c1054caf4a Only set wantResponse for admin packets 2022-11-27 12:44:58 +01:00