BLE 보안 연결까지 완료 후 광고 LED 끄도록 변경
This commit is contained in:
@@ -578,7 +578,6 @@ static void connected(struct bt_conn *conn, uint8_t err)
|
||||
DBG_CORE("[BLE] Security requested level=%u\r\n", BLE_REQUIRED_SECURITY_LEVEL);
|
||||
#endif
|
||||
|
||||
led_set_state(LED_STATE_OFF);
|
||||
DBG_CORE("[BLE] Connected\r\n");
|
||||
}
|
||||
|
||||
@@ -660,6 +659,10 @@ static void security_changed(struct bt_conn *conn, bt_security_t level, enum bt_
|
||||
}
|
||||
|
||||
DBG_CORE("[BLE] Security ready level=%u\r\n", level);
|
||||
if (level >= BLE_REQUIRED_SECURITY_LEVEL)
|
||||
{
|
||||
led_set_state(LED_STATE_OFF);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user