# Particle setup on cli, automatic wifi

**URL:** <https://community.particle.io/t/particle-setup-on-cli-automatic-wifi/23879>\
**Category:** Firmware\
**Created:** [June 22, 2016, 1:38am UTC](https://community.particle.io/t/particle-setup-on-cli-automatic-wifi/23879 "2016-06-22T01:38:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![wesner0019](https://avatars.discourse-cdn.com/v4/letter/w/0ea827/32.png) [@wesner0019](https://community.particle.io/u/wesner0019)\
**Post date:** [June 22, 2016, 1:38am UTC](https://community.particle.io/t/particle-setup-on-cli-automatic-wifi/23879/1 "2016-06-22T01:38:59Z")

</div>

I am using cli to setup a bunch on p1’s (~150 of them) and I can not get the automatic wifi to work. Im running latest version of cli and on windows 10 64 bit.

Does any one know how to set up the computer for the automatic wifi setup to work?

 ![](https://us1.discourse-cdn.com/flex026/uploads/particle/original/2X/e/ecd21939e846e84b765a487144f6d3600c0e1529.png)

Thanks!

---

<div class="post-metadata">

**Author:** ![Moors7](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/moors7/32/588_2.png) [@Moors7](https://community.particle.io/u/Moors7)\
**Post date:** [June 22, 2016, 6:04am UTC](https://community.particle.io/t/particle-setup-on-cli-automatic-wifi/23879/2 "2016-06-22T06:04:01Z")

</div>

With larger batches like that, it might be more convenient to use `Particle serial wifi ‘ since it’s a lot faster, and doesn’t require you to switch wifi all the time. You could probably even write some sort of script for it 🙂

@wesner0019: dug around some more, and found a script, which might be interesting 😄

> **[Particle-CLI scripts/automation for initial setup on large number of devices](http://community.particle.io/t/particle-cli-scripts-automation-for-initial-setup-on-large-number-of-devices/14265/9?u=moors7)**
>
> Here's an expect script using a \*nix command line (note: not the Particle CLI, just plain old Bash or whatever): #!/usr/bin/expect -f # SSID: # Security 0=unsecured, 1=WEP, 2=WPA, 3=WPA2: # Wifi Password: eval spawn particle serial wifi expect...

---

<div class="post-metadata">

**Author:** ![wesner0019](https://avatars.discourse-cdn.com/v4/letter/w/0ea827/32.png) [@wesner0019](https://community.particle.io/u/wesner0019)\
**Post date:** [June 22, 2016, 1:37pm UTC](https://community.particle.io/t/particle-setup-on-cli-automatic-wifi/23879/3 "2016-06-22T13:37:05Z")

</div>

@Moors7, thanks but the scripts are brand new territory for me which will require a lot of upfront time trying to learn it. I’ll ask my team if anyone has experience writing these.

For the serial wifi, can I call this after I go through particle setup? or can I set the serial wifi before setup and then set the device back into listening mode from the terminal?
