That message in the event log indicates the system module configuration (describe message). Typically, when you enter safe mode, it’s because you have unmet dependencies (or you manually entered safe mode using the buttons). The dependencies look correct above.
Understanding the Describe Message
One of the places you may see the describe message is when safe mode is entered. It shows in the event log in the console:
But what does it mean? It’s a description of all of the software modules installed on your device.
There’s a more human readable version of this if you connect the device by USB serial and in listening mode (blinking dark blue), you use the command particle serial inspect
:
particle serial inspect
Platform: 6 - Photon
Modules
Bootloader module #0 - version 101, main location, 16384 bytes max size
Integrity: PASS
Address Range: PASS
Platform: PASS
Dependencies: PASS
System module #1 - version 207, main location, 262144 bytes max size
Integrity: PASS
Address Range: PASS
Platform: PASS
Dependencies: PASS
System module #2 - version 207, main location, 262144 bytes max size
Integrity: PASS
Address Range: PASS
Platform: PASS
Dependencies: PASS
System module #1 - version 207
Bootloader module #0 - version 101
User module #1 - version 5, main location, 131072 bytes max size
UUID: 7CC313FF2C6CB2A590DB6A3ECEA17F106AA6DAD3EAF69FB17870B2D39B56E94C
Integrity: PASS
Address Range: PASS
Platform: PASS
Dependencies: PASS
System module #2 - version 207
empty - factory location, 131072 bytes max size
This is for a Photon, so there is a bootloader, two system modules, and a user module. For an Electron/E Series there are three system modules, but otherwise everything else is similar.
One important thing is that all of the version numbers are semantic version numbers (single integer), not the regular version numbers you are used to, so you’ll need the mapping table to make sense of them.
For example:
- System module version 207 is 0.7.0
- Bootloader 101 is the correct boot loader for 0.7.0
The user module (“User module #1”) is your user firmware. It’s always version 5.
It typically has one dependency, system module #2. In this case, version 207, so version 207 (or later), a.k.a. 0.7.0, must be present to be valid.
System part 2 always has a dependency on system part 1 and the boot loader, so those will be updated if necessary, as well.
A less human readable version can be gotten by connecting to USB serial in listening mode (blinking dark blue) and entering the “s” command (print system module info as JSON):
{"p":6,"m":[{"s":16384,"l":"m","vc":30,"vv":30,"f":"b","n":"0","v":101,"d":[]},{"s":262144,"l":"m","vc":30,"vv":30,"f":"s","n":"1","v":207,"d":[]},{"s":262144,"l":"m","vc":30,"vv":30,"f":"s","n":"2","v":207,"d":[{"f":"s","n":"1","v":207,"_":""},{"f":"b","n":"0","v":101,"_":""}]},{"s":131072,"l":"m","vc":30,"vv":30,"u":"7CC313FF2C6CB2A590DB6A3ECEA17F106AA6DAD3EAF69FB17870B2D39B56E94C","f":"u","n":"1","v":5,"d":[{"f":"s","n":"2","v":207,"_":""}]},{"s":131072,"l":"f","vc":30,"vv":0,"d":[]}]}
Of course that looks very much like the output in the event log, and in fact they are one and the same.
That’s difficult to read, so let’s break it down:
{
"p":6, ## Platform 6 = Photon, 8 = P1, 10 = Electron/E Series
"m": ## Modules array
[
{
"s":16384, ## size in bytes
"l":"m", ## location: main
"vc":30, ## validity check flags
"vv":30, ## validity check results
"f":"b", ## function: boot loader
"n":"0",
"v":101, ## version
"d":
[
]
},
{
"s":262144,
"l":"m",
"vc":30,
"vv":30,
"f":"s", ## function: system part
"n":"1", ## system part 1
"v":207, ## version 207 = 0.7.0
"d":
[
]
},
{
"s":262144,
"l":"m",
"vc":30,
"vv":30,
"f":"s", ## function: system part
"n":"2", ## system part 2
"v":207, ## version 207 = 0.7.0
"d":
[ ## dependencies
{
"f":"s",
"n":"1", ## system part 1
"v":207, ## version 207 = 0.7.0
"_":""
},
{
"f":"b",
"n":"0", ## bootloader
"v":101, ## version 101
"_":""
}
]
},
{
"s":16384, ## size in bytes
"l":"m", ## location: main
"vc":30, ## validity check flags
"vv":30, ## validity check results
"u":"7CC313FF2C6CB2A590DB6A3ECEA17F106AA6DAD3EAF69FB17870B2D39B56E94C",
"f":"u", ## function: user part
"n":"1",
"v":5, ## version is always 5
"d":
[ ## dependencies
{
"f":"s",
"n":"2", ## system part 2
"v":207, ## version 207 = 0.7.0
"_":""
}
]
},
{
"s":131072, ## size in bytes
"l":"f", ## location: factory backup
"vc":30, ## validity check flags
"vv":0, ## validity check results (not valid)
"d":
[
]
}
]
}
The only thing left is the validity check flags:
Validity flags
- 1: image integrity (mask 0x02)
- 2: dependencies (mask 0x04)
- 3: image address range (mask 0x08)
- 4: image platform (mask 0x10 = 16)
- 5: image product (mask 0x20 = 32)
In the example above, all validity flags were checked except for product, so that’s platform (16) + address (8) + dependencies (4) + integrity (2) = 16 + 8 + 4 + 2 = 30. That’s why vc (and usually vv) are 30.