Skip to content

Add device create command #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jul 21, 2021
Merged

Add device create command #11

merged 6 commits into from
Jul 21, 2021

Conversation

polldo
Copy link
Contributor

@polldo polldo commented Jul 21, 2021

This PR introduces a command to provision an arduino device. It must be executed on a computer with the 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>

polldo added 6 commits July 21, 2021 19:30
Fix log format

Fix - add delay

Fix - use same flag as arduinocli
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
@polldo polldo merged commit 7b83b62 into main Jul 21, 2021
@polldo polldo deleted the polldo/device-create-command branch July 21, 2021 18:07
polldo pushed a commit that referenced this pull request Sep 2, 2022
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
polldo pushed a commit that referenced this pull request Sep 2, 2022
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant