Connecting your Device over USB

The easiest way to connect your device to cellular is using the browser as described in the previous lesson. It's worth noting here that you currently cannot set up an Electron from the command line (CLI) because we require that a credit card number be entered, but the CLI will be extremely useful for other things. Please use setup.particle.io or the mobile apps.

For all of the following methods, the device must be in Listening Mode, where the RGB LED is blinking blue.

Particle devices boot into listening mode by default, so if your device is brand new, it should go straight into listening mode. If your device is not blinking blue, hold down the MODE button.

There are a two ways to go about connecting your device over USB, depending on your OS.

Using macOS

We're going to install the Particle CLI on your computer. If you already have node.js installed, you can skip to this step.

Installing Node.js

The Particle CLI runs with Node.js. Grab the latest version from the Node.js website

Launch the installer and follow the instructions to install node.js.

Next, open your terminal, or preferred terminal program.

Install the Particle CLI

Type: npm install -g particle-cli

Note: You may need to update xcode at this time.

Connecting Your Device

If you're using an Electron, please follow the instructions at https://setup.particle.io.

Using Windows

You can use the official Particle Windows CLI Installer to automatically install node.js, the particle-cli, and dfu-util instead of using the manual installation instructions below.

An updated tutorial on CLI, DFU, and driver tools installation is referenced here as well.

To connect and interact with a Particle Device over USB from a Windows machine, the easiest route is to use the Particle command line interface. The following describes how to install the Particle CLI on your computer. If you already have Node.js installed, you can skip to this step.

Installing Node.js

The Particle CLI runs with Node.js. Grab the latest version from the Node.js website

Run the installer you downloaded. Follow the prompts. The default file locations should be fine for this.

Restart your computer.

Node should now be installed! In the next step we will test it and install the CLI.

Installing the Particle Driver

You'll also need to install the Windows driver. Download it here.

Opening the Command Prompt

You'll need to open the command prompt for this next part. You can also use Powershell or a similar command line tool if that is what you are used to.

To open the command prompt: 1) Mouse over the upper right hand corner of the screen and select "Search" 2) Search for cmd in the search box 3) Click on Command Prompt

Now your Command Prompt, is open for use.

Installing the Particle CLI

In the Command Prompt window, type: npm install -g particle-cli

and press enter.

Now let's try using the CLI!

Connecting Your Device

If you're using an Electron, please follow the instructions at https://setup.particle.io.

If your device is not connecting, try troubleshooting here.

More info on the CLI is available.

Once you've finished connecting your device, head over to the next section to learn about the different modes for your device.