All Projects → ehidra → contact-tracer

ehidra / contact-tracer

Licence: MIT license
A prototype contact tracer app for COVID-19 pandemic response

Programming Languages

typescript
32286 projects
SCSS
7915 projects
HTML
75241 projects
javascript
184084 projects - #8 most used programming language
swift
15916 projects
java
68154 projects - #9 most used programming language
ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to contact-tracer

Node Ble
Bluetooth Low Energy (BLE) library written with pure Node.js (no bindings) - baked by Bluez via DBus
Stars: ✭ 159 (+218%)
Mutual labels:  bluetooth, ble
py-bluetooth-utils
Python module containing bluetooth utility functions, in particular for easy BLE scanning and advertising
Stars: ✭ 60 (+20%)
Mutual labels:  bluetooth, ble
H Ble
Android Ble类库,基于回调,暴露搜索、连接、发送、接收、断开连接等接口,无需关心细节操作即可进行Ble通信。
Stars: ✭ 171 (+242%)
Mutual labels:  bluetooth, ble
bluetooth-terminal
ES6 class for serial communication with your own Bluetooth Low Energy (Smart) devices
Stars: ✭ 43 (-14%)
Mutual labels:  bluetooth, ble
Golden Gate
Framework to connect wearables and other IoT devices to mobile phones, tablets and PCs with an IP-based protocol stack over Bluetooth Low Energy
Stars: ✭ 223 (+346%)
Mutual labels:  bluetooth, ble
Easyble
Android BLE framework
Stars: ✭ 155 (+210%)
Mutual labels:  bluetooth, ble
ganglion-ble
Web Bluetooth client for the Ganglion brain-computer interface by OpenBCI
Stars: ✭ 27 (-46%)
Mutual labels:  bluetooth, ble
Knob
Key Negotiation Of Bluetooth (KNOB) attacks on Bluetooth BR/EDR and BLE [CVE-2019-9506]
Stars: ✭ 131 (+162%)
Mutual labels:  bluetooth, ble
Esp32 Ble Mouse
Bluetooth LE Mouse library for the ESP32 (Arduino IDE compatible)
Stars: ✭ 180 (+260%)
Mutual labels:  bluetooth, ble
Continuity
Apple Continuity Protocol Reverse Engineering and Dissector
Stars: ✭ 180 (+260%)
Mutual labels:  bluetooth, ble
Esp32 Blecollector
ᛡᛒ BLE Scanner + Data persistence on SD Card for M5Stack, Odroid-Go, ESP32-Wrover-Kit and other models
Stars: ✭ 145 (+190%)
Mutual labels:  bluetooth, ble
BTLinker
🔥空祖家的蓝牙连接封装库,适用于智能硬件蓝牙通讯
Stars: ✭ 64 (+28%)
Mutual labels:  bluetooth, ble
Pedalinomini
Same features of Pedalino™ in a compact form.
Stars: ✭ 139 (+178%)
Mutual labels:  bluetooth, ble
Ble
Connect to and interact with Bluetooth LE peripherals.
Stars: ✭ 156 (+212%)
Mutual labels:  bluetooth, ble
Ble.net
Cross-platform Bluetooth Low Energy (BLE) library for Android, iOS, and UWP
Stars: ✭ 137 (+174%)
Mutual labels:  bluetooth, ble
Reactivebeacons
Android library scanning BLE beacons nearby with RxJava
Stars: ✭ 171 (+242%)
Mutual labels:  bluetooth, ble
Rf24ble
RF24BLE is the library that makes an nrf24L01+ chip (1$) into a BLE advertising beacon and can be used for LOW payload advertising like sensor data etc.
Stars: ✭ 129 (+158%)
Mutual labels:  bluetooth, ble
Web Bluetooth Terminal
Progressive Web Application for serial communication with your own Bluetooth Low Energy (Smart) devices
Stars: ✭ 130 (+160%)
Mutual labels:  bluetooth, ble
Androidblemanager
android BLE device scan and connect manager
Stars: ✭ 174 (+248%)
Mutual labels:  bluetooth, ble
Bluetooth
Cross-platform Bluetooth API for Go and TinyGo.
Stars: ✭ 246 (+392%)
Mutual labels:  bluetooth, ble

COVID-19 Contact Tracer

Note:

This project halted in April 2020 once Singapore open-sourced' their code. You should go to https://github.com/opentrace-community. This is here for historical reasons.

Background

COVID-19 is a disease caused by SARS-CoV-2 virus. It emerged in China in late 2019, and in the space of several months it has become a global pandemic. The disease causes respiratory failure in the most critical (approx 4%) cases.

Many countries have implemented lockdown measures to reduce the spread of the disease, and to alleviate pressure on their often overwhelmed health care systems. These measures appear to have been effective in China as, after several months in lockdown, it has now gone several days without recording any new locally transmitted infections.

It is therefore hoped that the physical distancing measures other countries have put in place will also result in fewer new infections over the coming weeks and months.

Once the daily new infections subside, policy makers will then need to consider how they can start easing physical distancing restrictions to get their economies and societies moving again. The obvious risk of this is that the virus will come back.

Researchers at Oxford University have proposed building a ‘contact tracer’ mobile app to mitigate this: https://045.medsci.ox.ac.uk/mobile-app Contact Tracer App

