As available supply ran low, we were able to source some apparently quite old Photons for our product. They come with 0.5.3 firmware.
In setting up / flashing / updating each device using the Particle CLI, it seems we have two choices:
Run through particle setup out of the box which then results in the 5-12+ minute firmware update (I haven't actually let this run beyond a few minutes to see if it actually gets there): New Photon Updates: Magenta for 5-12 Minutes, DO NOT UNPLUG
Flash the 0.70 bootloader, then manually use the buttons to put the device into DFU mode (the particle usb dfu command doesn't work on this firmware), and then run particle update which finishes quickly. This is what we've done to date, but the challenge with this is we have to unscrew the top of our enclosure in order to access the Photon's buttons.
Is there a third option that would enable us to more quickly set up these new old stock Photons without having to access the Photon's buttons?
If you connect to the USB serial port at 14400 baud, that will cause the device to go into DFU mode, even on 0.5.3. Then you can use particle update or Device Restore USB or device-os-flash-util to flash the Photon in DFU.
How you do that depends on your operating system, on the Mac you can use:
stty -f /dev/tty.usbxxxxxx 14400
(replace xxxx) with whatever port it's connected to. This is a little iffy under Linux because of how the serial port works, but it's the same idea. On Windows you probably need to use a terminal program like PuTTY or CoolTerm.
This seemed promising as it went into DFU mode (yellow flashing), but then after I ran particle update I got:
> Your device is ready for a system update.
> This process may take a few minutes. Here it goes!
! An error occurred while attempting to update the system firmware of your device:
**Error: Unable to open USB device**
Now it's in a fault state (I'm having trouble counting the red flashes), even when I reboot the device. Any idea?
I believe I figured out why this wasn't working, I'm on a M1 Mac running Monterey and after running into a related error I had to install different USB to Serial drivers for Mac: https://www.wch.cn/downloads/CH34XSER_MAC_ZIP.html
It seems after installing this, now the solution from @rickkas7 is working!
Edit: For Windows users, here are the steps:
Connect to USB port without taking off cover by putting following steps into command line
powershell
[System.IO.Ports.SerialPort]::getportnames() **if not sure which port is the photon, check device manager instead of doing this step
$port= new-Object System.IO.Ports.SerialPort COM#,14400,None,8,one **insert port number where # is