Skip to content

Suprazz/ParticleUpgradeViaSoftAP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ParticleUpgradeViaSoftAP

Particle photon firmware upgrade over SoftAP.

You can upgrade the firmware of your Particle Photon connected over the SoftAP with a computer or Android phone connected to the SoftAP hotspot.

This is useful for devices that are off grid and needs firmware upgrade.

An exernal memory is required to do this because doing the upgrade directly in the myPage handler cause problems (always return an upgrade failed. No sure why and tired of wasting my time).. I'm using an external SPI flash IS25LQ080 with chip select on A7. SD card is supported too. Check generalDefines.h

At the moment, it doesn't work with an Iphone because there is an issue while reading the last part of the data with the body->read function. (I dont understand why but only the last buffer can't be read completly with the body->read functino... Maybe an other issue in the WICED.)

Connect to the hotspot, navitage to 192.168.0.1 and select a binary file generated by the online ide or compile using cli command particle compile photon c:\myapp

There is 2 important things to know with the code. 1- The TCP buffer must stay at 1152 bytes because there is a bug in the WICED libraries and doing 2 consecutive read less than 1152 bytes wont read continuous data. There will be data missing between the 2 read. 2- The maximum data that can be sent in one request is 65k including header. This is why the javascript functions are important. They separate the file in chunk of 60k if the file is bigger than 60k and send the next chunk when the first one is handled by the particle photon.

About

Particle photon firmware upgrade over SoftAP.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages