Coder Social home page Coder Social logo

hendrick404 / covidbracelet Goto Github PK

View Code? Open in Web Editor NEW

This project forked from covidbraceletprj/covidbracelet

0.0 0.0 0.0 1.65 MB

Covid Bracelet Code for Zephyr OS

License: Apache License 2.0

CMake 1.01% Python 9.78% C 78.93% C++ 10.05% Shell 0.23%

covidbracelet's Introduction

Contact Tracing Wristband Actions Status: test Actions Status: build

This project aims to add support the Exposure Notification (EN) protocol for tracing contacts from Apple and Google on low-power wristbands. It maintains full compatibility with smartphone Apps based on the EN protocol.

Note: this is a proof of concept and not ready for production
Contributions Welcome!

Features

  • Builds on Zephyr OS targetting the NRF52 BLE SOCs
  • Easy project setup using PlatformIO
  • Sends and receives exposure beacons as specified by Google and Apple for Covid Contact Tracing
    • Rolling, encrypted, anonymous beacons
    • Compatible with Apple iOS and Android phones
    • With rolling proximity identifiers and encrypted metadata
    • Proximity identifiers and BLE addresses change every 10 minutes
  • Stores own keys for 14 days
  • Stores contacts of more than 5 minute duration
  • Upon infection upload keys to a public database
  • Retrieve keys of infections from database
    • computes rolling proximity identifiers
    • compares to stored contacts to check for exposure

Note: as we for now do not use the flash for key storage, this currently only works on nrf52480 or you can just store a very small number of keys. Moving the keys to flash is on the TODO list and will fix this.

Getting Started

This project is based on platformIO for an easy setup process, see: https://platformio.org/platformio-ide.

Testing

To run the tests for the desktop environment select the task test for desktop or run:

platformio test -e desktop

Demo Video

Video Demo

Roadmap

Flash Support

  • Store long-term contacts in flash

Device Initialization

The devices need to be initialized:

  • Fix entropy: keys are always the same on boot up
  • Synchronize time
  • Set device name, user id or so in Flash (-> persistend configuration)

Device Synchronization

  • Extend beyond the simple (existing) basestation
  • Synchronize time
  • Get infections from DB, Check their signatures
  • Secure GATT services and authentication of base statation in general
  • Read keys form national databases

Extract Keys from Device

In case of an infection, the keys need to be extracted from the device:

  • Secure extraction of keys (Base version existing)

Device Updates Over the Air (OTA)

Securely updating many running devices over the air with signed firmware will greatly improve maintainability. Related feature branch: feature/ota

Logging

  • extensive logging: crash, reboot, battery level, charging state, contacts, memory useage, flash usage
  • Energy efficiency

Protocol Specifications

  • set scanning interval to the correct value, for now we just use the default
  • set advertisement interval, correct value, for now we just use the default: should be 200-270 milliseconds
  • set transmit power and store this in the corona beacons
  • extensive compatibility testing with Apple iOS and Android devices
  • BLE advertisements sets

Other

  • Contininous integration testing
  • More platforms: with display etc.

Possible Platforms

Possible platforms for real-world deployment many, as many of the cheap fitness trackers base on NRF52 or chips with similar capabilities. However, many would need the firmware to be shipped to manufactures.

  • Watch UI
  • Pine Time could be good for testing

Display

A basic visual interface based on LVGL is included. It can be tested on POSIX-compliant platforms by building it with the zephyr/build_native.sh script. SDL must be installed to provide a virtual display.

No risk contacts Low risk High risk

covidbracelet's People

Contributors

h1ghbre4k3r avatar prathje avatar olafland avatar hendrick404 avatar pinkit-cwa 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.