この文書の現在のバージョンと選択したバージョンの差分を表示します。
両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン | ||
kb:mbed-ble [2014/07/17 20:50] t-matsuoka |
kb:mbed-ble [2014/07/17 21:57] (現在) t-matsuoka [注意事項] |
||
---|---|---|---|
ライン 2: | ライン 2: | ||
{{projects:20140618e.jpg?400}} | {{projects:20140618e.jpg?400}} | ||
+ | ひょんなことから、発売前にmbed HRM1017を先行利用する機会に。 | ||
+ | mbedほぼ初めて。(mbed LPC1114でLチカしたくらい。) | ||
+ | Bluetooth初めて。もちろん、Bluetooth LEも初めてからの挑戦です~。 | ||
+ | (MLN松岡) | ||
- | ===== 小ネタ ===== | + | [[kb:mbed-ble:memo|日々のメモ]] |
- | ==== ペアリングできるようにするには? ==== | + | ===== 注意事項 ===== |
+ | *Nordic mkit向けのプログラムを流用するときは、クロックの設定を変更する必要があります。[[https://mbed.org/teams/Switch-Science/wiki/mbed-HRM1017をはじめよう#low-frequency-clock|参照]] | ||
+ | *Nordic mkit用ライブラリは大きく2種類あります。 | ||
+ | *{BLE_API_Native} | ||
+ | *{BLE_API+nRF51822} <- こちらが最新 | ||
+ | *mbed HRM1017用ライブラリに修正されたものはこちらです。 | ||
+ | *{BLE_API_Native}->{BLE_API_Native_IRC} | ||
+ | *{BLE_API+nRF51822}->なし(左記ライブラリがそのままmbed HRM1017で動くようになる予定) | ||
+ | *{BLE_API_Native}と{BLE_API+nRF51822}はAPI非互換のため、ライブラリを切り替えた場合はプログラムの修正が必要です。 | ||
- | AdvertiseのDiscoverableを有効にします。 | + | ===== BLE_Health_Thermometer_IRC ===== |
- | <code cpp> | + | *{BLE_API_Native_IRC}を使った、Health Thermometerのプログラムです。 |
- | advData.addFlags((GapAdvertisingData::Flags)(GapAdvertisingData::LE_GENERAL_DISCOVERABLE | GapAdvertisingData::BREDR_NOT_SUPPORTED)); | + | |
- | </code> | + | |
==== デバイス名を設定するには? ==== | ==== デバイス名を設定するには? ==== | ||
ライン 32: | ライン 42: | ||
{{kb:20140624a.png?200}} | {{kb:20140624a.png?200}} | ||
+ | ==== Windowsとペアリングできるようにするには? ==== | ||
+ | |||
+ | AdvertiseのDiscoverableを有効にします。 | ||
+ | <code cpp> | ||
+ | advData.addFlags((GapAdvertisingData::Flags)(GapAdvertisingData::LE_GENERAL_DISCOVERABLE | GapAdvertisingData::BREDR_NOT_SUPPORTED)); | ||
+ | </code> | ||
- | ===== Windows関連 ===== | + | ===== Windowsアプリ ===== |
+ | *Windowsは8以降でBluetooth LEに対応しています。 | ||
+ | *Windows 8以降で、Bluetooth LE用のNative APIがあります。 | ||
+ | *Windows 8.1以降で、Bluetooth LE用のWinRT APIがあります。 | ||
+ | *[[https://github.com/matsujirushi/mjwinble|mjwinble]]では、開発利便性と知識継続の観点から、WindowsデスクトップアプリからWinRT APIを呼び出す方法を選択しています。 | ||
==== Windows8と接続するには? ==== | ==== Windows8と接続するには? ==== |