Device Meta Data - Can I store meta data on a device?

As I look to deploy core’s to the field, I am starting to think about deployment issues:

  1. Which version of Spark firmware code is a device running?
  2. What pcb board is it using?
  3. other meta data

Is there a mechanism for burning this into permanent memory as I setup each device, so it is not overwritten when I flash the core with an update later? This could then be read into a Spark.variable at setup() so a specific device an be queried via the cloud api.


@Kevin for point 1:

It will be available in the next release. I can’t find the list of stuff that will be available but there’s versioning for bootloader, system firmware etc.

For number 2 and 3, you will need to store such information the EEPROM and have your firmware read them. I’m sure it can be done but still not that clear on the implementation method yet :wink:

@Kevin, just checking with the Spark Guru on the EEPROM persistence. The Spark emulated EEPROM is not affected by flashing new code so you could use it to store your meta data. I highly recommend, however, to also store a CRC along with the data to ensure data reliability. One thing you can do is use a Spark.function() to set and manage the metadata on ANY Core at run time instead of at flash time :smiley:

thanks both - great to hear this is possible and the tip for using Spark function looks the way to go.

1 Like