Particle Device OS Updates Thread

Firmware 0.6.0-rc.1 Pre-release is out on the Build IDE for Core/Photon/P1/Electron

This is a big one!

  • The majority of Docs updates for 0.6.0 are going to roll out and be live between now and tomorrow sometime.
  • Please make sure to update your CLI to v1.16.0 for proper handling of 3 system parts for Electron.
  • You must update your Electron to v0.5.3-rc.2 first before attempting to use OTA or YModem transfer to update to v0.6.0-rc.1. If you use DFU over USB, you can update to v0.6.0-rc.1 directly, but make sure you have installed v1.16.0 of the CLI first.

Note: This is a pre-release and is not intended for production yet. We've tested this pre-release to the best of our ability and we want to know what you think now! Please understand that some care and attention is necessary when testing this pre-release, and be sure to upgrade to the final release when it's available. It will not be available by default. To use you must select the version dropdown from the devices drawer. Downgrading back to the current release info is at the bottom of this post.
060rc1
(minor known issue with 060rc1 being located lower and out of order in the dropdown)

BREAKING CHANGES

  • UDP.flush() and TCP.flush() now conform to the Stream.flush() behavior from Arduino 1.0 Wiring. The current (correct) behavior is to wait
    until all data has been transmitted. Previous behavior discarded data in the buffer. #469

FEATURES

  • Logging library for flexible system and application logging. Docs
  • [Electron] Reduced data consumption connecting to the cloud with deep sleep. (See the Docs for how to gain the full data reduction.) #953
  • Can set Claim Code via the Serial interface (for use by the CLI.) #602
  • Device ID available via dfu-util. #949
  • [Electron] Firmware Reset now available. #975 and Docs
  • System Reset Reason #403 Docs
  • [Photon/Electron/P1] Composite USB device driver with HID Mouse & Keyboard implementation for STM32F2 #902 and #528
  • Exposes Device ID and Bootloader Version through USB descriptors while in DFU mode, Microsoft WCID support #1001
  • USB vendor-specific setup request handling #1010
  • [Electron] now allows OTA bootloader updates #1002
  • Added Daylight Saving Time support #1058 per proposed #211 Docs

ENHANCEMENTS

  • Local build warns if crc32 is not present. #941
  • [Photon/Core] MAC address is available immediately after WiFi.on() #879
  • [virtual device] support for TCP Server #1000
  • [virtual device] support for EEPROM emulation #1004
  • Low-level RTOS queues exposed in HAL #1018
  • USART LIN bus support. #930 Docs
  • USART added support for 7E1, 7E2, 7O1, 7O2 modes. #997 Docs
  • Configurable resolution for analogWrite (PWM and DAC) #991 analogWrite() Docs | analogWriteResolution() Docs | analogWriteMaxFrequency() Docs
  • System flag SYSTEM_FLAG_RESET_NETWORK_ON_CLOUD_ERRORS to control if the device resets the network when it cannot connect to the cloud. #946
  • [Photon] 1KB system backup memory added (same size as Electron) reducing user backup memory to 3KB (3068 bytes) #1046
  • Automatically adds vendored libraries from the lib directory for extended application projects #1053
  • Extended spi_master_slave tests with SPI_MODE0/1/2/3 and MSBFIRST/LSBFIRST testing #1056
  • [Electron] System parts reordered from 3,1,2 to 1,2,3 to preserve logical flashing order for OTA/YModem when upgrading. #1065

BUGFIXES

  • SoftAP mode persisting when setup complete if Wi-Fi was off. #971
  • Free memory allocated for previous system interrupt handler #951 fixes #927
  • Fixes to I2C Slave mode implementation with clock stretching enabled #931
  • millis()/micros() are now atomic to ensure monotonic values. Fixes #916, #925 and #1042
  • availableForWrite() was reporting bytes available instead of bytes available for write #1020 and #1017
  • digitalRead() interferes with analogRead() #993
  • USART 9-bit receiving. #968
  • Fix soft AP suffix broken by the addition of device id in DCT #1030
  • WKP pin should not be enabled as a wakeup source unconditionally for STOP mode #948 and #938
  • General I2C Improvements and MCP23017 tests #1047
  • Rebuilt Wiced_Network_LwIP_FreeRTOS.a WWD_for_SDIO_FreeRTOS.a on OSX #1057 fixes Local build stalling on object dump #1049
  • Validates that module dependencies would still be satisfied after the module from the "ota_module" location is flashed (via OTA or YMODEM flashing) #1063
  • System.sleep SLEEP_MODE_DEEP timing accuracy and sleep STOP mode retains user interrupt handler after resuming #1051 fixes #1043 and #1029

INTERNAL

  • [Electron] Use floating point arithmetic in PWM to save about 1KB of flash space #1027
  • Feature/vendorlibraries #1009
  • [Electron] Added a 3rd system module to provide room for additional system firmware #1035
  • Remove accidental SYSTEM_MODE(MANUAL) from pwm.cpp in wiring/no_fixture #1052

System Binaries (all devices) & Device Upgrader (Photon & Electron)


Updating System Firmware (and optionally adding Tinker)

