![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
北海道情報専門学校 ライフハック研究所のエンベデッドUSBチーム松葉和仁により開発されたUSBSecのmbedに使用するソースコード by 和仁
Dependencies: SDFileSystem MusicEngine
Fork of mbed-os-example-ble-LED by
北海道情報専門学校 ライフハック研究所 エンベデッドUSB USBSec用mbedプログラム
松葉和仁
Diff: source/main.cpp
- Revision:
- 33:26072cb714d9
- Parent:
- 32:c547412e77e3
- Child:
- 34:41da17c652f5
--- a/source/main.cpp Tue Feb 07 05:08:08 2017 +0000 +++ b/source/main.cpp Wed Feb 08 01:51:56 2017 +0000 @@ -644,6 +644,9 @@ char initialValueForINITGETCharacteristic = authenticationInformation; initServicePtr = new INITService(ble, initialValueForINITSETCharacteristic,initialValueForINITGETCharacteristic); + const uint8_t blePasscode[] = {1,1,1,1,1,1}; + ble.initializeSecurity(true,true,SecurityManager::IO_CAPS_NONE,blePasscode); + /* setup advertising */ /* BLEクライアントへの広告の設定 */ ble.gap().accumulateAdvertisingPayload(GapAdvertisingData::BREDR_NOT_SUPPORTED | GapAdvertisingData::LE_GENERAL_DISCOVERABLE);