Provisioning CLI

Introduction

Provisioning has 2 purposes:

  • Connect the hub device to the user's WiFi network
  • Associate the hub with the user

The provisioning CLI uses the droplit-edge command line interface. This requires the Node.js runtime to be installed on your PC. In production, this would be done with the user-facing app which will take advantage of the Edge Provisioning API.

To install Node.js, see:
Windows
Mac OS
Linux

Next, install the droplit edge CLI by running:
npm install -g droplit-edge-cli

📘

Provisiong services in the edge is only supported on OpenWRT

Please contact Droplit support to get access to the provisioning services.

Lets get started!

Connect to your Droplit Edge hub

WiFi: droplit_hub_XXXXXX where XXXXXX is the last 6 digits of the hub's WiFi MAC address.

Droplit Edge Hub Info

Get the EdgeId from your hub

This will output the edgeId so that he hub device can be claimed by the user later. If your hub hasn't yet been claimed, copy this information down.

Run: droplit-edge provision info

> droplit-edge provision info

      _| _ _  _ |.|_   . _
     (_|| (_)|_)|||_.o |(_)
             |

    droplit provision info

    EdgeId: myEdgeId

Optional:

  • address - Use the given address instead
  • port - Use the given port instead
> droplit-edge provision info --address http://192.168.5.1:8080/

      _| _ _  _ |.|_   . _
     (_|| (_)|_)|||_.o |(_)
             |

    droplit provision info

    EdgeId: myEdgeId
> droplit-edge provision info --port 82

      _| _ _  _ |.|_   . _
     (_|| (_)|_)|||_.o |(_)
             |

    droplit provision info

    EdgeId: myEdgeId

Droplit Edge Hub List

Get the list of WiFi networks from your hub

Network Details

  • ssid - service set identifier for wireless network
  • uci - encryption parameter that should be used as the value for AUTH_SUITE
  • encryption - User readable description of the encryption type
  • mode - connection type for access point
  • channel - channel the network is using
  • signal - signal strength in dB
  • quality - quality of the connection to the network

Run: droplit-edge provision list

> droplit-edge provision list

      _| _ _  _ |.|_   . _
     (_|| (_)|_)|||_.o |(_)
             |

    droplit provision list

   ssid                        uci                  encryption                       mode    channel  signal  quality
-  --------------------------  -------------------  -------------------------------  ------  -------  ------  -------
   My Fast Wifi                psk-mixed+tkip+ccmp  mixed WPA/WPA2 PSK (TKIP, CCMP)  Master  1        -79     31/70
   My Guest Wifi               none                 none                             Master  1        -79     31/70

Optional:

  • address - Use the given address instead
  • port - Use the given port instead
> droplit-edge provision list --address http://192.168.5.1:8080/

      _| _ _  _ |.|_   . _
     (_|| (_)|_)|||_.o |(_)
             |

    droplit provision list

   ssid                        uci                  encryption                       mode    channel  signal  quality
-  --------------------------  -------------------  -------------------------------  ------  -------  ------  -------
   My Fast Wifi                psk-mixed+tkip+ccmp  mixed WPA/WPA2 PSK (TKIP, CCMP)  Master  1        -79     31/70
   My Guest Wifi               none                 none                             Master  1        -79     31/70
> droplit-edge provision list --port 82

      _| _ _  _ |.|_   . _
     (_|| (_)|_)|||_.o |(_)
             |

    droplit provision list

   ssid                        uci                  encryption                       mode    channel  signal  quality
-  --------------------------  -------------------  -------------------------------  ------  -------  ------  -------
   My Fast Wifi                psk-mixed+tkip+ccmp  mixed WPA/WPA2 PSK (TKIP, CCMP)  Master  1        -79     31/70
   My Guest Wifi               none                 none                             Master  1        -79     31/70

Droplit Edge Hub Wifi

Set the WiFi access point for your hub to connect to

You can specify the authentication mode of the AP with the auth_suite parameter, but it is not required. The hub will attempt to auto-detect it when not specified.

Auth Suites

Connect to a specific network with a specified Auth Suite encryption and password. Supported Auth Suites include:

  • wep+open
  • wep+shared
  • wep+mixed
  • psk2+tkip+ccmp
  • psk2+tkip+aes
  • psk2+tkip
  • psk2+ccmp
  • psk2+aes
  • psk2
  • psk+tkip+ccmp
  • psk+tkip+aes
  • psk+tkip
  • psk+ccmp
  • psk+aes
  • psk
  • psk-mixed+tkip+ccmp
  • psk-mixed+tkip+aes
  • psk-mixed+tkip
  • psk-mixed+ccmp
  • psk-mixed+aes
  • psk-mixed

For more information see: https://wiki.openwrt.org/doc/uci/wireless#wpa_modes

Run: droplit-edge provision wifi <SSID> [password] [auth_suite]

> droplit-edge provision wifi "My Fast Wifi" mysecurepassword200 psk-mixed

      _| _ _  _ |.|_   . _
     (_|| (_)|_)|||_.o |(_)
             |

    droplit provision wifi

Optional:

  • address - Use the given address instead
  • port - Use the given port instead
> droplit-edge provision wifi "My Fast Wifi" mysecurepassword200 psk-mixed --address http://192.168.5.1:8080/

      _| _ _  _ |.|_   . _
     (_|| (_)|_)|||_.o |(_)
             |

    droplit provision wifi
> droplit-edge provision wifi "My Fast Wifi" mysecurepassword200 psk-mixed+tkip+ccmp --port 82

      _| _ _  _ |.|_   . _
     (_|| (_)|_)|||_.o |(_)
             |

    droplit provision wifi