To update your device, compile and flash your application in the Build IDE, selecting version 0.6.0-rc.1 (prerelease) in the devices drawer. Update instructions for Core, Photon, P1 and Electron below.

The OTA method using Particle CLI

For devices already online and connected to the cloud, the system firmware can be updated OTA using these commands:

If your device is online, you can attempt to OTA (Over The Air) update these system parts as well with the particle-cli:

Note: You must download system binaries to a local directory on your machine for this to work.

Core:

particle flash YOUR_DEVICE_NAME tinker-0.6.0-rc.1-core.bin

Photon:

particle flash YOUR_DEVICE_NAME system-part1-0.6.0-rc.1-photon.bin
particle flash YOUR_DEVICE_NAME system-part2-0.6.0-rc.1-photon.bin
particle flash YOUR_DEVICE_NAME tinker (optional)

P1:

particle flash YOUR_DEVICE_NAME system-part1-0.6.0-rc.1-p1.bin
particle flash YOUR_DEVICE_NAME system-part2-0.6.0-rc.1-p1.bin
particle flash YOUR_DEVICE_NAME tinker (optional)

Electron:

particle flash YOUR_DEVICE_NAME system-part1-0.6.0-rc.1-electron.bin
particle flash YOUR_DEVICE_NAME system-part2-0.6.0-rc.1-electron.bin
particle flash YOUR_DEVICE_NAME system-part3-0.6.0-rc.1-electron.bin
particle flash YOUR_DEVICE_NAME tinker (optional)

The local method over USB using Particle CLI

This requires CLI version 1.16.0 or newer. You can check with particle --version.

If you have the Particle CLI installed already, make sure it is updated with the following command. Make sure the device is in DFU mode and run:
sudo npm update -g particle-cli (note: you can try without sudo first if you wish)

Core:

particle flash --usb tinker-0.6.0-rc.1-core.bin

Photon:

particle flash --usb system-part1-0.6.0-rc.1-photon.bin
particle flash --usb system-part2-0.6.0-rc.1-photon.bin
particle flash --usb tinker (optional)

P1:

particle flash --usb system-part1-0.6.0-rc.1-p1.bin
particle flash --usb system-part2-0.6.0-rc.1-p1.bin
particle flash --usb tinker (optional)

Electron:

particle flash --usb system-part1-0.6.0-rc.1-electron.bin
particle flash --usb system-part2-0.6.0-rc.1-electron.bin
particle flash --usb system-part3-0.6.0-rc.1-electron.bin
particle flash --usb tinker (optional)

The local DFU-UTIL method

can be applied to offline devices locally over USB using dfu-util

  • Put the device in DFU mode (flashing yellow LED)
  • open a terminal window, change to the directory where you downloaded the files above, and run these commands:

Core:

dfu-util -d 1d50:607f -a 0 -s 0x8005000:leave -D tinker-0.6.0-rc.1-core.bin

Photon:

dfu-util -d 2b04:d006 -a 0 -s 0x8020000 -D system-part1-0.6.0-rc.1-photon.bin
dfu-util -d 2b04:d006 -a 0 -s 0x8060000:leave -D system-part2-0.6.0-rc.1-photon.bin

P1:

dfu-util -d 2b04:d008 -a 0 -s 0x8020000 -D system-part1-0.6.0-rc.1-p1.bin
dfu-util -d 2b04:d008 -a 0 -s 0x8060000:leave -D system-part2-0.6.0-rc.1-p1.bin

Electron:

dfu-util -d 2b04:d00a -a 0 -s 0x8060000 -D system-part1-0.6.0-rc.1-electron.bin
dfu-util -d 2b04:d00a -a 0 -s 0x8020000 -D system-part2-0.6.0-rc.1-electron.bin
dfu-util -d 2b04:d00a -a 0 -s 0x8040000 -D system-part3-0.6.0-rc.1-electron.bin

Downgrading from 0.6.0-rc.1 to current default firmware

Current defaults

Core: v0.5.2
Photon: v0.5.2
P1: v0.5.2
Electron: v0.5.2

The easiest way to downgrade from a 0.6.0-rc.1 prerelease system firmware, is to use the CLI and run these commands in order. First put the Tinker back on the device, then downgrade the System firmware. This requires CLI version 1.15.0. You can check with particle --version.

If you have the Particle CLI installed already, you can update it with the following combined command. Make sure the device is in DFU mode and run:
sudo npm update -g particle-cli (note: you can try without sudo first if you wish)

  1. Make sure Tinker is installed, instead of a 0.6.0-rc.1 app that you may currently have running on your device. Have the device in DFU mode and run:
particle flash --usb tinker
  1. Make sure the device is in DFU mode and run:
particle update

This works for downgrading without specifying --target X.Y.Z because the 0.6.0-rc.1 pre-release firmware is not the default, and therefor particle update effectively downgrades your firmware.


Debugging for Electron

Instructions on using the Tinker USB Debugging app are here

This is useful for simply capturing the Electron's connection process.


Instructions on using the Electron Troubleshooting app are here

This is useful for interacting with the Electron's connection process.

1 Like