GithubHelp home page GithubHelp logo

hynekbaran / mysensorsbootloaderrf24 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mysensors/mysensorsbootloaderrf24

0.0 0.0 0.0 103 KB

MySensors bootloader supporting over-the-air firmware updates

C 47.37% C++ 50.68% Makefile 1.96%

mysensorsbootloaderrf24's Introduction

MYSBootloader 1.3.0-rc.1

MySensors bootloader supporting over-the-air firmware updates

Technical details to write your own controller

All initialization the bootloader does (finding parent / requesting nodeId on first start) uses the same packets as a normal MySensors sketch. There is no need for the controller to distinguish between packets from the bootloader and packets from normal sketch execution. The controller only needs to care about two additional request/response communications. All communication is binary.

FirmwareConfig

  • the bootloader sends a RequestFirmwareConfig packet to the gateway to request information about the firmware it should execute:

    typedef struct {
     uint16_t type;
     uint16_t version;
     uint16_t blocks;
     uint16_t crc;
     uint16_t BLVersion;
    } RequestFirmwareConfig;

  • the gateway (the controller) responds with a NodeFirmwareConfig including details about the firmware the sensor should execute:

    typedef struct {
     uint16_t type;
     uint16_t version;
     uint16_t blocks;
     uint16_t crc;
    } NodeFirmwareConfig;

Firmware

  • the bootloader sends a RequestFirmwareBlock packet to the gateway to request a specific subset (block) of the compiled firmware:

    typedef struct {
     uint16_t type;
     uint16_t version;
     uint16_t block;
    } RequestFirmwareBlock;

  • the gateway (the controller) responds with a ResponseFirmwareBlock including the specific block of the compiled firmware:

    typedef struct {
     uint16_t type;
     uint16_t version;
     uint16_t block;
     uint8_t data[FIRMWARE_BLOCK_SIZE];
    } ResponseFirmwareBlock;

mysensorsbootloaderrf24's People

Contributors

tekka007 avatar akubi avatar bkdonline avatar sergiorius avatar soloam avatar enny1170 avatar gnalbandian 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.