Added Bluetooth pairing PIN output for rnodeconf
This commit is contained in:
parent
d63b8ff307
commit
683297b804
@ -32,6 +32,7 @@ char bt_devname[11];
|
||||
|
||||
void bt_confirm_pairing(uint32_t numVal) {
|
||||
bt_ssp_pin = numVal;
|
||||
kiss_indicate_btpin();
|
||||
if (bt_allow_pairing) {
|
||||
SerialBT.confirmReply(true);
|
||||
} else {
|
||||
|
@ -49,6 +49,7 @@
|
||||
#define CMD_FB_READL 0x44
|
||||
#define CMD_DISP_INT 0x45
|
||||
#define CMD_BT_CTRL 0x46
|
||||
#define CMD_BT_PIN 0x62
|
||||
|
||||
#define CMD_BOARD 0x47
|
||||
#define CMD_PLATFORM 0x48
|
||||
|
13
Utilities.h
13
Utilities.h
@ -26,6 +26,7 @@
|
||||
#endif
|
||||
|
||||
#if HAS_BLUETOOTH == true
|
||||
void kiss_indicate_btpin();
|
||||
#include "Bluetooth.h"
|
||||
#endif
|
||||
|
||||
@ -674,6 +675,18 @@ void kiss_indicate_frequency() {
|
||||
serial_write(FEND);
|
||||
}
|
||||
|
||||
void kiss_indicate_btpin() {
|
||||
#if HAS_BLUETOOTH
|
||||
serial_write(FEND);
|
||||
serial_write(CMD_BT_PIN);
|
||||
escaped_serial_write(bt_ssp_pin>>24);
|
||||
escaped_serial_write(bt_ssp_pin>>16);
|
||||
escaped_serial_write(bt_ssp_pin>>8);
|
||||
escaped_serial_write(bt_ssp_pin);
|
||||
serial_write(FEND);
|
||||
#endif
|
||||
}
|
||||
|
||||
void kiss_indicate_random(uint8_t byte) {
|
||||
serial_write(FEND);
|
||||
serial_write(CMD_RANDOM);
|
||||
|
Loading…
Reference in New Issue
Block a user