Mesh products Platform_ID

Where can one find out the Platform_ID for Mesh micros (Argon, Boron, Xenon)?

I searched the docs but could not find it.

1 Like
#define PLATFORM_ARGON 12
#define PLATFORM_BORON 13
#define PLATFORM_XENON 14
2 Likes

Just as a hint. If you want to find out the PLATFORM_ID of a given device without outside help, you can.

Just do something like this

void loop() {
  Serial.println(PLATFORM_ID);
  delay(1000);
}

and there you will see it right from the device itself.
Also particle serial inspect does also give you that number

C:\Temp>particle serial inspect
Platform: 13
...
5 Likes

Does it works with every system?

Thank you @rickkas7 and @ScruffR.

This works for all Particle and compound devices.
Which system would you be refering to?

And if you’re using it for conditionally including code, usually it’s best to check for the capability you want, not the platform. For example, if you had code that checked for Wiring_Cellular instead of Electron, it probably would have worked without changes on the Boron.

All of the flags are here:

4 Likes

@rickkas7, thanks for the tip. I looked at your file but didn’t see anything relating to the 3 new mesh devices.

Am I missing something or does this file need updating to support something like “#define Wiring_Mesh 1”?

Or is this the entry I should focus on:

#if HAL_PLATFORM_MESH
#define Wiring_Mesh 1
#define Wiring_SPI1 1
#define Wiring_LogConfig 1
//#ifdef DEBUG_BUILD
//#define Wiring_Rtt 1
//#endif
#endif

It’s difficult to answer when you don’t really say what you want to check for?

  • is it a specific device?
  • is is it general mesh functionality?
  • is it ethernet capability of any of the mesh devices?
  • …

BTW, did you look at the first file Rick linked to or the second?

I looked at both files.

In general, being curious, I want to know it all. I want to be able to programmatically determine anything that the Console app can determine. No particular reason…I just think I should be able to since the Particle programmers have access to it. Unlike Apple in the old days and Microsoft, I don’t believe that API’s should be restricted from general use unless it involves authentication data or access control for files/directories. Being able to find out my mesh name, who belongs to my mesh, whether my device supports wireless, mesh, Ethernet, cellular, etc., should be readily available.

Just for my amusement I was working on a program that would tell me as much about a device as possible. For example, if I handed you a device with all labels blanked out, what could you tell me about the device and it’s capabilities. That would include platform, memory, firmware, IP config, wireless config, mesh config, etc.
I’m almost done but I couldn’t find anything related to the mesh config. Then I saw @rickkas7 post about using the device capabilities instead of a specific platform, so I started changing my code.