{"_id":"59e56a4407a1a3001adae24d","project":"568bdc1483d2061900d86cdc","version":{"_id":"59a72290d61777001b6c42c3","project":"568bdc1483d2061900d86cdc","__v":21,"createdAt":"2017-08-30T20:39:44.453Z","releaseDate":"2017-08-30T20:39:44.453Z","categories":["59a7236e3fe4d90025117c10","59a72eb6cb0db3001b84cfe2","59a734eb757d030019b85af8","59c0243b1b2d07001a9d2b76","59c035e42126e10028effb12","59c06c40df5b3c0010584a13","59c1a5852cabe5002641a3e7","59c2fb00b2b45c0010b7a3d7","59c32ceb9aea850010ac4130","59c32e6e190c90003cb0d12f","59c33affb2b45c0010b7aa23","59c7dfa457bd8200105444dc","59c7e975c50cf30010d712a0","59cffdef0cd4dd0010294d54","59d0622ca91a810032c8f60c","59d06733c1aec60026253065","59d174d44ac471001a07b123","59d5a5e323e6e800103defb2","59ecf1d8ed507c001c52b255","59f76fef8581dc0010593e6f","5a0c003680a35b0012c35db0"],"is_deprecated":false,"is_hidden":false,"is_beta":true,"is_stable":true,"codename":"","version_clean":"0.0.0","version":"0"},"category":{"_id":"59d0622ca91a810032c8f60c","project":"568bdc1483d2061900d86cdc","version":"59a72290d61777001b6c42c3","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2017-10-01T03:34:04.474Z","from_sync":false,"order":4,"slug":"edge-server-plugins","title":"Edge Server"},"user":"568bdbc4fe6fcc0d006dc970","__v":0,"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-10-17T02:26:12.130Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":8,"body":"# Introduction\nProvisioning has 2 purposes:\n- Connect the hub device to the user's WiFi network\n- Associate the hub with the user\n\nThe 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](edge-provisioning-api).\n\nTo install Node.js, see:\n[Windows](docs/nodejs-setup-windows)\n[Mac OS](docs/nodejs-setup-mac-os)\n[Linux](docs/nodejs-setup-linux-embedded) \n\nNext, install the droplit edge CLI by running:\n`npm install -g droplit-edge-cli`\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Provisiong services in the edge is only supported on OpenWRT\",\n  \"body\": \"Please contact Droplit support to get access to the provisioning services.\"\n}\n[/block]\n## Lets get started!\nConnect to your Droplit Edge hub\n\nWiFi: `droplit_hub_XXXXXX` where `XXXXXX` is the last 6 digits of the hub's WiFi MAC address.\n\n## Droplit Edge Hub Info\n\nGet the EdgeId from your hub\n\nThis 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.\n\nRun: `droplit-edge provision info`\n```\n> droplit-edge provision info\n\n      _| _ _  _ |.|_   . _\n     (_|| (_)|_)|||_.o |(_)\n             |\n\n    droplit provision info\n\n    EdgeId: myEdgeId\n```\nOptional:\n\n* address - Use the given address instead\n* port - Use the given port instead\n\n```\n> droplit-edge provision info --address http://192.168.5.1:8080/\n\n      _| _ _  _ |.|_   . _\n     (_|| (_)|_)|||_.o |(_)\n             |\n\n    droplit provision info\n\n    EdgeId: myEdgeId\n```\n```\n> droplit-edge provision info --port 82\n\n      _| _ _  _ |.|_   . _\n     (_|| (_)|_)|||_.o |(_)\n             |\n\n    droplit provision info\n\n    EdgeId: myEdgeId\n```\n\n## Droplit Edge Hub List\nGet the list of WiFi networks from your hub\n\n### Network Details\n* `ssid` - service set identifier for wireless network\n* `uci` - encryption parameter that should be used as the value for `AUTH_SUITE`\n* `encryption` - User readable description of the encryption type\n* `mode` - connection type for access point \n* `channel` - channel the network is using\n* `signal` - signal strength in dB\n* `quality` - quality of the connection to the network\n\nRun: `droplit-edge provision list`\n```\n> droplit-edge provision list\n\n      _| _ _  _ |.|_   . _\n     (_|| (_)|_)|||_.o |(_)\n             |\n\n    droplit provision list\n\n   ssid                        uci                  encryption                       mode    channel  signal  quality\n-  --------------------------  -------------------  -------------------------------  ------  -------  ------  -------\n   My Fast Wifi                psk-mixed+tkip+ccmp  mixed WPA/WPA2 PSK (TKIP, CCMP)  Master  1        -79     31/70\n   My Guest Wifi               none                 none                             Master  1        -79     31/70\n```\nOptional:\n\n* address - Use the given address instead\n* port - Use the given port instead\n\n```\n> droplit-edge provision list --address http://192.168.5.1:8080/\n\n      _| _ _  _ |.|_   . _\n     (_|| (_)|_)|||_.o |(_)\n             |\n\n    droplit provision list\n\n   ssid                        uci                  encryption                       mode    channel  signal  quality\n-  --------------------------  -------------------  -------------------------------  ------  -------  ------  -------\n   My Fast Wifi                psk-mixed+tkip+ccmp  mixed WPA/WPA2 PSK (TKIP, CCMP)  Master  1        -79     31/70\n   My Guest Wifi               none                 none                             Master  1        -79     31/70\n```\n```\n> droplit-edge provision list --port 82\n\n      _| _ _  _ |.|_   . _\n     (_|| (_)|_)|||_.o |(_)\n             |\n\n    droplit provision list\n\n   ssid                        uci                  encryption                       mode    channel  signal  quality\n-  --------------------------  -------------------  -------------------------------  ------  -------  ------  -------\n   My Fast Wifi                psk-mixed+tkip+ccmp  mixed WPA/WPA2 PSK (TKIP, CCMP)  Master  1        -79     31/70\n   My Guest Wifi               none                 none                             Master  1        -79     31/70\n```\n\n## Droplit Edge Hub Wifi\nSet the WiFi access point for your hub to connect to\n\nYou 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.\n\n### Auth Suites\nConnect to a specific network with a specified Auth Suite encryption and password. Supported Auth Suites include:\n* `wep+open`\n* `wep+shared`\n* `wep+mixed`\n* `psk2+tkip+ccmp`\n* `psk2+tkip+aes`\n* `psk2+tkip`\n* `psk2+ccmp`\n* `psk2+aes`\n* `psk2`\n* `psk+tkip+ccmp`\n* `psk+tkip+aes`\n* `psk+tkip`\n* `psk+ccmp`\n* `psk+aes`\n* `psk`\n* `psk-mixed+tkip+ccmp`\n* `psk-mixed+tkip+aes`\n* `psk-mixed+tkip`\n* `psk-mixed+ccmp`\n* `psk-mixed+aes`\n* `psk-mixed`\n\nFor more information see: https://wiki.openwrt.org/doc/uci/wireless#wpa_modes\n\nRun: `droplit-edge provision wifi <SSID> [password] [auth_suite]` \n```\n> droplit-edge provision wifi \"My Fast Wifi\" mysecurepassword200 psk-mixed\n\n      _| _ _  _ |.|_   . _\n     (_|| (_)|_)|||_.o |(_)\n             |\n\n    droplit provision wifi\n```\nOptional:\n\n* address - Use the given address instead\n* port - Use the given port instead\n\n```\n> droplit-edge provision wifi \"My Fast Wifi\" mysecurepassword200 psk-mixed --address http://192.168.5.1:8080/\n\n      _| _ _  _ |.|_   . _\n     (_|| (_)|_)|||_.o |(_)\n             |\n\n    droplit provision wifi\n```\n```\n> droplit-edge provision wifi \"My Fast Wifi\" mysecurepassword200 psk-mixed+tkip+ccmp --port 82\n\n      _| _ _  _ |.|_   . _\n     (_|| (_)|_)|||_.o |(_)\n             |\n\n    droplit provision wifi\n```","excerpt":"","slug":"cli-edge-provisioning","type":"basic","title":"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](edge-provisioning-api). To install Node.js, see: [Windows](docs/nodejs-setup-windows) [Mac OS](docs/nodejs-setup-mac-os) [Linux](docs/nodejs-setup-linux-embedded) Next, install the droplit edge CLI by running: `npm install -g droplit-edge-cli` [block:callout] { "type": "info", "title": "Provisiong services in the edge is only supported on OpenWRT", "body": "Please contact Droplit support to get access to the provisioning services." } [/block] ## 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 ```