How to get Device ID offline?

Hello, I am using Particle photon. I want to read Device id without mobile app and cloud connection. at very first time when device is new bought and fresh how i can read it’s device id. i read this. there is one way defined using JTAG/SWD. but i want it in code. is there any way to call any function or reading memory from code to read device id?

It rarely ever hurts to read the documentation, but in ase you just happened to have missed it:
https://docs.particle.io/reference/firmware/photon/#deviceid-

2 Likes

Also, you’ll want to use SYSTEM_MODE(MANUAL) so a Wi-Fi and cloud connection won’t be attempted before your code that reads the device ID from device firmware is run.