diff options
Diffstat (limited to 'keyboards/keychron/k4_pro/k4_pro.c')
-rwxr-xr-x[-rw-r--r--] | keyboards/keychron/k4_pro/k4_pro.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/keyboards/keychron/k4_pro/k4_pro.c b/keyboards/keychron/k4_pro/k4_pro.c index f3d3e679d9..4c3afbac5b 100644..100755 --- a/keyboards/keychron/k4_pro/k4_pro.c +++ b/keyboards/keychron/k4_pro/k4_pro.c @@ -189,7 +189,8 @@ void matrix_scan_kb(void) { #ifdef KC_BLUETOOTH_ENABLE static void ckbt51_param_init(void) { /* Set bluetooth device name */ - ckbt51_set_local_name(STR(PRODUCT)); + // ckbt51_set_local_name(STR(PRODUCT)); + ckbt51_set_local_name(PRODUCT); /* Set bluetooth parameters */ module_param_t param = {.event_mode = 0x02, .connected_idle_timeout = 7200, @@ -217,6 +218,21 @@ void bluetooth_enter_disconnected_kb(uint8_t host_idx) { } } +void ckbt51_default_ack_handler(uint8_t *data, uint8_t len) { + if (data[1] == 0x45) { + module_param_t param = {.event_mode = 0x02, + .connected_idle_timeout = 7200, + .pairing_timeout = 180, + .pairing_mode = 0, + .reconnect_timeout = 5, + .report_rate = 90, + .vendor_id_source = 1, + .verndor_id = 0, // Must be 0x3434 + .product_id = PRODUCT_ID}; + ckbt51_set_param(¶m); + } +} + void bluetooth_pre_task(void) { static uint8_t mode = 1; |