The idea is to create a smart phone app which could replace classical contact tracing when new cases of the disease occur. It would be much quicker to respond (hours rather than days) and much more scalable than traditional methods, making it possible to recommend self-isolation and quarantine measures quickly and efficiently to those affected.

The app could detect nearby devices or app users that it sees (possibly via Bluetooth, Wi-Fi Aware or similar) and record how long it came into contact with them. These could be stored in a local database on the device (better for scalability and privacy).

If an app user reports that they have a suspected or confirmed case of COVID19, this would be synchronised with all other devices so that they can be notified if they came in contact with them. The app could then recommend actions based on how close you came, and how long you spent with them.

Open Source Project

We would like to invite app developers from around the world to assist us in the creation of an open source implementation of such an app.

Requirements

The ideal app would be:

  • Able to communicate peer to peer over BLE, Bluetooth or Wifi
  • Cross platform on Android and iOS
  • Supported by as many devices as possible, but at least those 3-4 years old.
  • Able to scan devices while offline, e.g. when travelling underground or in a remote area without Internet access.
  • Able to run while in the background
  • Free to distribute (software only preferable)

Initially we were planning to identify all devices nearby by their bluetooth MAC addresses, however we now realise this is not feasible as, for privacy reasons, they are hidden from app developers in iOS, also some devices with randomise their MAC address when communicating with others and we are not sure if it is possible for an app developer to access all the addresses that have been used. Our current thinking is to use Bluetooth Low Energy (BLE) to exchange information through Generic Access Profile (GAP) and/or Generic Attribute Profile Services (GATT).

We have already begun working on a prototype, and are evaluating the following options:

Technology Pros Cons
Bluetooth LE Widely supported. No internet dependent. Hardware IDs available on Android. BLE Service Advertisement approach could work if we only want to track other app users. iOS hides hardware addresses, and replaces them with a UUID only valid for your device. The mapping algorithm is not public. We may be able to use BLE to advertise a service amongst app users, but it’s unclear whether Android can discover iOS apps that are advertising in the background.
iBeacon - app based Your phone can advertise a unique id given by the app itself and detect others Advertise ID only works for IOS Android can only detect
Beacon - hardware based Will work across devices and is used already.Beacon does the advertising and the App just monitors that your beacon is with you and looks for other beacons. Extra configuration for the beacons and extra cost for the devices (probably will need to choose just one type of device)
WiFi Aware
Nearby Connections API Uses WiFI Aware and Bluetooth LE recognising devices around you Only valid for Android
Nearby Messages API Valid for IOS and Android even though the connecting process is different of what we want for this Needs internet connection
p2pkit Seems to have a solution that has been tested already across IOS and Android Not updated for 3 years Needs internet connection
MultipeerConnectivity A framework for offline data transmission between Apple devices. Open source library available. Maybe only runs while the app is in the foreground? iOS only.
Wifi Direct Android only, not compatible with iOS."

We are primarily web app developers, so we are looking for engineers with experience in hardware communication who can help.

The prototype (working for IOS and Android)

At the end we decided to go with the Buetooth LE approach and we have build a prototype.

Contact Tracer Prototype on iOS

We are using Ionic 4 + Capacitor for it . If you want to have a go this should get you up and running quickly. We are relying heavily on this plugin https://github.com/randdusing/cordova-plugin-bluetoothle There are some issues we have still to solve but it does work.

At the moment Background mode only work for Android but IOS should be also possible just have to iron it out.

  • git clone repository
  • npm install within the repo root
  • ionic capacitor run android
  • ionic capacitor run ios

The whole point of the app is being able to recognise and connect to other devices no matter the platform and exchange UUID's. Then that should prove two people have been in contact. We have still to improve the proccess testing the scans and advertise as peripheral cycles. The results are stored in a in-app SQLite data base.

Mac development set up

Install Ionic and depencies

Following these instructions: https://ionicframework.com/docs/v3/developer-resources/platform-setup/mac-setup.html

Install Homebrew from https://brew.sh/

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

Install n (Node version manager)

brew install n

Update node to latest version

sudo n latest

Install Xcode from the App Store

Download Android Studio from https://developer.android.com/studio/ and run the installer. After installation, add the “command line tools” from Configure > Android SDK > SDK Tools NOTE: Couldn’t find ‘Android Support Repository’ - Android cli command not found

Install java

brew install java

Symlink it so that the OSX system Java wrappers can find this JDK, symlink it with

sudo ln -sfn /usr/local/opt/openjdk/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk.jdk

Install Cordova

sudo npm install -g cordova

Install Ionic

sudo npm install -g ionic

Capacitor dependencies

Install Ruby

brew install ruby
Add to .bash_profile   export PATH=/usr/local/opt/ruby/bin:$PATH

Install Xcode developer tools

xcode-select --install

Install cocoapods

sudo gem install cocoapods

Clone and build the project

Clone the project:

git clone [email protected]:ehidra/contact-tracer.git
cd contact-tracer

Run capacitor and other build tools

ionic capacitor run ios

npm install

npx cap sync ios

Open the project in Xcode better

npx cap open ios

Contributors

  • Paul Maunders - Memiah Limited - UK
  • Carlos Morillo Merino - eHidra - Spain
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].