particle-iot/particle-cli

"particle serial wifi" will try to use devices not in listening mode

mstan opened this issue · 0 comments

mstan commented

When using the command particle serial wifi to setup wi-fi credentials, the command will start going through the prompts to let you try and setup wifi, even if the device is NOT in listening mode.

Doing so is confusing for the user and will hang mid-process.

The process will not start if no serial device is detected. But if there is a serial device connected (outside of listening mode), you will still be able to go through the process.

Below is an example of a device in a breathing cyan state attempting to go through particle serial wifi

CALLISTO:~ user$ particle serial wifi
? Should I scan for nearby Wi-Fi networks? Yes
? Select the Wi-Fi network with which you wish to connect your device: particle.
io
? Should I try to auto-detect the wireless security type? Yes
> Detected WPA2(PSK/AES/AES) security

In the above process, it will hang indefinitely with Detected WPA2(PSK/AES/AES) security and never proceed past this point.

The recommended proposal is either check to see if the device is somehow in listening mode specifically, or at least prompt the user with function call _promptForListeningMode() prior to going through the process.