mirror of
https://github.com/meshcore-dev/meshcore-cli.git
synced 2026-04-20 22:13:48 +00:00
update to path command and doc
This commit is contained in:
parent
d28cac5e25
commit
d67aaece28
2 changed files with 27 additions and 16 deletions
28
README.md
28
README.md
|
|
@ -36,16 +36,18 @@ Arguments mostly deals with ble connection
|
|||
|
||||
<pre>
|
||||
-h : prints this help
|
||||
-j : json output
|
||||
-D : print debug messages
|
||||
-S : BLE device selector
|
||||
-l : lists BLE devices
|
||||
-a <address> : specifies device address (can be a name)
|
||||
-d <name> : filter meshcore devices with name or address
|
||||
-t <hostname> : connects via tcp/ip
|
||||
-p <port> : specifies tcp port (default 5000)
|
||||
-s <port> : use serial port <port>
|
||||
-b <baudrate> : specify baudrate
|
||||
-v : prints version
|
||||
-j : json output (disables init file)
|
||||
-D : debug
|
||||
-S : performs a ble scan and ask for device
|
||||
-l : list available ble devices and exit
|
||||
-T <timeout> : timeout for the ble scan (-S and -l) default 2s
|
||||
-a <address> : specifies device address (can be a name)
|
||||
-d <name> : filter meshcore devices with name or address
|
||||
-t <hostname> : connects via tcp/ip
|
||||
-p <port> : specifies tcp port (default 5000)
|
||||
-s <port> : use serial port <port>
|
||||
-b <baudrate> : specify baudrate
|
||||
</pre>
|
||||
|
||||
### Available Commands
|
||||
|
|
@ -58,6 +60,7 @@ Commands are given after arguments, they can be chained and some have shortcuts.
|
|||
chat_to <ct> : enter chat with contact to
|
||||
script <filename> : execute commands in filename
|
||||
infos : print informations about the node i
|
||||
self_telemetry : print own telemtry t
|
||||
card : export this node URI e
|
||||
ver : firmware version v
|
||||
reboot : reboots node
|
||||
|
|
@ -72,6 +75,8 @@ Commands are given after arguments, they can be chained and some have shortcuts.
|
|||
wait_msg : wait for a message and read it wm
|
||||
sync_msgs : gets all unread msgs from the node sm
|
||||
msgs_subscribe : display msgs as they arrive ms
|
||||
get_channel <n> : get info for channel n
|
||||
set_channel n nm k : set channel info (nb, name, key)
|
||||
Management
|
||||
advert : sends advert a
|
||||
floodadv : flood advert
|
||||
|
|
@ -80,13 +85,14 @@ Commands are given after arguments, they can be chained and some have shortcuts.
|
|||
time <epoch> : sets time to given epoch
|
||||
clock : get current time
|
||||
clock sync : sync device clock st
|
||||
cli : send a cmd to node's cli (if avail) @
|
||||
Contacts
|
||||
contacts / list : gets contact list lc
|
||||
contact_info <ct> : prints information for contact ct ci
|
||||
share_contact <ct> : share a contact with others sc
|
||||
export_contact <ct> : get a contact's URI ec
|
||||
import_contact <URI> : import a contactt from its URI ic
|
||||
remove_contact <ct> : removes a contact from this node
|
||||
path <ct> : diplays path for a contact
|
||||
reset_path <ct> : resets path to a contact to flood rp
|
||||
change_path <ct> <pth> : change the path to a contact cp
|
||||
change_flags <ct> <f> : change contact flags (tel_l|tel_a|star)cf
|
||||
|
|
|
|||
|
|
@ -1228,15 +1228,19 @@ async def next_cmd(mc, cmds, json_output=False):
|
|||
else:
|
||||
print(f"Unknown contact {cmds[1]}")
|
||||
else:
|
||||
res = contact["out_path"]
|
||||
path = contact["out_path"]
|
||||
path_len = contact["out_path_len"]
|
||||
if json_output :
|
||||
print(json.dumps({"adv_name" : contact["adv_name"],
|
||||
"out_path" : res}))
|
||||
"out_path_len" : path_len,
|
||||
"out_path" : path}))
|
||||
else:
|
||||
if (res == "") :
|
||||
if (path_len == 0) :
|
||||
print("0 hop")
|
||||
elif (path_len == -1) :
|
||||
print("Path not set")
|
||||
else:
|
||||
print(res)
|
||||
print(path)
|
||||
|
||||
case "contact_info" | "ci":
|
||||
argnum = 1
|
||||
|
|
@ -1617,13 +1621,14 @@ def command_help():
|
|||
time <epoch> : sets time to given epoch
|
||||
clock : get current time
|
||||
clock sync : sync device clock st
|
||||
cli : send a cmd to node's cli (if avail) @
|
||||
Contacts
|
||||
contacts / list : gets contact list lc
|
||||
contact_info <ct> : prints information for contact ct ci
|
||||
share_contact <ct> : share a contact with others sc
|
||||
export_contact <ct> : get a contact's URI ec
|
||||
import_contact <URI> : import a contactt from its URI ic
|
||||
remove_contact <ct> : removes a contact from this node
|
||||
path <ct> : diplays path for a contact
|
||||
reset_path <ct> : resets path to a contact to flood rp
|
||||
change_path <ct> <pth> : change the path to a contact cp
|
||||
change_flags <ct> <f> : change contact flags (tel_l|tel_a|star)cf
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue