Coder Social home page Coder Social logo

bluetoothperipheralsimulator's Introduction

BluetoothPeripheralSimulator

Simulate various Bluetooth services which can be configured via a HTTP rest-ish interface. Currently only supports Mac OSX, although iOS support is planned. Once the app is started, an HTTP server is started on port 8000. This HTTP server can configure both the glucose and device_information profile. More profiles can be added easily.

HTTP Documentation

Peripheral Configuration

Add / Remove services.

POST peripheral/services/:service
DELETE peripheral/services/:service

Where :service is 'glucose' or 'device_information'.

Advertise

Update advertisement status

PUT peripheral/advertise?status=[on|off]&localName=<advertiseName>

Device Information Service

A simulated Device Information Service

Configure

PUT /service/device_information/:infokey?value=<STRING>

Where :infokey is:
    manufacturerName
    modelNumber
    serialNumber
    hardwareRevision
    firmwareRevision
    softwareRevision
    systemID

Fetch

GET /service/device_information/

Glucose Service

A simulated Glucose Service

Create Glucose Record

Create a new glucose value. A new record ID will be provided

POST /service/glucose?value=V&timestamp=TS&timestampOffset=TO

Fetch Glucose Records

Get all configured glucose values

GET /service/glucose

Delete Glucose Records

Delete specific glucose values using the specified record ID

DELETE /service/glucose/:id

Configure Glucose Service

Configure the features of the glucose service. Currently this just configures the returned data, although it could modify the behavior of the simulated glucose service in the future.

PUT /service/glucose/feature/:feature?status=[on|off]

Where :feature is:
    lowBatteryDurringMeasurementDetection
    sensorMalfunctionDetection
    sensorSampleSizeSupported
    sensorStripInsertionErrorDetectionSupported
    sensorResultHighLowDetectionSupported
    sensorTemperatureHighLowDetectionSupported
    sensorReadInterruptDetectionSupported
    generalDeviceFaultSupported
    timeFaultSupported
    multipleBondSupported

bluetoothperipheralsimulator's People

Stargazers

 avatar

Watchers

 avatar  avatar  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.