How rename device after registering?

I’d like to change the name of the device that I just recently registered (an Electron).

Is there a way to do that?

One way is to log into Particle Build (web IDE), click on the devices tab (circle with lines, the target symbol). Click on the name of the device and the field becomes editable.

You can also use particle device rename from the Particle CLI command line interface.

1 Like

Thanks, I’ll try.

Can I assume the name refers to the device rather than the sim card account that came with the Electron? I have no idea if each device has an ID that the development tools can detect, or whether we point the development tools to a device we have plugged into the USB, etc.

There are three identifiers for a device:

The device ID, which is built into the device and never changes. It’s a 24-character long hexadecimal string.

The ICCID, for Electrons only, is usually 19 or 20 digits long. That’s associated with the SIM card. The ICCID and the device ID for its electron are not fixed to each other, and you can swap SIM cards on your Electron and it will continue to work. (Though if you switch to or from a 3rd party SIM card, you will probably need to change the APN setting.)

The device name is mapped to and from the device ID. It provides a shorthand for more conveniently accessing the device from Particle Build, Particle Dev, and the Particle CLI. It’s unique only for a given user. There are probably a lot of devices in the world with the name “test2”, but as long as you’re logged into your Particle account, it will specify your device named “test2”.

Thanks, that explains it. Where do we find the API calls for the device to know its own device ID and ICCID?

-SB

Found this part of my question: System.deviceID()

And the other question can be answered by use of the search feature (keyword: ICCID) in the docs
https://docs.particle.io/reference/firmware/electron/#command-
There is an example that shows how to use AT commands to retrieve the ICCID

The docs do actually tell a lot, when used properly
Where is the real documentation?

Thanks - the hardest part for me is knowing what is done for us, by default, and what we do ourselves; what goes on behind the scenes with development platforms; where do you start; what happens when the device starts up; how the “cloud” participates. Sometimes documentation discusses concepts at various levels but it takes a long time to see what layer something is handled in, whether it is encapsulated in a development platform configuration option or a supplied library, etc. I appreciate hearing experienced advice, even if only to confirm what I think I understand from the documentation.

One big chunk of this is part of the Wiring / Arduino heritage, which might be best found in the Arduino site.
Another big chunk was already answered in your other thread about “missing/unfindable” docs :wink:
And then there are the “not actually missing” docs. What you find in the Referece section is there, just by including Particle.h (which is implicitly done in the main .ino file by the preprocessor).
What’s not there might be found in the libraries drawer of Particle Build (a.k.a. Web IDE) or with a search or help-call in this forum.

Wiring: First execute setup() once, then run loop() over and over again with other tasks (e.g. cloud house keeping) between iterations (unless SYSTEM_THREAD(ENABLED)).

See SYSTEM_THREAD(ENABLED) and SYSTEM_MODE() in the docs

Thanks - hopefully I’ll slowly get a clear picture of it all soon.