diff --git a/nimble/host/src/ble_hs_startup.c b/nimble/host/src/ble_hs_startup.c index 4ad6694dd..68c6da460 100644 --- a/nimble/host/src/ble_hs_startup.c +++ b/nimble/host/src/ble_hs_startup.c @@ -24,7 +24,7 @@ #include "ble_hs_priv.h" static int -ble_hs_startup_le_read_local_ver_tx(void) +ble_hs_startup_read_local_ver_tx(void) { uint8_t ack_params[BLE_HCI_RD_LOC_VER_INFO_RSPLEN]; uint8_t ack_params_len; @@ -53,7 +53,7 @@ ble_hs_startup_le_read_local_ver_tx(void) static int ble_hs_startup_le_read_sup_f_tx(void) { - uint8_t ack_params[BLE_HCI_RD_LOC_SUPP_FEAT_RSPLEN]; + uint8_t ack_params[BLE_HCI_RD_LE_LOC_SUPP_FEAT_RSPLEN]; uint8_t ack_params_len; uint32_t feat; int rc; @@ -66,7 +66,7 @@ ble_hs_startup_le_read_sup_f_tx(void) return rc; } - if (ack_params_len != BLE_HCI_RD_LOC_SUPP_FEAT_RSPLEN) { + if (ack_params_len != BLE_HCI_RD_LE_LOC_SUPP_FEAT_RSPLEN) { return BLE_HS_ECONTROLLER; } @@ -278,7 +278,7 @@ ble_hs_startup_go(void) return rc; } - rc = ble_hs_startup_le_read_local_ver_tx(); + rc = ble_hs_startup_read_local_ver_tx(); if (rc != 0) { return rc; } diff --git a/nimble/include/nimble/hci_common.h b/nimble/include/nimble/hci_common.h index 52a676e0c..443c563e7 100644 --- a/nimble/include/nimble/hci_common.h +++ b/nimble/include/nimble/hci_common.h @@ -203,9 +203,13 @@ extern "C" { #define BLE_HCI_WR_AUTH_PYLD_TMO_LEN (2) /* --- Read local version information (OGF 0x04, OCF 0x0001) --- */ -/* NOTE: does not include status field in command complete event! */ -#define BLE_HCI_RD_LOC_VER_INFO_RSPLEN (8) -#define BLE_HCI_RD_LOC_SUPP_CMD_RSPLEN (64) +#define BLE_HCI_RD_LOC_VER_INFO_RSPLEN (8) /* No status byte. */ + +/* --- Read local supported command (OGF 0x04, OCF 0x0002) --- */ +#define BLE_HCI_RD_LOC_SUPP_CMD_RSPLEN (64) /* No status byte. */ + +/* --- Read local supported features (OGF 0x04, OCF 0x0003) --- */ +#define BLE_HCI_RD_LOC_SUPP_FEAT_RSPLEN (8) /* No status byte. */ /* --- Read RSSI (OGF 0x05, OCF 0x0005) --- */ #define BLE_HCI_READ_RSSI_LEN (2) @@ -219,7 +223,7 @@ extern "C" { #define BLE_HCI_RD_BUF_SIZE_RSPLEN (3) /* No status byte. */ /* --- LE read local supported features (OCF 0x0003) --- */ -#define BLE_HCI_RD_LOC_SUPP_FEAT_RSPLEN (8) +#define BLE_HCI_RD_LE_LOC_SUPP_FEAT_RSPLEN (8) /* No status byte. */ /* --- LE set random address (OCF 0x0005) */ #define BLE_HCI_SET_RAND_ADDR_LEN (6)