You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR introduces a command to provision arduino devices. It must be executed on a computer with an arduino device connected via USB.
This command does everything needed to provision a device, including creating the device in Cloud, but also running the initial provisioning sketch that generates proper certificates to store in secure element.
When using this command, you can optionally explicit the port which the device is connected to and its fqbn. If they are not given, then the first device found is provisioned.
Usage:
$ iot-cloud-cli device create --name <deviceName> --port <port> --fqbn <deviceFqbn>
* Add local provisioning binaries
* Add device command
* Implement provisioning
Fix log format
Fix - add delay
Fix - use same flag as arduinocli
* Hack - don't check errstream from cli
Problem: Uploading the provisioning bin to a portenta
Description: even if the upload gets completed, the errstream from the rpc client of arduino-cli is not empty. It contains this: %!w(<nil>)
Temporary solution (hacky): don't check the errstream
* Split device create into cli and command
Fix
* Update readme
Copy file name to clipboardExpand all lines: README.md
+40-14Lines changed: 40 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,38 @@
1
1
# iot-cloud-cli
2
2
3
-
The iot-cloud-cli is a virtual device for Arduino IoT Cloud for testing.
3
+
iot-cloud-cli is a command line interface that allows to exploit the features of Arduino IoT Cloud. As of now, it is possible to provision a device and to simulate a device to be connected to the cloud using MQTT for thoubleshooting purpose.
4
+
5
+
### Requirements
6
+
7
+
This is all you need to use iot-cloud-cli for device **provisioning**:
8
+
* A client ID and a secret ID, retrievable from the [cloud](https://create.arduino.cc/iot/integrations) by creating a new API key
9
+
* arduino-cli in daemon mode, use the command 'arduino-cli daemon'
10
+
11
+
This is all you need to use iot-cloud-cli as a **virtual device**:
12
+
* A "Generic ESP8266 Module" or "Generic ESP32 Module" device in IoT Cloud (requires a Maker plan)
13
+
* A thing with a `counter` property connected to the "Generic ESP8266/ESP32 Module" device
14
+
15
+
16
+
## Set a configuration
17
+
18
+
iot-cloud-cli should be configured before being used. In particular a client ID and the corresponding secret ID should be set.
19
+
You can retrieve them from the [cloud](https://create.arduino.cc/iot/integrations) by creating a new API key.
20
+
21
+
Once you have the IDs, call this command with your parameters:
When provisioning a device, you can optionally explicit the port which the device is connected to and its fqbn. If they are not given, then the first device found is provisioned.
0 commit comments