Skip to content

jjinyy/ble-nrf52-multi-device-connection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ble-nrf52-multi-device-connection (BLE-Nordic---NRF52)

BLE multi-device connection system using Nordic nRF52. An Android app that connects to multiple wearable devices simultaneously and integrates sensor data for real-time visualization.

요약

image image image image image image


Purpose

Meaningful services from wearable devices require data from multiple devices to be unified and analyzable in one place. The goal was to go beyond single-device BLE connections and build simultaneous multi-device connectivity with integrated data visualization.


Core technical challenge

Implementing BLE multi-connection on Android Android's BLE API is fundamentally designed for single-device connections. Implemented multi-device connectivity by repeating the BluetoothDevice.connectGatt() + BluetoothGattCallback.onConnectionStateChange() sequence for each device independently. Redesigned the callback structure with per-device variables so each device can be accessed and managed independently.


System architecture

Nordic nRF52DK (hardware)
  + Heart rate sensor
    ↓
BLE GATT Profile (custom service/characteristic definitions)
    ↓
Android app (Java)
  — BLE scan and multi-device connection
  — Real-time data reception
  — SQLite storage + CSV export
  — Real-time and time-range graph visualization

Features

1. Device scan & connection

  • BLE device scanning and listing
  • Simultaneous multi-device connection

2. Data collection & storage

  • Real-time heart rate sensor data reception
  • SQLite database storage
  • CSV export (Bit field based data structure)

3. Data visualization

  • Real-time line graph rendering
  • Time-range data query and graph display
  • Simultaneous visualization of multiple connected devices

Design artifacts

  • System architecture diagram
  • BLE GATT profile design
  • Use case diagram
  • Sequence diagrams (data usage / device management)
  • Class diagrams (Bluetooth / visualization / data)
  • DB modeling / CSV modeling

Stack

Java Android BLE (Bluetooth Low Energy) Nordic nRF52DK GATT Profile SQLite


Structure

ble-nrf52-multi-device-connection/ ├── app/ │ └── src/main/java/ │ — BLE connection management │ — Real-time data reception │ — DB / CSV handling │ — Visualization (LineGraph, RealtimeData, SelecttimeData) └── build.gradle


설계

  1. 기본설계

image

  1. 프로파일 구조

image

  1. Use Case

image

  1. functional requirement 4-1. 데이터 사용 기능

image

4-1-1. Suquence Diagram

image image image image

4-2. WD 관리기능

image

4-2-1. Suquence Diagram

image image

기능구현

image image

  1. UI
  • image

  • 기기 스캔 및 연결 image

  • 데이터보기 image

  1. 하드웨어
  • Nordic nRF52DK

image image

  • 심박센서 연결

image image

  1. Visuallizaion
  • 시각화 Diagram image

  • Point class image

  • Linegraph classDiagram image

  • SelecttimeDataActivity ClassDiagram image

  • RealtimeDataActivity ClassDiagram image

  1. Bluetooth
  • Bluetooth ClassDiagram image

  • multiconnect BluetoothDevice # connectGatt ()를 한후 BluetoothGattCallback # onConnectionStateChange () 를 완료하고, 다른 기기 또한 이 과정을 반복하면서 진행해서 다중 연결을 한다. 기존의 함수에 새로운 변수들을 추가해서 각각의 함수에 접근할 때의 방법을 바꿔주었다.

image

  1. Database & CSV
  • DB 모델링 image

  • CSV 모델링 image

  • Bit field image

6 Profile

  • BLE GATT Profile image

  • 클래스 다이어그램 image

참고 (결과)

기기와 연결한 센서로 측정 / 실시간으로 값이 출력됨.

image image

그래프 출력 / 다중연결 image image

멀티연결 그래프 출력 image

About

BLE multi-device connection system for wearable devices using Nordic nRF52, enabling stable communication and device coordination.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages