particle-iot / particle-cli

Command Line Interface for Particle Cloud and devices
Apache License 2.0
212 stars 92 forks source link

Fix wifi configuration on serial #736

Closed keeramis closed 5 months ago

keeramis commented 5 months ago

Description

Run serial wifi configuration via control requests for gen3 and above. Use serial commands for gen2.

How to Test

  1. Setup this branch
  2. Connect a single or multiple devices
  3. Run the following commands npm start -- serial wifi npm start -- serial wifi --file creds.json where creds.json looks like
    
    {
    "network": "my_ssid",
    "security": "WPA2_AES",
    "password": "my_password"
    }


## Related Issues / Discussions

## Completeness

- [x] User is totes amazing for contributing!
- [ ] Contributor has signed [CLA](https://docs.google.com/a/particle.io/forms/d/1_2P-vRKGUFg5bmpcKLHO_qNZWGi5HKYnfrrkd-sbZoA/viewform)
- [ ] Problem and solution clearly stated
- [ ] Tests have been provided
- [ ] Docs have been updated
- [ ] CI is passing
hugomontero commented 5 months ago

Control requests prevents the user to pre-configure the wifi if the SSID is not present on the area. The use case that made us to rollback the first change was: On production line some costumers requires to pre-configure the wifi credentials the devices will use in the work area. (the devices for this use case were P2/Photon2)

monkbroc commented 5 months ago

Good call Hugo. Keerthy changed the fix to use control requests for DVOS >6 (since serial commands are gone there) and she'll figure out with Scott a better solution.