This is an example of BLE GATT Client, which receives broadcast data from BLE_Server_BME280 ( a GATT server) , then transfers values up to mbed Device Connector (cloud).

Please refer details about BLEClient_mbedDevConn below. https://github.com/soramame21/BLEClient_mbedDevConn

The location of required BLE GATT server, BLE_Server_BME280, is at here. https://developer.mbed.org/users/edamame22/code/BLE_Server_BME280/

Committer:
Ren Boting
Date:
Tue Sep 05 11:56:13 2017 +0900
Revision:
2:b894b3508057
Parent:
0:29983394c6b6
Update all libraries and reform main.cpp

Who changed what in which revision?

UserRevisionLine numberNew contents of line
edamame22 0:29983394c6b6 1 #!/bin/sh
edamame22 0:29983394c6b6 2 #
edamame22 0:29983394c6b6 3 # An example hook script to verify what is about to be committed.
edamame22 0:29983394c6b6 4 # Called by "git commit" with no arguments. The hook should
edamame22 0:29983394c6b6 5 # exit with non-zero status after issuing an appropriate message if
edamame22 0:29983394c6b6 6 # it wants to stop the commit.
edamame22 0:29983394c6b6 7 #
edamame22 0:29983394c6b6 8 # To enable this hook, rename this file to "pre-commit".
edamame22 0:29983394c6b6 9
edamame22 0:29983394c6b6 10 if git rev-parse --verify HEAD >/dev/null 2>&1
edamame22 0:29983394c6b6 11 then
edamame22 0:29983394c6b6 12 against=HEAD
edamame22 0:29983394c6b6 13 else
edamame22 0:29983394c6b6 14 # Initial commit: diff against an empty tree object
edamame22 0:29983394c6b6 15 against=4b825dc642cb6eb9a060e54bf8d69288fbee4904
edamame22 0:29983394c6b6 16 fi
edamame22 0:29983394c6b6 17
edamame22 0:29983394c6b6 18 # If you want to allow non-ascii filenames set this variable to true.
edamame22 0:29983394c6b6 19 allownonascii=$(git config hooks.allownonascii)
edamame22 0:29983394c6b6 20
edamame22 0:29983394c6b6 21 # Redirect output to stderr.
edamame22 0:29983394c6b6 22 exec 1>&2
edamame22 0:29983394c6b6 23
edamame22 0:29983394c6b6 24 # Cross platform projects tend to avoid non-ascii filenames; prevent
edamame22 0:29983394c6b6 25 # them from being added to the repository. We exploit the fact that the
edamame22 0:29983394c6b6 26 # printable range starts at the space character and ends with tilde.
edamame22 0:29983394c6b6 27 if [ "$allownonascii" != "true" ] &&
edamame22 0:29983394c6b6 28 # Note that the use of brackets around a tr range is ok here, (it's
edamame22 0:29983394c6b6 29 # even required, for portability to Solaris 10's /usr/bin/tr), since
edamame22 0:29983394c6b6 30 # the square bracket bytes happen to fall in the designated range.
edamame22 0:29983394c6b6 31 test $(git diff --cached --name-only --diff-filter=A -z $against |
edamame22 0:29983394c6b6 32 LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0
edamame22 0:29983394c6b6 33 then
edamame22 0:29983394c6b6 34 echo "Error: Attempt to add a non-ascii file name."
edamame22 0:29983394c6b6 35 echo
edamame22 0:29983394c6b6 36 echo "This can cause problems if you want to work"
edamame22 0:29983394c6b6 37 echo "with people on other platforms."
edamame22 0:29983394c6b6 38 echo
edamame22 0:29983394c6b6 39 echo "To be portable it is advisable to rename the file ..."
edamame22 0:29983394c6b6 40 echo
edamame22 0:29983394c6b6 41 echo "If you know what you are doing you can disable this"
edamame22 0:29983394c6b6 42 echo "check using:"
edamame22 0:29983394c6b6 43 echo
edamame22 0:29983394c6b6 44 echo " git config hooks.allownonascii true"
edamame22 0:29983394c6b6 45 echo
edamame22 0:29983394c6b6 46 exit 1
edamame22 0:29983394c6b6 47 fi
edamame22 0:29983394c6b6 48
edamame22 0:29983394c6b6 49 # If there are whitespace errors, print the offending file names and fail.
edamame22 0:29983394c6b6 50 exec git diff-index --check --cached $against --