This repository is an Android mobile application which demonstrates the mechanism to receive data from the inbuilt sensors (temperature and humidity) embeddded in an Arduino-Nano 33 and display the same in the Android device using Bluetooth LE.
- Arduino-Nano 33 BLE Sense, which advertises data. (GATT Server) [Refer: BLE_Thermostat.ino file in ArduinoBlePeripheralForAndroid repository]
- The mobile application, which receives data advertised by the peripheral device. (GATT Client) [Refer: Current Repository]
- Scan for BLE devices broadcasting Environmental-Sensing Service
- Connect to the BLE device
- Receive data advertised by the peripheral
- Environmental-Sensing Service
- Temperature (Characteristic Property: Read and Notify)
- Humidity (Characteristic Property: Read and Notify)
- Device-Information Service
- Manufacturer Name (Characteristic Property: Read)
- Manufacturer Model (Characteristic Property: Read)
- LED Service (Custom Service)
- LED Status (Characteristic Property: Write)
- Environmental-Sensing Service
- Activity:
- MainActivity - Allows user to scan for BLE devices of type Environmental-Sensing via Dialog and display them in BleDeviceAdapter along with data from BLE peripheral
- Service:
- BleConnectivityService (Bounded-service) - Performs asynchronous operations of connecting, disconnecting and receiving data from the peripheral and, communicates with the UI via Broadcast-Receiver
- Broadcast-Receivers:
- AclBroadcastReceiver - Broadcasts global events of connection and disconnection of BLE devices
Copyright 2021, Ranit Raj Ganguly
Licensed 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.