Particle Device OS Updates Thread

Hey All!

The whole team at Particle knows there are many people eagerly awaiting a new firmware release for the Photon, both for local builds and in Particle Build, so I wanted to share with you our current status in Firmware and the release plans for the coming days.

Here’s the current firmware status on critical issues:

  • I2C issues: this has been our #1 focus this week and thanks to great :bug: hunting work by @satishgn and @BDub, we feel we have a fix in place. Our initial tests are positive and error-free and we will continue testing this over the next few hours.

  • TCPClient reliability improvements: when a socket connection failed, this caused the device to SOS. This has been fixed.

A peek at some of the new features coming:

  • Particle library to replace the Spark library. Spark functions continue to work as before, but will produce a compiler warning. (For example, instead of Spark.connect() code should now use Particle.connect().

  • an API to access the external flash on the P1. (The flashee-eeprom library has been updated to support the P1 too!)

The full list of the changes are available in the firmware changelog.

Release Plan

Release candidate to github today/tomorrow

When I2C has been tested and we are confident a fix is in place, we will make a new release candidate (v0.4.4-rc.3) on github releases that contains the updated system firmware that you can flash to your device. We expect this to happen before EOB Pacific Time August 14.

Rollout to Particle Build

We’re pleased to be able to bring this release to Particle Build! Application code built using Particle Build, Particle Dev or Particle CLI will be able use all the new features introduced in 0.4.4 and previous versions.

The 0.4.4 release will be rolled out to Particle Build next week.

29 Likes

Have comments or questions about these updates? Please leave them under the Particle Device OS Update Comments thread.

UPDATE: The github release hasn’t been made yet. Sorry to anyone that is waiting eagerly for this. The reason for the delay is that we’ve made some significant stability improvements to both I2C and TCP sockets over the past few days and wanted to have these implemented and tested before making the release.

We will continue testing and make a github release today!

Cheers,
mat.

6 Likes

A new release candidate (v0.4.4-rc.3) is available at https://github.com/spark/firmware/releases.

Major improvements to I2C and TCP client sockets.

For developers building locally, the release candidate is available in the latest branch.

Please take it for a spin and let us know how it goes!

5 Likes

RW 0.4.4 final release has flown! The release is automatically pushed to your device when flashing an application via Particle Build, Particle CLI and Particle Dev and the 0.4.4 release is selected. It’s also available for manual installation via github releases https://github.com/spark/firmware/releases.

NOTE: Users that rely on an External Antenna for connectivity - please see the next post before updating!

5 Likes

##Updating to 0.4.4 when using an External Antenna

:warning: The default antenna choice has been changed from automatic selection ANT_AUTO to fixed on the ANT_INTERNAL antenna. This was done to make the WiFI connection more reliable for most users (often, automatic selection would select the external antenna even though there was no external antenna present.)

Devices that rely on the external antenna for connectivity should follow these instructions to avoid losing connectivity during remote updates:

:one: Download the external antenna only version of tinker from the github releases page.

:two: First flash this special tinker app to the device using Particle CLI
particle flash <device_name_or_id> tinker-external-antenna-only-0.4.4-photon.bin
(make sure you get the right one! - photon or p1)

particle flash your_photon tinker-external-antenna-only-0.4.4-photon.bin

:three: After 10-20 seconds, you could run this command and see that the device is online still, but in Safe Mode because the application firmware has a newer version than the system firmware.

particle list

your_photon [123412341234123412341234] (Photon) is online
// no functions will be shown

:four: Follow the instructions to flash the system firmware OTA on the github releases page. You should expect to wait 3-5 minutes after each part. If you get an error with the CLI, try again… the last part might have been transferring still.

:five: After both system parts complete, you should be able to run particle list and see a set of Functions listed that are available in Tinker.

your_photon [123412341234123412341234] (Photon) is online
  Functions:
    int digitalread(String args) 
    int digitalwrite(String args) 
    int analogread(String args) 
    int analogwrite(String args) 

:six: Edit your application sources, and add this code before the setup() function:

STARTUP(WiFi.selectAntenna(ANT_EXTERNAL));

:seven: compile and flash the application as usual via Particle Dev, Particle CLI or Particle Build.

:white_check_mark: Your system is now running your application, with 0.4.4 system firmware, and always connects to WiFi via the external antenna.

:pencil2: If you wish to maintain the previous functionality of automatic antenna selection in 0.4.3-rc2, specify ANT_AUTO above instead of ANT_EXTERNAL.

4 Likes

Hi everyone,

Please note that we identified a small regression in this new firmware version, but our amazing @mdma has already provided a workaround for it.

Please see this link on github both for a description of the known issue and the workaround:

The workaround requires a small change to your application code. The official fix will come in the next scheduled release.

Thanks for your understanding, support, and patience as we continue to make the Particle platform great.

2 Likes

The firmware 0.4.5 release has shipped!

The release is automatically pushed to your device when flashing an application via Particle Build, Particle CLI and Particle Dev and the 0.4.5 release is selected (or latest). It’s also available for manual installation via github releases https://github.com/spark/firmware/releases.

Changes in 0.4.5

FEATURES

  • SPI.setClockDividerReference, SPI.setClockSpeed to set clock speed in a more portable manner. #454
  • WiFi.scan function to retrieve details of local access points. #567
  • UDP.sendPacket/UDP.receivePacket to send/receive a packet directly to an application-supplied buffer. #452
  • Static IP Support [photon] - #451
  • [photon] UDP multicast support via UDP.joinMulticast/UDP.leaveMulticast. Many thanks @stevie67!
  • waitFor(WiFi.ready) syntax to make it easier to wait for system events. #415
  • Flexible time output with Time.format() #572

ENHANCEMENTS

  • Recipes and Tips section in the build documentation.
  • Particle.function, Particle.subscribe and attachInterrupt can take a C++ method and instance pointer. #534 Thanks to @monkbroc!
  • UDP.setBuffer to set the buffer a UDP instance uses for read/write. #224 and #452
  • WiFi.setCredentials() can take a Cipher type to allow full specification of an AP’s credentials. #574
  • TCPClient (from TCPServer) reports remote IP address. #551
  • Configurable format in Time.timeStr(), including ISO 8601. #455
  • Servo.trim(adjust) to allow small adjustments to the stationary point. #120
  • Time set from the cloud accounts for network latency. #581
  • String(Printable) constructor so any Printable can be converted to a string. example
  • Fluent API on String - many methods return *this so method calls can be chained.
  • Small values passed to delay(1) result in more accurate delays. #260
  • Bootloader does not show factory reset modes if a factory reset image is not available. #557

BUGFIXES

  • Listening mode re-enters listening mode after credentials are given. #558
  • String function dtoa() has problems with larger numbers. #563
  • System doesn’t set color of RGB LED when RGB.control(true) is called. #362, #472 and #544
  • WiFi.SSID() may not return previous network when switching. #560
  • [photon] System.sleep(5) not turning Wi-Fi back on after 5 seconds. #480
  • regression: floating point support in sprintf not compiled in. #576
  • [photon] SPI1 default clock speed was 7.5MHz, changed to 15MHz, same as for SPI.
  • TCPClient::connected() doesn’t detect when the socket is closed #542
  • dfu-util: error during downlod get_status msg removed when using :leave option #599
  • [Core] A0 could not be used as an output #595
  • Reinstate CFOD handling on the Photon.
11 Likes

Here’s a recap on how to get system firmware to your devices:

  • Update from Build (Web IDE) or CLI by flashing a new application. (Note that with the CLI you must use particle flash rather than particle compile. This will flash 3 binaries - the application, system-part1 and system-part2. Do not interrupt the process. If the process is interrupted, then re-flash the application to reapply system firmware.

  • At present, flashing from Particle Dev DOES NOT update system firmware. In that case, you need to update via the CLI. See below.

  • Updating via the CLI either using DFU mode or an OTA update. Both approaches are described here.

Thanks :smile:

6 Likes

Firmware release 0.4.6 has shipped for all platforms.

Changes in 0.4.6

FEATURES

ENHANCEMENTS

  • [photon] WiFi.selectAntenna() setting is persistent, so the last selected antenna is used when the
    device is in safe mode. [#618]
  • Detect when the cloud hasn’t been serviced for 15s and disconnect, so device LED state accurately
    reflects the connection state when the application loop has stalled. #626
  • Compile-time checks for Particle.variable() #619
  • [photon] Increased retry count when connecting to WiFi. #620
  • Setup button events #611

BUGFIXES

  • UDP.receivePacket() would fail if UDP.setBuffer() hadn’t been called first. Thanks @r2jitu.
  • [photon] Default SS pin for SPI1 now set to D5. #623
  • [photon] Long delay entering listening mode. #566
  • [photon] Solid green LED when WiFi network cannot be connected to due to invalid key. (The LED now blinks.)
  • [photon] Storing more than 2 Wi-Fi credentials would sometimes give unpredictable results.
  • [photon] TX/RX pins did not work after entering listening mode. #632
  • [photon] Improvements to I2C for MCP23017 / Adafruit RGBLCDShield. #626
  • [photon] Incorrect wakeup time set for sleep. #653

Have comments or questions about this release? Let’s head over to the Particle Firmware Update Comments thread.

13 Likes

API Changes in 0.4.6

Please note that the Particle.variable() API was changed to include stricter checks for variables. If you see a compiler error on code that has previously worked, this is an indication that the code wasn’t calling the API correctly.

For reference, the 3 types of variables are declared like this:

char string_variable[30];  // change 30 to be as large as is needed to store the string value
int int_variable;
double double_variable;

Particle.variable("string", string_variable, STRING);
Particle.variable("int", &int_variable, INT);
Particle.variable("double", &double_variable, DOUBLE);

In particular, you’ll notice that the STRING variable does not need the ampersand (&) in front of the variable name.

4 Likes

:particle: :particle: Firmware 0.4.7 has shipped!! :particle: :particle:

(A recap on how to update.)

FEATURES

ENHANCEMENTS

  • [multithreading] Application thread continues to run in listening mode
  • [multithreading] Particle.process() called from the application thread pumps application messages #659
  • Particle.variable() supports Strings #657
  • Simplified Particle.variable() API - variable type parameter is optional, and variables are passed by reference so &'s are not required.
  • I2C will generate STOP and SW Reset immediately if Slave Acknowledge failure is detected (must use pull-up resistors), instead of taking 100ms. commit

BUGFIXES

  • TCPClient unstable #672
  • Photon frequently SOS’s immediately following cloud re-connect #663
  • String.toLower() has no affect on string. #665
  • SOS due to WICED socket handlers being called when socket is disposed. #663 #672
  • Application constructors executed after RTOS startup so that HAL_Delay_Milliseconds() can be called. This may mean that STARTUP() code executes just a little later than before, but
    can safely use all public APIs.
  • Ensure bootloader region is write protected.
  • White breathing LED on exiting listening mode. #682
  • WICED not resolving DNS names with 4 parts (it was trying to decode as an IP address.)
  • SoftAP via HTTP would fail on Safari due to request sent as multiple TCP packets. Fixed WICED HTTP server. #680
  • Retained variables are not persisting, even without reset or deep sleep. #661
  • Backup RAM enabled for monolithic builds #667
  • Pure virtual call on creation of low priority std::thread #652
21 Likes

:particle: :particle: Firmware 0.4.9 has shipped!! :particle: :particle:

FEATURES

ENHANCEMENTS

  • System.freeMemory() shows an accurate value for free memory rather than the highwater mark for the heap.
  • [threading] Entering listening mode does not block the system thread. #788
  • [threading] System times out waiting for unresponsive application when attempting to reset. #763
  • [threading] Particle.publish() doesn’t block when in listening mode. #761
  • [threading]. delay()/Particle.process() pumps application events.
  • Serial, Serial1, SPI and EEPROM global objects guaranteed to be initialized before use. (Prevents White breathing LED if Serial used in a global instance constructor.)
  • Software Timers have an option for one-shot timers, and support class member function callbacks.

BUGFIXES

  • RSA key generation would sometimes produce invalid keys. #779
  • Static IP configuration was not being used.
  • Interrupt on WKP with class method as an ISR #819
  • Memory leak configuring WiFi credentials via SoftAP (TCP/HTTP)
  • SPI DMA transfer callback invoked too early #791
  • Unset wiced_result_t for tcp clients in socket_send. #773
  • Update bootloader to support System.enterSafeMode(). #751
  • [threading] WiFi.listen(false) remains in listen mode. #743
  • Factory Reset doesn’t clear WiFi credentials until network.connect(). #736
  • Comparison between IPAddress objects does not always work. #715
  • P1 dfu-util 0.8 does not read/write from External Flash. #706
  • DFU errors writing to flash silently ignored. #813
  • [threading] heap allocation not thread-safe. #826
  • System crash when button interrupt occurs during i2c transmission. #709
  • [photon] 'analogWrite()` to DAC pins. #671
  • [photon] analogWrite() to DAC pins requires pinMode() each time. #662
  • [photon] System.sleep(pin,edge) doesn’t wake. #655
13 Likes

##:particle: :particle: Firmware 0.5.0-rc.1 Pre-release is out on the Build IDE for Core/Photon/P1/Electron :particle: :particle:

Note: This is a pre-release and is not intended for production yet. 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.

v0.5.0-rc.1 Changelog

FEATURES

ENHANCEMENTS

  • Compiler error with variable/function names that are too long. #883
  • DFU writes are verified #870
  • [Electron] NO_ACK flag on Particle.publish() disables acknoweldgements reducing data use #862
  • [Electron] Allow session to resume when IP changes. #848
  • [Electron] Ensure published events are received by the cloud before sleeping. #909
  • [Electron] SLEEP_NETWORK_STANDBY on System.sleep() #845
  • Serial baudrate to select ymodem mode includes listening mode #912
  • Wi-Fi connection process forced to timeout after 60 seconds if unsuccessful #898
  • Added write-verify-retry-fail logic to DFU writes #870
  • Support for USART (Serial1/2/4/5) data bits, parity and stop bits #757

BUGFIXES

  • targets program-cloud, program-dfu can be used without requiring all and will built the firmware correctly. #899
  • [Electron] Free socket when the socket is closed remotely #885
  • Extended CAN filters #857
  • I2C does not ensure a stop condition completes correctly in endTransmission #856
  • DAC1/2 possible problem with digitalWrite() after analogWrite() #855
  • Servo HAL: Do not disable timer if some of its channels are still in use #839
  • USB driver fixes and Serial.available() not returning values greater than 1 #812 #669 #846 #923
  • SOS During WiFi.scan() #651

INTERNALS

  • dynalib: compile-time check for certain types of ABI breaking changes #895

Updating System Firmware (and optionally adding Tinker)

To update your device, compile and flash your application in the Build IDE, selecting version 0.5.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.5.0-rc.1-core.bin

Photon:

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

P1:

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

Electron:

particle flash YOUR_DEVICE_NAME system-part1-0.5.0-rc.1-electron.bin
particle flash YOUR_DEVICE_NAME system-part2-0.5.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.11.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.5.0-rc.1-core.bin

Photon:

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

P1:

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

Electron:

particle flash --usb system-part1-0.5.0-rc.1-electron.bin
particle flash --usb system-part2-0.5.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.5.0-rc.1-core.bin

Photon:

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

P1:

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

Electron:

dfu-util -d 2b04:d00a -a 0 -s 0x8020000 -D system-part1-0.5.0-rc.1-electron.bin
dfu-util -d 2b04:d00a -a 0 -s 0x8040000 -D system-part2-0.5.0-rc.1-electron.bin
dfu-util -d 2b04:d00a -a 0 -s 0x8080000:leave -D tinker-0.5.0-rc.1-electron.bin

Downgrading from 0.5.0-rc.x to current default firmware

Current defaults

Core: v0.4.9
Photon: v0.4.9
P1: v0.4.9
Electron: v0.4.8-rc.6

The easiest way to downgrade from a 0.5.0-rc.x 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.11.0 or newer. 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.5.0-rc.x 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.5.0-rc.x 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.

7 Likes

##:particle: :particle: Firmware 0.5.0-rc.2 Pre-release is out on the Build IDE for Core/Photon/P1/Electron :particle: :particle:

Note: This is a pre-release and is not intended for production yet. 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.

v0.5.0-rc.2 Changelog

FEATURES

  • Added SYSTEM_FLAG_WIFITEST_OVER_SERIAL1 which is disabled by default. Tinker enables this by default so that the Wi-Fi Tester is available during manufacturing. Also ensures TX/RX pins are not used for Serial1 by default, in case you want to use these as GPIO. 945

ENHANCEMENTS

  • Timer::isActive() function added #950
  • mbedtls headers are private to the communications module now, so user applications can include their own version of mbedtls

BUGFIXES

  • Soft AP Claim code fix #956
  • Variable template fix #952
  • TCPClient on Electron not receiving all of the data for small files #896

System Binaries (all devices) & Device Updater (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.5.0-rc.2 (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.5.0-rc.2-core.bin

Photon:

particle flash YOUR_DEVICE_NAME system-part1-0.5.0-rc.2-photon.bin
particle flash YOUR_DEVICE_NAME system-part2-0.5.0-rc.2-photon.bin
particle flash YOUR_DEVICE_NAME tinker (optional)

P1:

particle flash YOUR_DEVICE_NAME system-part1-0.5.0-rc.2-p1.bin
particle flash YOUR_DEVICE_NAME system-part2-0.5.0-rc.2-p1.bin
particle flash YOUR_DEVICE_NAME tinker (optional)

Electron:

particle flash YOUR_DEVICE_NAME system-part1-0.5.0-rc.2-electron.bin
particle flash YOUR_DEVICE_NAME system-part2-0.5.0-rc.2-electron.bin
particle flash YOUR_DEVICE_NAME tinker (optional)

The local method over USB using Particle CLI

This requires CLI version 1.11.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.5.0-rc.2-core.bin

Photon:

particle flash --usb system-part1-0.5.0-rc.2-photon.bin
particle flash --usb system-part2-0.5.0-rc.2-photon.bin
particle flash --usb tinker (optional)

P1:

particle flash --usb system-part1-0.5.0-rc.2-p1.bin
particle flash --usb system-part2-0.5.0-rc.2-p1.bin
particle flash --usb tinker (optional)

Electron:

particle flash --usb system-part1-0.5.0-rc.2-electron.bin
particle flash --usb system-part2-0.5.0-rc.2-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.5.0-rc.2-core.bin

Photon:

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

P1:

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

Electron:

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

Downgrading from 0.5.0-rc.x to current default firmware

Current defaults

Core: v0.4.9
Photon: v0.4.9
P1: v0.4.9
Electron: v0.4.8-rc.6

The easiest way to downgrade from a 0.5.0-rc.x 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.11.0 or newer. 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.5.0-rc.x 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.5.0-rc.x 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.

3 Likes

##:particle: :particle: Firmware 0.5.0 Release is out on the Build IDE for Core/Photon/P1/Electron - and the Particle CLI has been updated from 1.11.0 to 1.12.0 :particle: :particle:

Note: This is a Release and may be used for production. Any known issues are minor and mostly likely slated for 0.6.x release (check Github issues). It is available by default for all devices. To use, select the 0.5.0 version dropdown from the devices drawer.

Note: Some users previously had last used 0.5.0-rc.1 on various platforms. Since 0.5.0-rc.1 is no longer available, please reflash your devices with 0.5.0. This is technically the same as 0.5.0-rc.2. As usual, you will have to locally upgrade the Electron system firmware to 0.5.0 first. If you had 0.5.0-rc.1 on your Electron, it may show up as 0.4.8 in the IDE until you upgrade to 0.5.0.

v0.5.0 Changelog

FEATURES

ENHANCEMENTS

  • Timer::isActive() function added #950
  • mbedtls headers are private to the communications module now, so user applications can include their own version of mbedtls
  • Compiler error with variable/function names that are too long. #883
  • [Electron] NO_ACK flag on Particle.publish() disables acknoweldgements reducing data use #862
  • [Electron] Allow session to resume when IP changes. #848
  • [Electron] Ensure published events are received by the cloud before sleeping. #909
  • [Electron] SLEEP_NETWORK_STANDBY on System.sleep() #845
  • Serial baudrate to select ymodem mode includes listening mode #912
  • Wi-Fi connection process forced to timeout after 60 seconds if unsuccessful #898
  • Added write-verify-retry-fail logic to DFU writes #870
  • Support for USART (Serial1/2/4/5) data bits, parity and stop bits #757

BUGFIXES

  • Soft AP Claim code fix #956
  • Variable template fix #952
  • TCPClient on Electron not receiving all of the data for small files #896
  • targets program-cloud, program-dfu can be used without requiring all and will built the firmware correctly. #899
  • [Electron] Free socket when the socket is closed remotely #885
  • Extended CAN filters #857
  • I2C does not ensure a stop condition completes correctly in endTransmission #856
  • DAC1/2 possible problem with digitalWrite() after analogWrite() #855
  • Servo HAL: Do not disable timer if some of its channels are still in use #839
  • USB driver fixes and Serial.available() not returning values greater than 1 #812 #669 #846 #923
  • SOS During WiFi.scan() #651

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


Updating System Firmware (and optionally adding Tinker)

Build IDE (OTA)

To update your Core, Photon, or P1 over the air, compile and flash your application in the Build IDE, selecting version 0.5.0 in the devices drawer. Electron system firmware must be updated locally (see below) to minimize data usage, after which user applications can be flashed OTA from the Build IDE.

Particle CLI (easy method)

The easiest way to upgrade to 0.5.0 system firmware, is to use the CLI and run these commands. First upgrade the System firmware, then optionally put Tinker on the device. This requires CLI version 1.12.0 or newer. You can check with particle --version.

If you have the Particle CLI installed already, you can update it with the following command. Make sure the device is in DFU mode (flashing yellow LED) and run:

sudo npm update -g particle-cli
// Note: you can try without sudo first if you wish
  1. Make sure the device is in DFU mode and run:
particle update
  1. Optionally add Tinker as the user firmware instead of an app that you may currently have running on your device. Have the device in DFU mode and run:
particle flash --usb tinker

Particle CLI (OTA with individual binaries)

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

Note: Binaries are attached to the bottom of this release.

Core:

particle flash YOUR_DEVICE_NAME tinker-0.5.0-core.bin

Photon:

particle flash YOUR_DEVICE_NAME system-part1-0.5.0-photon.bin
particle flash YOUR_DEVICE_NAME system-part2-0.5.0-photon.bin
particle flash YOUR_DEVICE_NAME tinker (optional)

P1:

particle flash YOUR_DEVICE_NAME system-part1-0.5.0-p1.bin
particle flash YOUR_DEVICE_NAME system-part2-0.5.0-p1.bin
particle flash YOUR_DEVICE_NAME tinker (optional)

Electron:

particle flash YOUR_DEVICE_NAME system-part1-0.5.0-electron.bin
particle flash YOUR_DEVICE_NAME system-part2-0.5.0-electron.bin
particle flash YOUR_DEVICE_NAME tinker (optional)

Particle CLI (locally over USB with individual binaries)

Note: Binaries are attached to the bottom of this release.

Core:

particle flash --usb tinker-0.5.0-core.bin

Photon:

particle flash --usb system-part1-0.5.0-photon.bin
particle flash --usb system-part2-0.5.0-photon.bin
particle flash --usb tinker (optional)

P1:

particle flash --usb system-part1-0.5.0-p1.bin
particle flash --usb system-part2-0.5.0-p1.bin
particle flash --usb tinker (optional)

Electron:

particle flash --usb system-part1-0.5.0-electron.bin
particle flash --usb system-part2-0.5.0-electron.bin
particle flash --usb tinker (optional)

DFU-UTIL (locally over USB with individual binaries)

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 binaries attached to the bottom of this release, and run these commands:

Core:

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

Photon:

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

P1:

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

Electron:

dfu-util -d 2b04:d00a -a 0 -s 0x8020000 -D system-part1-0.5.0-electron.bin
dfu-util -d 2b04:d00a -a 0 -s 0x8040000 -D system-part2-0.5.0-electron.bin

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.

10 Likes