particle-iot/spark-cli

Failed to rename core, server said [ 'Name already in use' ]

Opened this issue · 1 comments

On the setup procedure, sparkasks for a name but raises an error when it is already used by the connected core.

Wouldn't be nicer to

  • display the name of the connected core,
  • set ENTER as default option to keep the current name,
  • input a new name only if it is different from the current one.
----------------------
Naming your core

What would you like to call your core? mySpark
Failed to rename core, server said  [ 'Name already in use' ]
Error setting up your core: [object Object]

@emilyrose , would like your input on this. I have fixed the issue of potential unhandled rejection but this is tricky as particle setup is really just for new unclaimed device.

Checking that a device has been claimed before and retrieving a device name is not so straightforward.

For claimed devices, the better command would be particle setup wifi or particle serial wifi