以前のリビジョンの文書です
AdvertiseのDiscoverableを有効にします。
advData.addFlags((GapAdvertisingData::Flags)(GapAdvertisingData::LE_GENERAL_DISCOVERABLE | GapAdvertisingData::BREDR_NOT_SUPPORTED));
AdvertiseにSHORTENED_LOCAL_NAMEを追加します。文字コードはUTF-8です。
const char* deviceName = "\xe3\x81\xa4\xe3\x81\xbcmbedHRM1017"; advData.addData(GapAdvertisingData::SHORTENED_LOCAL_NAME, (uint8_t*)deviceName, strlen(deviceName) + 1);
問題有り。ペアリング前はAdvertiseに含まれる名前を表示するが、ペアリング後は別の情報みたい。
GATTのDevice Information Serviceが必要か?
1. ハードウェアがBluetooth LEに対応しているか確認します。(デバイス マネージャー で、Microsoft Bluetooth LE Enumeratorが表示されていれば、Bluetooth LEに対応しています。)
2. mbed HRM1017をペアリングします。
チャーム > 設定 > PC設定の変更 > PCとデバイス > Bluetooth
デバイスが表示されない場合は、mbed HRM1017のGapAdvertisingData::LE_GENERAL_DISCOVERABLEフラグがONしているか確認してください。
EG Bluetooth Smart Device GATT Profile Checker で確認できます。
1. ストアから、EG Bluetooth Smart Device GATT Profile Checkerをインストールします。
2. EG Bluetooth Smart Device GATT Profile Checkerを起動します。
3.Bluetooth SMART Devicesに表示されているデバイスを選択します。