Skip to content

Commit d2b036a

Browse files
wardviaeneclaude
andauthored
clear-wifi: no reboot needed (#18)
Firmware has taken Wi-Fi down on wifi-clear for a while, and since benchpod-firmware#35 it also erases the ESP32-C3's own copy of the credentials. The help, the success line and the README no longer tell the user to reboot. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent d3e4bc2 commit d2b036a

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -731,7 +731,7 @@ The pod's IP (the wired lease first) plus the stored Wi-Fi SSID, state and RSSI
731731
732732
### `benchpod clear-wifi`
733733
734-
Erase the stored Wi-Fi credentials (USB); reboot the pod to fully apply. No flags.
734+
Erase the stored Wi-Fi credentials (USB). Wi-Fi goes down at once, no reboot needed. Firmware after 3.7.0 also erases the copy older firmware left on the ESP32-C3 Wi-Fi chip, which takes a few seconds more. No flags.
735735
736736
### `benchpod login`
737737

‎cmd/benchpod-cli/commands_serial.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ func newShowNetworkCmd(g *globalFlags) *cobra.Command {
175175
func newClearWifiCmd(g *globalFlags) *cobra.Command {
176176
return &cobra.Command{
177177
Use: "clear-wifi",
178-
Short: "Erase stored WiFi credentials (reboot to fully apply)",
178+
Short: "Erase the stored Wi-Fi credentials (Wi-Fi goes down at once)",
179179
Args: cobra.NoArgs,
180180
RunE: func(_ *cobra.Command, _ []string) error {
181181
console, _, ctx, cancel, err := g.openSerialConsole(g.serialDevice(), g.effectiveTimeout(10*time.Second))
@@ -188,7 +188,7 @@ func newClearWifiCmd(g *globalFlags) *cobra.Command {
188188
if err := console.WifiClear(ctx); err != nil {
189189
return fmt.Errorf("clear-wifi: %w", err)
190190
}
191-
fmt.Fprintln(os.Stderr, "Erased stored WiFi credentials. Reboot the device to fully apply (`benchpod bootsel` or power-cycle).")
191+
fmt.Fprintln(os.Stderr, "Erased the stored Wi-Fi credentials. Wi-Fi is off; no reboot needed.")
192192
return nil
193193
},
194194
}

‎internal/serialconsole/wifi.go‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,8 @@ func lastFieldValue(s, label string) (string, bool) {
166166
return val, found
167167
}
168168

169-
// WifiClear erases stored credentials. A reboot is needed to fully apply.
169+
// WifiClear erases the stored credentials and takes Wi-Fi down. Firmware after 3.7.0 also erases
170+
// the ESP32-C3's own copy, which takes a few seconds.
170171
func (c *Console) WifiClear(ctx context.Context) error {
171172
_, err := c.sendCommand(ctx, "wifi-clear")
172173
return err

0 commit comments

Comments
 (0)