Connecting your Device over USB

The easiest way to connect your device to Wi-Fi is using the mobile app as described in the previous lesson. But in case that's not working for you, there are other methods as well.

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 SETUP 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

Make sure your device is plugged in via USB and in Listening Mode (blinking blue). Open the terminal and type: particle setup

Log in with your Particle account and follow the prompts to set up your device.

If you have already claimed your device and you want to connect it to Wi-Fi, type particle serial wifi instead of particle setup. This will set up your device on the current Wi-Fi.

Wait! What is an SSID? What kind of security does my Wi-Fi have?

  • The SSID is the name of your network. When you connect on your computer, it is the name that you select when you connect your computer to Wi-Fi.
  • The Security of your Wi-Fi is often set up by the administrator. Typically this is WPA2 if a password is needed, or unsecured if no password is needed. Contact your network administrator if you can't get this step to work, and find out exactly what kind of Wi-Fi you have.

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

Make sure your device is plugged in via USB and in Listening Mode (blinking blue). Open the terminal and type: particle setup

Log in with your Particle account and follow the prompts to set up your device.

If you have already claimed your device and you want to connect it to Wi-Fi, type particle serial wifi instead of particle setup. This will set up your device on the current Wi-Fi.

Wait! What is an SSID? What kind of security does my Wi-Fi have?

  • The SSID is the name of your network. When you connect on your computer, it is the name that you select when you connect your computer to Wi-Fi.
  • The Security of your Wi-Fi is often set up by the administrator. Typically this is WPA2 if a password is needed, or unsecured if no password is needed. Contact your network administrator if you can't get this step to work, and find out exactly what kind of Wi-Fi you have.

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.