BuildThingโข Beacon/IAQ SDK๋ Javascript๋ก ๊ตฌํ๋ Cross Platform SDK ์ ๋๋ค. Cordova ๋ฐ Node.js ๊ธฐ๋ฐ์ผ๋ก ๋์ํ๋ฉฐ, Cordova ํ๊ฒฝ์ iOS/Android, Electron ํ๊ฒฝ์ Windows/MacOS/Linux ์ดํ๋ฆฌ์ผ์ด์ ๋ฐฐํฌ๊ฐ ๊ฐ๋ฅํฉ๋๋ค. SDK์์ ์ ๊ณตํ๋ ์ฃผ์ ๊ธฐ๋ฅ๋ค์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
- BuildThingโข Beacon์ ์ค์บ ๋ฐ Advertising Packet ์์
- BuildThingโข Beacon ์ฐ๊ฒฐ ๋ฐ ๋น์ฝ ๊ฐ ์ค์
- BuildThingโข Beacon ์์ญ์ ์ง์ /์ดํ ์ด๋ฒคํธ ์์ (Monitoring)
- BuildThingโข Beacon ๊ณผ์ ๊ฑฐ๋ฆฌ ํ์ธ (Ranging)
- BuildThingโข IAQ ์ค์บ ๋ฐ Advertising Packet ์์
- ์ค์น
- ์ฌ์ฉ ๊ฐ์ด๋
- API ๋ฌธ์
- Scan Response
- Advertising Packet
- Connection Service
- ์ฐธ๊ณ ์ฌํญ
- ๊ณ ๊ฐ ๋ฌธ์
BuildThingโข Beacon/IAQ SDK์ ์คํ์ ์ํด์๋ Node.js 8.x ์ด์์ ํ์๋กํฉ๋๋ค.
$ npm install buildthing-ble-sdkiOS/Android ๋ฑ Mobile ํ๋ซํผ์ Codrova ๊ธฐ๋ฐ์ ๊ฐ๋ฐ ํ๊ฒฝ(e.g : Ionic Framework, PhoneGap ๋ฑ)์์ ์ฌ์ฉ ๊ฐ๋ฅํ๋ฉฐ, MacOS/Windows ๋ฑ Desktop ํ๋ซํผ์ Electron ๊ธฐ๋ฐ์ ๊ฐ๋ฐ ํ๊ฒฝ์์ ์ฌ์ฉ ๊ฐ๋ฅํฉ๋๋ค.
Ionic Framework, Phonegap ๋ฑ Cordova ๊ธฐ๋ฐ์ ๊ฐ๋ฐ ํ๊ฒฝ์ ์๋์ ๊ฐ์ด ํ๋ก์ ํธ Root ๋๋ ํ ๋ฆฌ์์ Cordova CLI ๋ฅผ ํตํด ์์กด Cordova ํ๋ฌ๊ทธ์ธ๋ค์ ์ค์น ํด์ผํฉ๋๋ค.
BLE ํต์ ์ ์ํ ํ๋ฌ๊ทธ์ธ ์ ๋๋ค.
# Cordova
$ cordova plugin add cordova-plugin-ble-central
# PhoenGap
$ phonegap cordova plugin add cordova-plugin-ble-central
# Ionic Framework
$ ionic cordova plugin add cordova-plugin-ble-central๋ฐฑ๊ทธ๋ผ์ด๋ ๋ชจ๋ ์ค์บ์ ์ง์ํ๊ธฐ ์ํ ํ๋ฌ๊ทธ์ธ ์ ๋๋ค.
# Cordova
$ cordova plugin add cordova-plugin-background-mode
# PhoneGap
$ phonegap cordova plugin add cordova-plugin-background-mode
# Ionic Framework
$ ionic cordova plugin add cordova-plugin-background-modeiOS๋ ๋ฐฑ๊ทธ๋ผ์ด๋ ๋ชจ๋ ์ค์บ์ ์ฌ์ฉํ๊ธฐ ์ํด์ ์๋๊ณผ ๊ฐ์ด cordova-custom-config ํ๋ฌ๊ทธ์ธ์ ์ถ๊ฐํ๊ณ config.xml์ UIBackgroundModes ๊ด๋ จ ์ค์ ์ ์ถ๊ฐํฉ๋๋ค.
# Cordova
$ cordova plugin add cordova-custom-config
# PhoneGap
$ phonegap cordova plugin add cordova-custom-config
# Ionic Framework
$ ionic cordova plugin add cordova-custom-config<platform name="ios">
<allow-intent href="itms:*" />
<allow-intent href="itms-apps:*" />
<config-file parent="UIBackgroundModes" target="*-Info.plist">
<array>
<string>bluetooth-central</string>
</array>
</config-file>
</platform>์๋์ ๊ฐ์ด buildthing-ble-sdk ๋ชจ๋์ ์ฌ์ฉํฉ๋๋ค. deviceready ์ด๋ฒคํธ ํจ์ (cordova ์ ์ ์ด๋ฒคํธ) ํธ์ถ๋ ์ดํ์ ์ฌ์ฉํด์ผ ์ ์์ ์ผ๋ก ๋์ํฉ๋๋ค.
const { Manager } = require('buildthing-ble-sdk')
var app = {
// Application Constructor
initialize: function() {
this.bleManager = null
this.bindEvents();
},
// Bind Event Listeners
//
// Bind any events that are required on startup. Common events are:
// 'load', 'deviceready', 'offline', and 'online'.
bindEvents: function() {
document.addEventListener('deviceready', this.onDeviceReady.bind(this), false);
},
// deviceready Event Handler
//
onDeviceReady: function() {
this.receivedEvent('deviceready');
// sdk test code
this.bleManager = new Manager()
this.bleManager.on('stateChange', function (state) {
console.log(state)
if(state === 'poweredOn') this.bleManager.startScan()
}.bind(this))
},
...
};
window.app = app
Cordova, PhoneGap CLI ๋ก ์์ฑํ ํ๋ก์ ํธ์ ๊ฒฝ์ฐ, ๊ธฐ๋ณธ ๋ฒ๋ค๋ฌ(Bundler)๊ฐ ์กด์ฌํ์ง ์์ต๋๋ค. ์ด์ ๋ฐ๋ผ, webpack, browserify ๋ฑ์ ๋ฒ๋ค๋ฌ๋ฅผ ํตํ์ฌ bundle.js๋ฅผ ์์ฑํ์ฌ ์ฌ์ฉํด์ผํ๋ฏ๋ก webpack ๋๋ browserify ๋ฑ๊ณผ ๊ฐ์ JS ๋ชจ๋ ๋ฒ๋ค๋ฌ๋ฅผ ์ค์นํฉ๋๋ค.
$ npm install -g webpack๋๋
$ npm install -g browserify์๋์ ๊ฐ์ด webpack.config.js ๋ฅผ ์์ฑํฉ๋๋ค.
// webpack.config.js
module.exports = {
entry: ['./www/js/index'],
module: {...},
output: {
chunkFilename: '[name].js',
filename: 'bundle.js',
path: path.resolve(__dirname, './www/dist/js')
},
...
}
์๋ ๋ช ๋ น์ด๋ฅผ ์ ๋ ฅํ์ฌ JS ํ์ผ์ ๋ฒ๋ค๋งํ๊ณ ./www/dist/js/bundle.js ํ์ผ์ ์์ฑํฉ๋๋ค.
$ webpack์๋ ๋ช ๋ น์ด๋ฅผ ์ ๋ ฅํ์ฌ JS ํ์ผ์ ๋ฒ๋ค๋งํ๊ณ ./www/dist/js/bundle.js ํ์ผ์ ์์ฑํฉ๋๋ค.
$ browserify ./www/js/index.js -o ./www/dist/js/bundle.js์๋์ ๊ฐ์ด index.html ์ ๋ฒ๋ค๋ง ๋ bundle.js๋ฅผ ์ฝ์ ํฉ๋๋ค.
<!-- www/index.html -->
<html>
<head>
...
</head>
<body>
<div class="app">
<h1>PhoneGap</h1>
<div id="deviceready" class="blink">
<p class="event listening">Connecting to Device</p>
<p class="event received">Device is Ready</p>
</div>
</div>
<script type="text/javascript" src="cordova.js"></script>
<!-- <script type="text/javascript" src="js/index.js"></script> -->
<script type="text/javascript" src="dist/js/bundle.js"></script>
<script type="text/javascript">
app.initialize();
</script>
</body>
</html>
Ionic Framework๋ iOS์์ ๊ธฐ๋ณธ์ ์ผ๋ก WKWebView๋ฅผ ์ฌ์ฉํ๋๋ฐ, ๊ด๋ จ ํ๋ฌ๊ทธ์ธ๊ณผ buildthing-ble-sdk์ ์์กด ํ๋ฌ๊ทธ์ธ์ธ cordova-plugin-background-mode ํ๋ฌ๊ทธ์ธ์ด iOS 12.2 ์์ ์ถฉ๋ํ๋ ์ด์๊ฐ ์กด์ฌํฉ๋๋ค. 2019๋ 5์ 10์ผ ๊ธฐ์ค, ์์ง ๋ฒ๊ทธ๊ฐ Fix ๋์ง ์์ ์ฐ๊ด ์ด์์ ๊ฐ์ด ํ๋ฌ๊ทธ์ธ์ iOS ์ฝ๋๋ฅผ ์์ ํด์ผ๋ง ์ ์ ๋์ ํฉ๋๋ค.
buildthing-ble-sdk ๋ ๋ค๋ฅธ Cordova ํ๋ฌ๊ทธ์ธ๋ค๊ณผ ๋ง์ฐฌ๊ฐ์ง๋ก deviceready ์ด๋ฒคํธ ํธ์ถ ์ดํ์ ์ฌ์ฉ๊ฐ๋ฅํฉ๋๋ค. ๋ฐ๋ผ์ Ionic 4 ๋ด Angular JS Component ์์ ์ฌ์ฉํ ๋์๋ ์๋ ์ฝ๋์ ๊ฐ์ด deviceready ์ด๋ฒคํธ ํธ์ถ ์ดํ์ ์ฌ์ฉํฉ๋๋ค.
// home.page.ts
import { Platform } from '@ionic/angular';
import { Manager } from 'buildthing-ble-sdk';
@Component({
selector: 'app-home',
templateUrl: 'home.page.html',
styleUrls: ['home.page.scss'],
})
export class HomePage {
public bleManager: Manager
constructor(public plt: Platform) {
// ionic ํ๋ ์์ํฌ ์ฌ์ฉ์, ๋ค์๊ณผ ๊ฐ์ ๋ฐฉ๋ฒ์ผ๋ก๋ cordovad์ deviceready ์ด๋ฒคํธ ์ฝ๋ฐฑ ํจ์๋ฅผ ์ ์ ๋ฐ ๋ฑ๋ก ํ ์ ์์ต๋๋ค.
this.plt.ready().then((readySource) => {
this.bleManager = new Manager()
this.bleManager.on('discover', function(beacon) { console.log(beacon) })
});
}
}
๊ฐ ์ด์ ์ฒด์ ๋ณ ํธํ๋๋ Node.js ๋ฐ Electron์ ๋ฒ์ ์ ํ์ธํ ํ์ SDK๋ฅผ ์ฌ์ฉํ๋ ๊ฒ์ ๊ถ์ฅํฉ๋๋ค.
| Windows | MacOS | |
|---|---|---|
| Node.js | v8.x, v10.x, v12.x | v8.x, v10.x, v12.x |
| Electron | v3.0.0 | v3.0.0, v8.0.0 |
| Ubuntu 16.04 (x86) | Ubuntu 18.04 (x86) | Ubuntu 19.10 (ARM64) | raspbian-buster-lite (ARM64) | |
|---|---|---|---|---|
| Node.js | v8,x, v10.x, v12.x | v8.x, v10.x, v12.x | v8.x, v10.x, v12.x | v8.x, v10.x, v12.x |
| Electron | v3.0.0 | v3.0.0 | v3.0.0 | ํด๋น ์์ |
Powershell ๋๋ cmd.exe ์์ ๊ด๋ฆฌ์ ๊ถํ์ผ๋ก ์คํ ๋ค windows-build-tools๋ฅผ ์ค์นํฉ๋๋ค.
$ npm install --global --production windows-build-toolsBluetooth 4.0 USB ์ด๋ํฐ๋ฅผ ์ํ์ฌ Zadig Tool์ ํตํด WinUSB ๋๋ผ์ด๋ฒ๋ฅผ ์ค์นํฉ๋๋ค. WinUSB ๋๋ผ์ด๋ฒ ์ค์น๋ BuildThing beacon ๊ด๋ฆฌ์ ์ฑ ์ฌ์ฉ์ ๋งค๋ด์ผ ๋ด Windows ์ง์ ๋ธ๋ฃจํฌ์ค ์ฅ์น ๋ฐ ์คํ ๊ฐ์ด๋๋ฅผ ์ฐธ๊ณ ํฉ๋๋ค.
Windows ํ๊ฒฝ์์ ๊ธฐ๋ณธ์ ์ผ๋ก ์ง์ํ๋ ๋ธ๋ฃจํฌ์ค ์ฅ์น๋ ์๋์ ๊ฐ์ต๋๋ค.
| ์ฅ์น ์ด๋ฆ | USB VID | USB PID |
|---|---|---|
| Qualcomm Atheros QCA61x4 | 0CF3 | E300 |
| Broadcom BCM20702A0 | 0A5C | 21E8 |
| Broadcom BCM20702A0 | 19FF | 0239 |
| CSR(Cambridge Silicon Radio) | 0A12 | 0001 |
| ASUS BT400 | 0B05 | 17CB |
| Intel 6235 | 8087 | 07DA |
| Intel 7260 | 8087 | 07DC |
| Intel 7265 | 8087 | 0A2A |
| Intel 8265 | 8087 | 0A2B |
| Broadcom BCM20702A1 | 0489 | E07A |
| Broadcom BCM2045A0 | 0A5C | 6412 |
| Belkin BCM20702A0 | 050D | 065A |
์ ๋ชฉ๋ก์ ์กด์ฌํ์ง ์๋ ๋ธ๋ฃจํฌ์ค ์ฅ์น์ ๊ฒฝ์ฐ, ๋ธ๋ฃจํฌ์ค ์ฅ์น์ USB VID, USB PID๋ฅผ ํ์ธํ ํ์ ํด๋น ๊ฐ์ ์๋์ ์์์ ๊ฐ์ด ์คํ ํ๊ฒฝ์์ ํ๊ฒฝ๋ณ์๋ฅผ ์ถ๊ฐํ์ฌ ์ฌ์ฉํฉ๋๋ค.
set BLUETOOTH_HCI_SOCKET_USB_VID=0x8087
set BLUETOOTH_HCI_SOCKET_USB_PID=0x0aaa- Xcode๋ฅผ ์ค์นํฉ๋๋ค.
- libbluetooth-dev ํจํค์ง ๋ฑ์ ๋ค์ ์ปค๋งจ๋๋ฅผ ํตํด ์ค์นํฉ๋๋ค.
$sudo apt-get install bluetooth bluez libbluetooth-dev libudev-dev- ์ถ๊ฐ์ ์ผ๋ก ๋ฆฌ์์ค ์ ๊ทผ ๊ถํ ๋ฌธ์ ๋๋ฌธ์ root/sudo ์ปค๋งจ๋๋ก app ์ ๋์ ์์ปค๋, ๋ค์ ์ปค๋งจ๋๋ก node binary ์ ๊ถํ์ ์ฃผ์ด์ app ์ ์คํ ์์ผ์ผ ํฉ๋๋ค.
$sudo setcap cap_net_raw+eip $(eval readlink -f `which node`)buildthing-ble-sdk 1.1.4 ๋ฒ์ ์ด์๋ถํฐ ์ง์ํฉ๋๋ค.
const buildthing = require('buildthing-ble-sdk')
const Manager = buildthing.Manager
const bleManager = new Manager()
bleManager.on('stateChange', (state) => {
if (state === 'poweredOn') main()
})
bleManager.on('discover', (beacon) => {
console.log(beacon)
})
function main() {
bleManager.startScan()
}
Electron ์์ ์ฑ์ ๋น๋/ํจํค์ง ํ ๋ ์ฌ์ฉํ๋ ๋ ธ๋ ๋ชจ๋ ์ ๋๋ค. ์๋์ ๋ช ๋ น์ด๋ก Electron ํ๋ก์ ํธ์ ์ค์นํฉ๋๋ค.
$ npm install electron-packager --save-dev์์ธํ ์ค์ ๋ฐ ์ฌ์ฉ ๋ฐฉ๋ฒ์ electron-packager ์์ ํ์ธํ ์ ์์ต๋๋ค.
electron-packager ๋ก ๋น๋๋ฅผ ์ํํ๋ ๊ฒฝ์ฐ, package.json ๋ด dependencies์ buildthing-ble-sdk๋ฅผ ๋ช ์ํด์ผ๋งํฉ๋๋ค.
{
"name": "electron-quick-start",
"version": "1.0.0",
"description": "A minimal Electron application",
"main": "main.js",
"scripts": {
"start": "electron .",
"build": "electron-packager . --overwrite"
},
"repository": "https://github.com/electron/electron-quick-start",
"keywords": [
"Electron",
"quick",
"start",
"tutorial",
"demo"
],
"author": "GitHub",
"license": "CC0-1.0",
"devDependencies": {
"electron": "^3.0.8",
"electron-packager": "^13.1.1"
},
"dependencies": {
"buildthing-ble-sdk": "^1.1.6"
}
}
Windows ๊ฐ๋ฐ ํ๊ฒฝ ์ค์ : ๋ถํ์ ์์กด ๋ชจ๋ ์ญ์ ๋ฐ ์ฌ๋น๋ ์ํ (SDK v1.1.5 ์ดํ(buildthing-beacon-sdk) ํ์ ์ฌํญ)
Electron์ Windows ์์ ์ฌ์ฉํ๋ ๊ฒฝ์ฐ, Electron ํ๋ก์ ํธ ๋ด /node_modules/ ์ ์ค์น๋๋ noble-mac์ ์ญ์ ํ๊ณ /node_modules/buildthing-beacon-sdk/package.json ๋ด dependencies ์์ noble-mac์ ์ ๊ฑฐ ํฉ๋๋ค. ์ดํ node_modules/.bin/electron-rebuild ๋ฅผ ์คํ์์ผ์ผ, ์ดํ์ ์ ์์ ์ผ๋ก electron ๋น๋๊ฐ ๊ฐ๋ฅํฉ๋๋ค.
์๋์ ๊ฐ์ด renderer.js(Renderer Process)์์ buildthing-ble-sdk๋ฅผ ์ฌ์ฉํ ์ ์์ต๋๋ค.
const { Manager } = require('buildthing-ble-sdk')
window.addEventListener("load", function(event) {
var bleManager = new Manager()
bleManager.on('discover', function(beacon) {
console.log(beacon)
})
bleManager.on('stateChange', function (state) {
if(state === 'poweredOn') bleManager.startScan()
})
window.bleManager = bleManager
});
Electron ๊ณผ vue.js ๋ฅผ ๊ฐ์ด ์ฌ์ฉ ํ๋ ๊ฒฝ์ฐ, electron-vue ๋ฅผ ์ด์ฉํด ํ๋ก์ ํธ ์ด๊ธฐ ๊ตฌ์ฑ์ ํ๋ ๊ฒ์ ๊ถ์ฅํฉ๋๋ค. ๋ค์๊ณผ ๊ฐ์ด buildthing-ble-sdk๋ฅผ ์ฌ์ฉ ํ ์ ์์ต๋๋ค.
// LandingPage.vue
<template>
<div id="wrapper">
...
<main>
<div>hello buildthing Beacon</div>
</main>
</div>
</template>
<script>
import SystemInformation from './LandingPage/SystemInformation'
import { Manager } from 'buildthing-ble-sdk'
export default {
name: 'landing-page',
components: { SystemInformation },
mounted () {
window.addEventListener("load", function(event) {
var bleManager = new Manager()
bleManager.on('discover', function(beacon) {
console.log(beacon)
})
bleManager.on('stateChange', function (state) {
if(state === 'poweredOn') bleManager.startScan()
})
window.bleManager = bleManager
});
}
}
</script>
<style>
...
</style>
Electron ๊ณผ React ๋ฅผ ๊ฐ์ด ์ฌ์ฉ ํ๋ ๊ฒฝ์ฐ, electron-react-boilerplate ๋ฅผ ์ด์ฉํด ํ๋ก์ ํธ ์ด๊ธฐ ๊ตฌ์ฑ์ ํ๋ ๊ฒ์ ๊ถ์ฅํฉ๋๋ค. ๋ค์๊ณผ ๊ฐ์ด buildthing-ble-sdk๋ฅผ ์ฌ์ฉ ํ ์ ์์ต๋๋ค.
import React, { Component } from 'react';
import { Manager } from 'buildthing-ble-sdk';
import styles from './Home.css';
type Props = {};
export default class Home extends Component<Props> {
props: Props;
constructor(props) {
super(props);
window.addEventListener("load", () => {
const bleManager = new Manager()
bleManager.on('discover', (beacon) => {
console.log(beacon)
})
bleManager.on('stateChange', (state) => {
if(state === 'poweredOn') bleManager.startScan()
})
window.bleManager = bleManager
});
}
render() {
return (
<div className={styles.container} data-tid="container">
<h2>hello !! BuildThing Beacon</h2>
</div>
);
}
}
Webpack์ ์ฌ์ฉํ์ง ์์ ๊ฒฝ์ฐ ์๋์ ๊ฐ์ด /node_modules/buildthing-ble-sdk/index.js๋ฅผ ์์ ํฉ๋๋ค.
// for Mobile (iOS, Android) (No Webpack Configuration)
var BuildThingBLE = require('./dist/buildthing.ble.cordova.js')
module.exports = BuildThingBLE
// for MacOS (No Webpack Configuration)
var BuildThingBLE = require('./dist/buildthing.ble.darwin.js')
module.exports = BuildThingBLE
// for Windows (No Webpack Configuration)
// for Windows - Node.js
// var BuildThingBLE = require('./dist/buildthing.ble.win32.node.js')
// for Windows - Electron
var BuildThingBLE = require('./dist/buildthing.ble.win32.electron.js')
module.exports = BuildThingBLE
// for Linux (No Webpack Configuration)
var BuildThingBLE = require('./dist/buildthing.ble.linux.js')
module.exports = BuildThingBLE
์๋์ ๊ฐ์ด Webpack.config.js ํ์ผ์์ alias ๋ฅผ ์ค์ ํ์ฌ ํ๋ซํผ ๋ณ๋ก ๋ค๋ฅธ buildthing-ble-sdk bundle ํ์ผ์ ์ฐธ์กฐํ์ฌ ๊ฐ๋ฐ์ด ๊ฐ๋ฅํฉ๋๋ค.
const path = require('path')
// Set Root Path
const ROOT_PATH = path.resolve(__dirname, '../')
const NODE_MODULE_PATH = '/node_modules/buildthing-ble-sdk/dist/'
//Target Platform
const CORDOVA_BUNDLE = 'buildthing.ble.cordova.js'
//const MACOS_BUNDLE = 'buildthing.ble.darwin.js'
//const WINDOWS_NODE_BUNDLE = 'buildthing.ble.win32.node.js'
//const WINDOWS_ElECTRON_BUNDLE = 'buildthing.ble.win32.electron.js'
//const LINUX_BUNDLE = 'buildthing.ble.linux.js'
//.. Webpack Config Object
resolve: {
alias: {
'buildthing-ble-sdk': ROOT_PATH + NODE_MODULE_PATH + CORDOVA_BUNDLE
}
}
ํ๋ซํผ ๋ณ ๋ผ์ด๋ธ๋ฌ๋ฆฌ ์ฌ์ฉ์ ์์ ์ฝ๋๋ ์๋์ ๊ฐ์ต๋๋ค.
import { Manager } from 'buildthing-ble-sdk'
var manager = new Manager()
manager.on('discover', function(beacon){...})
manager.startScan() //์ค์บ ์์
manager.stopScan() //์ค์บ ์ข
๋ฃ
์์ธํ API๋ ์๋ ๋ฌธ์๋ฅผ ์ฐธ๊ณ ํด์ฃผ์๊ธฐ ๋ฐ๋๋๋ค. API ๋ฌธ์ ๋ฐ๋ก๊ฐ๊ธฐ
BuildThing beacon ์ค์บ ์ํ ์, Scan Response๋ก ์์ ๋๋ Service UUID์ Service ๋ณ ์์ ๊ฐ์ ์๋์ ๊ฐ์ต๋๋ค. ์๋ Scan Response๋ BuildThing, iBeacon, Eddystone ๋ชจ๋ ๋ชจ๋ ๋์ผํฉ๋๋ค.
| ํญ๋ชฉ | Service UUID | ์์ ๊ฐ | ๋น๊ณ |
|---|---|---|---|
| Device Information & Firmware Version | 0x180A | 0x983006 ๋๋ 0x3006XX | 0x983006 : ํ์จ์ด v1.0, 0x3006XX : ํ์จ์ด vXX/10 (์ : 0x300611์ ํ์จ์ด v1.1) |
| Mac Address | 0xADD0 | Mac Address | - |
BuildThing IAQ ์ค์บ ์ํ ์, Scan Response๋ก ์์ ๋๋ Service UUID์ Service ๋ณ ์์ ๊ฐ์ ์๋์ ๊ฐ์ต๋๋ค.
| ํญ๋ชฉ | Service UUID | ์์ ๊ฐ | ๋น๊ณ |
|---|---|---|---|
| Device Information & Firmware Version | 0x180A | 0x3700XX | 0x3700XX: ํ์จ์ด vXX (์ : 0x370011์ ํ์จ์ด v1.1) |
| Mac Address | 0xADD0 | Mac Address | - |
BuildThing beacon์ BuildThing ๋ชจ๋ ์ธ iBeacon, Eddystone ๋ชจ๋์ Advertising Packet ์ ์ง์ํฉ๋๋ค. Advertising Packet์ ์์ ํ๊ธฐ ์ํ ๊ฐ ๋ชจ๋ ๋ณ UUID ๋ฐ Service UUID๋ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
| ๋น์ฝ ๋ชจ๋ | UUID | Service UUID |
|---|---|---|
| BuildThing | - | 0xBCBC |
| iBeacon | 0x0b2b0848-205f-11e9-ab14-820316983006 | - |
| Eddystone | - | 0xFEAA |
๋น์ฝ ๋ชจ๋ ๋ณ ์์ ๋๋ Advertising Packet Format์ ์๋์ ๊ฐ์ต๋๋ค.
BuildThing IAQ์ Advertising Packet์ ์์ ํ๊ธฐ ์ํ Service UUID๋ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
| ๋น์ฝ ๋ชจ๋ | UUID | Service UUID |
|---|---|---|
| IAQ | - | 0xBCBC |
์์ ๋๋ Advertising Packet Format์ ์๋์ ๊ฐ์ต๋๋ค.
์๋ Connection Service UUID๋ฅผ ํตํ์ฌ BuildThing beacon Connection Service์ ์ฐ๊ฒฐํฉ๋๋ค.
| ํญ๋ชฉ | Service UUID |
|---|---|
| Connection Service | 6E400001-B5A3-F393-E0A9-E50E24DCCA9E |
Connection์ด ์๋ฃ๋๋ฉด ์๋ 2๊ฐ์ Characteristic์ ์ ๊ทผํ ์ ์์ต๋๋ค.
| ํญ๋ชฉ | Characteristic UUID | ์์ฑ | ๋น๊ณ |
|---|---|---|---|
| ๋น์ฝ ๊ฐ ์ค์ | 6E400002-B5A3-F393-E0A9-E50E24DCCA9E | Read, Write | ๋น์ฝ ๊ฐ ์ ์ค์ ํ ์ ์์ต๋๋ค. |
| ๋น์ฝ ๊ฐ ์ค์ ๊ฒฐ๊ณผ | 6E400003-B5A3-F393-E0A9-E50E24DCCA9E | Notify | ๋น์ฝ ๊ฐ ์ค์ ์๋ฃ ํ Notify๋ฅผ ์์ ํ ์ ์์ต๋๋ค. |
๋น์ฝ ๊ฐ ์ค์ Characteristic์ ๊ฐ์ Writeํ์ฌ ๋น์ฝ ๊ฐ์ ์ค์ ํฉ๋๋ค. ์ค์ ์, ์๋์ ๊ฐ์ ์ ์ก ํจํท ํฌ๋งท์ผ๋ก Write ํฉ๋๋ค. ์ต์ด Password ๊ฐ์ 000000 ์ ๋๋ค.
๋น์ฝ๊ณผ ๊ธฐ๊ธฐ ๊ฐ์ ๊ฑฐ๋ฆฌ ๊ณ์ฐ์ ๋ํ์ฌ ํ ์คํธ๊ฐ ์๋ฃ๋ ๊ธฐ๊ธฐ ๋ชจ๋ธ์ ์๋์ ๊ฐ์ต๋๋ค.
| ํ๋ซํผ | ๋ชจ๋ธ๋ช |
|---|---|
| iOS | iPhone8, iPhoneX, iPhoneXS, iPad 9.7 5์ธ๋ |
| Android | Galaxy S8, Galaxy S9, Galaxy S10, Galaxy Note 9 |
Github Issue ์ธ ๊ธฐํ ๋ฌธ์ ์ฌํญ์ [email protected]๋ก ๋ฌธ์ํด์ฃผ์๊ธฐ ๋ฐ๋๋๋ค.

