Code Monkey home page Code Monkey logo

particleupgradeviasoftap's Introduction

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.

particleupgradeviasoftap's People

Contributors

suprazz avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.