Blame
|
1 | # meshcore-cli |
||||||
| 2 | ||||||||
|
3 | * https://github.com/meshcore-dev/meshcore-cli |
||||||
| 4 | * https://github.com/mukw-labs/meshcore-trace |
|||||||
|
5 | * [[Meshcore/Linux]] |
||||||
|
6 | |||||||
|
7 | ## Run a trace |
||||||
| 8 | ||||||||
| 9 | ``` |
|||||||
| 10 | meshcli -j -s /dev/ttyUSB0 trace e2,4a,e2 |
|||||||
| 11 | meshcli -j -s /dev/ttyUSB0 trace e260,4aaa,e260 |
|||||||
| 12 | ``` |
|||||||
| 13 | ||||||||
| 14 | Example: |
|||||||
|
15 | |||||||
| 16 | ```json |
|||||||
| 17 | { |
|||||||
| 18 | "tag": 3457783684, |
|||||||
| 19 | "auth": 0, |
|||||||
| 20 | "flags": 0, |
|||||||
| 21 | "path_len": 3, |
|||||||
| 22 | "path": [ |
|||||||
| 23 | { |
|||||||
| 24 | "hash": "e2", |
|||||||
| 25 | "snr": 6.0 |
|||||||
| 26 | }, |
|||||||
| 27 | { |
|||||||
| 28 | "hash": "4a", |
|||||||
| 29 | "snr": -1.5 |
|||||||
| 30 | }, |
|||||||
| 31 | { |
|||||||
| 32 | "hash": "e2", |
|||||||
| 33 | "snr": 4.0 |
|||||||
| 34 | }, |
|||||||
| 35 | { |
|||||||
| 36 | "snr": 5.75 |
|||||||
| 37 | } |
|||||||
| 38 | ] |
|||||||
| 39 | } |
|||||||
|
40 | ``` |
||||||
|
41 | |||||||
| 42 | ||||||||
| 43 | ```json |
|||||||
| 44 | { |
|||||||
| 45 | "tag": 4020427322, |
|||||||
| 46 | "auth": 0, |
|||||||
| 47 | "flags": 1, |
|||||||
| 48 | "path_len": 3, |
|||||||
| 49 | "path": [ |
|||||||
| 50 | { |
|||||||
| 51 | "hash": "e260", |
|||||||
| 52 | "snr": 6.75 |
|||||||
| 53 | }, |
|||||||
| 54 | { |
|||||||
| 55 | "hash": "4aaa", |
|||||||
| 56 | "snr": -3.75 |
|||||||
| 57 | }, |
|||||||
| 58 | { |
|||||||
| 59 | "hash": "e260", |
|||||||
| 60 | "snr": 2.75 |
|||||||
| 61 | }, |
|||||||
| 62 | { |
|||||||
| 63 | "snr": 5.75 |
|||||||
| 64 | } |
|||||||
| 65 | ] |
|||||||
| 66 | } |
|||||||
| 67 | ``` |
|||||||
|
68 | |||||||
| 69 | ## node_discover |
|||||||
| 70 | ||||||||
|
71 | This command can be used to discover nearby nodes. |
||||||
| 72 | ||||||||
|
73 | ```bash |
||||||
| 74 | $ meshcli -j -s /dev/ttyUSB0 nd | jq |
|||||||
|
75 | ``` |
||||||
|
76 | |||||||
| 77 | ```json |
|||||||
|
78 | [ |
||||||
| 79 | { |
|||||||
| 80 | "SNR": 10.5, |
|||||||
| 81 | "RSSI": -88, |
|||||||
| 82 | "path_len": 0, |
|||||||
| 83 | "node_type": 2, |
|||||||
| 84 | "SNR_in": 11.0, |
|||||||
| 85 | "tag": "a4b73a58", |
|||||||
| 86 | "pubkey": "e2601d59151789bd" |
|||||||
| 87 | }, |
|||||||
| 88 | { |
|||||||
| 89 | "SNR": 10.75, |
|||||||
| 90 | "RSSI": -42, |
|||||||
| 91 | "path_len": 0, |
|||||||
| 92 | "node_type": 2, |
|||||||
| 93 | "SNR_in": 10.25, |
|||||||
| 94 | "tag": "a4b73a58", |
|||||||
| 95 | "pubkey": "2fd9c7bbc93def5f" |
|||||||
| 96 | }, |
|||||||
| 97 | { |
|||||||
| 98 | "SNR": 11.0, |
|||||||
| 99 | "RSSI": -81, |
|||||||
| 100 | "path_len": 0, |
|||||||
| 101 | "node_type": 2, |
|||||||
| 102 | "SNR_in": 12.0, |
|||||||
| 103 | "tag": "a4b73a58", |
|||||||
| 104 | "pubkey": "75ab85174506c320" |
|||||||
| 105 | } |
|||||||
| 106 | ] |
|||||||
| 107 | ``` |
|||||||
|
108 | |||||||
| 109 | ## Node Info |
|||||||
| 110 | ||||||||
| 111 | ||||||||
| 112 | ``` |
|||||||
| 113 | /usr/local/bin/meshcore-cli -j -s /dev/meshcore0 req_status "🦷 Quakers Hill Wold" |
|||||||
| 114 | ``` |
|||||||
|
115 | |||||||
| 116 | If it's connected via USB, you can use the `-r` flag. |
|||||||
| 117 | ||||||||
| 118 | You can pass through repeater commands like this: |
|||||||
| 119 | ||||||||
| 120 | ``` |
|||||||
| 121 | meshcli -s /dev/ttyACM0 login "NODE NAME" PASSWD |
|||||||
| 122 | meshcli -s /dev/ttyACM0 cmd "NODE NAME" "set owner.info NAME" |
|||||||
| 123 | ``` |
|||||||