particle-iot / particle-cli

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

Add new control request to set wifi creds #739

Closed keeramis closed 3 months ago

keeramis commented 3 months ago

Description

Device-OS added a new control request to set network credentials without needing for a connection attempt. This PR adds support to use this control request to configure wifi network. If device is of device-os version which does not support this control request (which is 6.x TBD), wifi is configured via serial commands

How to Test

  1. Flash your wifi devices with https://github.com/particle-iot/device-os/pull/2763
  2. Connect this CLI to this particle-usb PR https://github.com/particle-iot/particle-usb/pull/103
  3. Most important! Correct this line in this PR to always use control requests - https://github.com/particle-iot/particle-cli/compare/feature/wifi-configuration?expand=1#diff-cd875ddf040ba04907a08a3fd03ef7fa0039f29267b30aca435178386162ec24R538
  4. Run npm start -- serial wifi

Completeness

hugomontero commented 3 months ago

@keeramis I was checking particle-usb and saw that setWifiCredentials function was removed so this PR should be closed right?

keeramis commented 3 months ago

@hugomontero Thanks for taking a look! I am temporarily closing this PR because of the new changes scoping out here. https://www.notion.so/particle/CLI-Improved-WiFi-Configuration-8a2ee199e4484b428e0ee0c9b26d219a