9
prplmesh cli
Dmytro Puz edited this page 2024-03-07 08:17:01 +00:00

prplmesh_cli it is NBAPI analog of beerocks_cli. All information is taken from prplmesh data model.

Usage:

prplmesh_cli OPTION
prplmesh_cli -c <command> [command_arguments]

Options:

-v : Prints the current prplMesh version.
-h : Prints the help text.
Commands:
help : Get supported commands.
version : Get the current prplMesh version.
mode : Get the current prplMesh mode (Agent only/Controller only/Agent+Controller).
status : Print an overview of the current prplMesh status.
-o <output format> : Either "pretty" (default if stdout is a TTY) or "json" (otherwise).
show_ap : Show Access Points.
set_ssid : Set SSID.
-o .<ap_object_number>|<ap_ssid> : Use ".." if <ap_ssid> starts with ".".
-n <new_ssid_name> : Specify the new SSID name.
set_security : Set security.
-o .<ap_object_number>|<ap_ssid> : Same as for set_ssid.
-m None|WPA2-Personal : Specify the security mode (None or WPA2-Personal).
-p <passphrase> : For the WPA2-Personal mode.
conn_map : Dump the latest network map.

Examples:

Print prplMesh version:

prplmesh_cli -v

Get supported commands:

prplmesh_cli -c help

Set SSID:

prplmesh_cli -c set_ssid -o .<ap_object_number>|<ap_ssid> -n <new_ssid_name>

Set security:

prplmesh_cli -c set_security -o .<ap_object_number>|<ap_ssid> -m None|WPA2-Personal -p <passphrase>

Notes: Replace <ap_object_number> with the appropriate object number. Replace <ap_ssid> with the SSID of the Access Point.

conn_map function

Connection map (conn_map) function is currently implemented. Usage: prplmesh_cli -c conn_map

root@prplOS:/opt/prplmesh/bin# ./prplmesh_cli -c
./prplmesh_cli: option requires an argument: c
Usage: prplmesh_cli -c <command>
Next commands are available :
help                    : get supported commands
conn_map                : dump the latest network map

root@prplOS:/opt/prplmesh/bin# ./prplmesh_cli -c conn_map
Start conn map
Found 2 devices
Device[1]: name: GW_MASTER, mac: 04:f0:21:45:dc:15, ipv4: 192.168.1.1
        RADIO[1]: mac: 04:f0:21:90:d7:2f, ch: 11, freq: 2.407GHz
                VAP[0]: bssid: 04:f0:21:90:d7:2f, ssid: OpenWrt
        Device[2]: name: Agent, mac: d8:58:d7:01:41:8f LinkType: Ethernet
                RADIO[1]: mac: 04:f0:21:45:d6:a6, ch: 42, freq: 5GHz
                        VAP[0]: bssid: 04:f0:21:45:d6:a6, ssid: MyTestV_55
                RADIO[2]: mac: 04:f0:21:45:bc:23, ch: 11, freq: 2.407GHz
                        VAP[0]: bssid: 04:f0:21:45:bc:23, ssid: MyTestV_55

conn_map function shows the hierarchical architecture of the mesh network. In this example, device[2] (agent) is connected to device[1] (controller).

conn_map it is bml_conn_map analog. The difference can be seen in the following picture prplcli_vs_beerockscli

Displaying 3 devices in a mesh network looks like this prplmesh_cli_3_devices