All Projects → androidthings → Sample Bluetooth Le Gattserver

androidthings / Sample Bluetooth Le Gattserver

Licence: apache-2.0
Build a Bluetooth GATT server with Android Things

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Sample Bluetooth Le Gattserver

Lantern
Transform any surface into mixed-reality using Raspberry Pi, a laser projector, and Android Things.
Stars: ✭ 403 (+153.46%)
Mutual labels:  android-things
Androidthings Drivers
Android Things open source peripheral drivers
Stars: ✭ 30 (-81.13%)
Mutual labels:  android-things
Sample Simpleui
Connect GPIO states with a graphical UI on Android Things
Stars: ✭ 116 (-27.04%)
Mutual labels:  android-things
Contrib Drivers
Open source peripheral drivers
Stars: ✭ 539 (+238.99%)
Mutual labels:  android-things
Awesome Android Things
A curated list of awesome android things tutorials, libraries and much more at one place
Stars: ✭ 883 (+455.35%)
Mutual labels:  android-things
Sample Usbenum
Discover connected devices using the Android USB Host APIs
Stars: ✭ 81 (-49.06%)
Mutual labels:  android-things
New Project Template
Stars: ✭ 265 (+66.67%)
Mutual labels:  android-things
Jlibmodbus
JLibModbus is an implementation of the Modbus protocol v1.1b in java language.
Stars: ✭ 149 (-6.29%)
Mutual labels:  android-things
Androidthings Googleassistant
Integrate Google Assistant into Android Things
Stars: ✭ 28 (-82.39%)
Mutual labels:  android-things
Sample Button
Basic input and output using a button and LED
Stars: ✭ 107 (-32.7%)
Mutual labels:  android-things
Sample Tensorflow Imageclassifier
Classify camera images locally using TensorFlow models
Stars: ✭ 623 (+291.82%)
Mutual labels:  android-things
Androidthings rainbowhatdemo
This Android Things project executes all the hardware that is on the Pimoroni Rainbow HAT for Android Things and Raspberry Pi 3
Stars: ✭ 17 (-89.31%)
Mutual labels:  android-things
Surviving With Android
Source code related to the posts in the blog
Stars: ✭ 1,275 (+701.89%)
Mutual labels:  android-things
Sample Googleassistant
Google Assistant API sample for Android Things
Stars: ✭ 460 (+189.31%)
Mutual labels:  android-things
Android Things Electricity Monitor
Electricity Monitor using Android Things and Firebase Realtime Database
Stars: ✭ 118 (-25.79%)
Mutual labels:  android-things
Doorbell
Cloud-based photo doorbell with companion app
Stars: ✭ 298 (+87.42%)
Mutual labels:  android-things
Android Sitemap
👓 Every link ever to Android Developer site.
Stars: ✭ 61 (-61.64%)
Mutual labels:  android-things
Drivers Samples
Peripheral driver samples
Stars: ✭ 153 (-3.77%)
Mutual labels:  android-things
Sample Bluetooth Audio
Bluetooth A2DP sample using Android Things
Stars: ✭ 146 (-8.18%)
Mutual labels:  android-things
Android Robocar
Build your own robocar, remote-controlled or autonomous, with Android Things.
Stars: ✭ 95 (-40.25%)
Mutual labels:  android-things

Bluetooth GATT Server Sample

This application demonstrates accessing the BluetoothGattServer Android API from within an Android Things application. The sample application advertises the Current Time Service, and implements the server role of the GATT Time Profile.

Pre-requisites

  • Android Things compatible board
  • Android device running Android 4.3 (API 18) or later
  • Android Studio 2.2+

Getting Started

  1. Import the project using Android Studio and deploy it to your board. The sample will automatically enable the Bluetooth radio, start a GATT server, and begin advertising the Current Time Service.
  2. Install the Android BluetoothLeGatt client sample on your Android mobile device.
  3. Use the client app to scan and connect to your Android Things board, and inspect the services and characteristics exposed by the GATT server.
  4. Read the value of the Current Time characteristic (0x2A2B).
  5. Register for notifications on the Current Time characteristic. The client receives an update once per minute with the latest time.
  6. Manually set the time on your board. The time change triggers a notification to the client.

Setting the Time

You can set the system clock date/time manually on your Android Things board with the date shell command over ADB. By default, the command accepts a new date in the MMddHHmmYYYY.ss format:

# Reboot ADB into root mode
$ adb root

# Set the date to 2017/12/31 12:00:00
$ adb shell date 123112002017.00

Setting the Time Zone

You can set the system time zone manually by updating the persist.sys.timezone system property over ADB.

# Reboot ADB into root mode
$ adb root

# Set the time zone to US Mountain Time
$ adb shell setprop persist.sys.timezone "America/Denver"

License

Copyright 2017 The Android Open Source Project, Inc.

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

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