The command line interface utility for Particle devices
2.7K
Create a working folder on the host machine.
mkdir -p ~/.particle/cli
~/.particle/ is the common working folder required by the command line interface and workbench. It is used to store your configuration and profile data, as well as any and all toolchains required by the Particle Workbench extension for VSCode.
In order to share files with the container, a new cli folder is added to ~/.particle/. This folder will be later mounted into the container as a working directory. The mounted folder allows you to both share files with and receive generated or downloaded files from the container.
docker run --interactive --privileged --rm --tty --volume ~/.particle:/root/.particle --volume ~/.particle/cli:/particle-iot/workdir zfields/particle-cli --version
PROTIP: Add an alias to your host machine to get a native experience!
$ echo "alias particle=\"docker run --interactive --privileged --rm --tty --volume ~/.particle:/root/.particle --volume ~/.particle/cli:/particle-iot/workdir zfields/particle-cli\"" >> ~/.bash_aliases
$ . ~/.bash_aliases
$ particle --version
1.45.0
Q: Why can't the CLI find any of my files?
A: Due to the fact the CLI is running in a container, files can only be shared to the CLI via the mounted working folder.
To get the best experience, navigate to the folder you are sharing with the container.
cd ~/.particle/cliNow, all paths the CLI has access to will be tab completable.
Q: Why does particle serial wifi respond with "Error configuring Wi-Fi: Unable to scan for Wi-Fi networks. Do you have permission to do that on this system?"
A: The container does NOT have access to the host machines Wi-Fi controller.
Do the following to work around this limitation:
Ensure the device is in listening mode (blinking blue)
Use
nmcli dev wifito list the currently available Wi-Fi networks.$ nmcli dev wifi IN-USE SSID MODE CHAN RATE SIGNAL BARS SECURITY * Fields Infra 6 130 Mbit/s 65 ▂▄▆_ WPA1 WPA2Retry
particle serial wifi.Respond to "? Should I scan for nearby Wi-Fi networks?" with
n(No).Respond to "? SSID" with an SSID (discovered in step 1).
Content type
Image
Digest
Size
86.6 MB
Last updated
over 6 years ago
docker pull zfields/particle-cli