Determining the version of system firmware on a Photon/P1

Here’s how you can determine what version of system firmware is installed on your device:

  • connect your device to your computer with a USB cable

  • press the SETUP button for 3 seconds to enter setup mode.

  • using a serial monitor such as PuTTY (Windows) or screen (linux/OSX), to connect to the device

  • press ‘v’ - this prints the system version, e.g. 0.4.5

If this produces no output, then you most likely have an older version (pre 0.4.4) that doesn’t support this command. Instead, press s - this will print detailed information about the system modules installed.

The output is written with no spacing. When pretty printed, it will be similar to this:

[
  {
    "s": 16384,
    "l": "m",
    "vc": 30,
    "vv": 30,
    "f": "b",   <-- bootloader
    "n": "0",
    "v": 3,    <-- version 3
    "d": []
  },
  {
    "s": 262144,
    "l": "m",
    "vc": 30,
    "vv": 30,
    "f": "s",   // system module
    "n": "1",   // part 1
    "v": 3,     // version 3 (0.4.3)
    "d": []
  },
  {
    "s": 262144,
    "l": "m",
    "vc": 30,
    "vv": 30,
    "f": "s",   // system module
    "n": "2",   // part 2
    "v": 3,     // version 3
    "d": [ ... ]
  },
  

The "v":3 string in the system module description tells us it’s version 0.4.3.

4 Likes

This answered one of my questions from another forum post.

Even though the info is cryptic at this time, the version number is provided, and the format will be improved upon at a later date.

Thanks!!

It would be nice if the information could be polled and displayed by the WEB IDE itself as part of the ‘device target’’ screen.

3 Likes

is there a way to determine the Core’s firmware version?

If, so what should I be running? Mine is from the kickstarter days and I finally started using it. So it could be super old unless the web dev automatically updates it.

The Core firmware is updated each time you compile code in the WebIDE or Particle CLI. So all you have to do is compile and flash your application once more to get the latest firmware. The same feature will soon be available with the Photon too.

awesome!

Is there a way to do this inside a running program?

1 Like

@mdma Wow, that’s pretty cryptic. Version 3 == 0.4.3? Does version 2 corespond to 0.4.2? What happens when you want version 0.5.0?

Anyway, I tried reading out my system version. Keep in mind I haven’t flashed 0.4.3, or any other system firmware for that matter. Here’s my output:

[
  {
    "s": 16384,
    "l": "m",
    "vc": 30,
    "vv": 28,
    "f": "b",
    "n": "0",
    "v": 2,
    "d": [
      
    ]
  },
  {
    "s": 262144,
    "l": "m",
    "vc": 30,
    "vv": 0,
    "d": [
      
    ]
  },
  {
    "s": 262144,
    "l": "m",
    "vc": 30,
    "vv": 30,
    "f": "s",
    "n": "2",
    "v": 3,
    "d": [
      {
        "f": "s",
        "n": "1",
        "v": 3,
        "_": ""
      }
    ]
  },

So if I understand correctly, I have an older bootloader than you (version 2), my system part 1 is version 0 (whatever that means), but my system part 2 is 0.4.3? Do you see my confusion?

Could you shed some light please? What system do I actually have? Will updating my system also update my bootloader?

Thanks!

I can certainly appreciate this is cryptic :exclamation: :question: :slight_smile: - we will be adding a simple way to view the installed system versions in due course. We prefer transparency, and folks were asking for it, so that’s why I’m presenting we currently have.

The information you have there is from the update delivered from the cloud (what we cal Update Zero.) It is based on 0.4.3, hence v:3 for the 2nd part. This is very much a temporary thing - soon the cloud will be able to push full updates, which also update the bootloader. You can also install the full updates manually (which is very much recommended) by running these commands:

particle flash YOUR_DEVICE_NAME  system-part1-0.4.3-photon.bin
particle flash YOUR_DEVICE_NAME  system-part2-0.4.3-photon.bin

That explains a lot. Thanks @mdma! I have successfully flashed 0.4.3 and my output now matches yours.

1 Like

Hi @mdma

I want to determine the version of the system firmware. I'm trying to follow this instruction from above on a Mac. I have my Photon blinking yellow, however the device /dev/tty.usbmodem641 does not exist. That device normally comes and goes when the Photon reboots. It is created when the Photon enters blinky green, Firmware Reset. It isn't created when it enters blinky yellow.

Any help? Anyone else have this problem?

You need to be in setup mode - please see the 2nd line of the instructions - there's also a link showing you how to do it. Cheers!

1 Like

Got it. I misread the instructions. My bad. Thanks.

1 Like

Your instructions are absolutely correct, however in my defense I'd like to point out that the page that link takes me to does not mention setup mode, it mentions "Listening Mode". I take it these two terms are synonyms? That's what threw me.

My output is different than the above. I used the serial communication in the ParticleDev environment. I got this:

[
  {
    "d": [], 
    "f": "b", 
    "l": "m", 
    "n": "0", 
    "s": 16384, 
    "v": 2, 
    "vc": 30, 
    "vv": 28
  }, 
  {
    "d": [], 
    "l": "m", 
    "s": 262144, 
    "vc": 30, 
    "vv": 0
  }, 
  {
    "d": [
      {
        "_": "", 
        "f": "s", 
        "n": "1", 
        "v": 3
      }
    ], 
    "f": "s", 
    "l": "m", 
    "n": "2", 
    "s": 262144, 
    "v": 3, 
    "vc": 30, 
    "vv": 30
  }, 
  {
    "d": [
      {
        "_": "", 
        "f": "s", 
        "n": "2", 
        "v": 1
      }
    ], 
    "f": "u", 
    "l": "m", 
    "n": "1", 
    "s": 131072, 
    "u": "0102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F20", 
    "v": 2, 
    "vc": 30, 
    "vv": 30
  }, 
  {
    "d": [
      {
        "_": "", 
        "f": "s", 
        "n": "2", 
        "v": 1
      }
    ], 
    "f": "u", 
    "l": "f", 
    "n": "1", 
    "s": 131072, 
    "u": "00F0CBFF5549554800F0C7FF5549554800F0C3FF5549554800F0BFFF55495548", 
    "v": 2, 
    "vc": 30, 
    "vv": 30
  }
]

Is the s value the part that indicates what the entry corresponds to? I’m not sure how to read this from my Photon. Do I have old system firmware or newer?

According to BDub:

if you get a “f”:“s” followed immediately a couple characters away by “v”:“3”, that would indicated 0.4.3-rc2.

FYI, as of 0.4.4 (AKA version ‘5’), the new ‘v’ command in setup/listen mode will show the human readable version number (e.g., “system firmware version: 0.4.4”).

Is there a way to access the firmware version number in user software? We’re loading firmware v0.4.4 onto 500 photons, and from experience, we see a couple percent of the photons fail to load both firmware files.
Currently, I have a shell script that loads both parts of the firmware and the user binary in sequence, like this:

load firmware part 1 and stay in dfu-mode
wait 1 second
load firmware part 2 and stay in dfu-mode
wait 1 second
load user-space binary file and exit dfu

in my user-space program, I’d like to do a check to see if the system firmware version is in fact 0.4.4, and turn the photon’s LED on if everything loaded OK. This will help us QA that last couple percent of failures.

Any idea how to do this?

I'm not quite sure I understand this part. In setup mode, connected to my computer (mac), what do I need to do? If I type particle setup into terminal then I get the whole setup script, there doesn't seem to be a place where I can type 'v' or 's'.

Why not include this feature to particle in CLI?

Like particle version