This is an mbed side application meant to demonstrate how to create a custom GATT service/characteristic with Evothings.

Dependencies:   BLE_API mbed nRF51822

Intro

This code is meant to be run on an mbed enabled BLE board and paired with the mbed-evothings-customGATT smartphone application.

Details

This code is a demonstration of how to create a custom service (UUID=0xA0000) with two characteristics, a read only characteristic (UUID=0xA001) and a write characteristic (UUID=0xA002). What is written to the write characteristic will be copied across to the read characteristic and broadcast out. If a single byte is written it will be used to toggle the on board LED, if more than 1 byte is written the data will be written out to the terminal. The default max size is 10bytes.

Viewing Data

You can use either the LightBlue app on iOS or the nRF Master Control Panel application on Android to view the advertising data. Alternatively you can use a custom Evothings App to view the data.

Evothings?

Evothings is a rapid prototyping environment that uses cordova to enable you to rapidly develop smartphone applications in Javascript. Please download the Evothings workbench to your computer and the Evothings client to your smartphone. Then grab the code from the github page, drag and drop the index.htm file into Evothings workbench and run it on the Evothings client.

Reference

Revisions of main.cpp

Revision Date Message Actions
17:dfe796bba97c 2015-04-02 hotfix for API change File  Diff  Annotate
16:feee85aefb34 2015-04-02 updated libraries File  Diff  Annotate
13:62b1d32745ac 2015-03-17 minor prettification fixes File  Diff  Annotate
12:6d1f77d0cb37 2015-03-17 switched out characteristics with macros initializations and removed customservice.h; File  Diff  Annotate
11:b59226338001 2015-03-11 updated code with printf's for LED on / off File  Diff  Annotate
10:6acaa9f0ef85 2015-03-10 Finished for Alpha Release File  Diff  Annotate
9:b33f42191584 2015-03-09 Final Publishable version; File  Diff  Annotate
8:60ede963dfe2 2015-03-09 Got everything working File  Diff  Annotate
7:f6814152873c 2015-03-09 changed default name to match Evothings Example, added UUID's to braodcast in advertising packet File  Diff  Annotate
6:97b22b5bfbb8 2015-02-14 added writeCharCallback handler, now when something is written we can handle it File  Diff  Annotate
5:d0548c64e2e7 2015-02-14 added write characteristic handler. File  Diff  Annotate
4:7ef90665b399 2015-02-14 it compiles!!!! File  Diff  Annotate
3:0fb60f81f693 2015-02-14 Full skeleton in place, not working File  Diff  Annotate
2:e84c13abc479 2015-02-14 further updates to the example program, still incomplete File  Diff  Annotate
1:94152e7d8b5c 2015-02-14 added a little more skeleton to it, still needs to be fully flushed out, tossed the HeartRate service code into the custom service.h file, added link to Grove Colour Sensor example for inspiration for later File  Diff  Annotate
0:cd5b6733aeb1 2015-02-13 initial commit of skeleton for mbed-Evothings custom GATT service/characteristic example File  Diff  Annotate