Skip to content

Commit

Permalink
nimble/host: Modify Advertising Tx power levels
Browse files Browse the repository at this point in the history
Spec ver 5.4 , Vol 4, Part E, section 7.8.6 mentions the range value for
Tx power level.

Different BLE spec version have modified the range values that Tx Power level
can have. Update the min / max macros to reflect the same
  • Loading branch information
rahult-github committed Jul 30, 2024
1 parent a9400d7 commit 9cb35ee
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions nimble/include/nimble/hci_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -1428,8 +1428,17 @@ struct ble_hci_vs_set_local_irk_cp {
#define BLE_HCI_ADV_PEER_ADDR_MAX (1)

/* --- LE advertising channel tx power (OCF 0x0007) */
#define BLE_HCI_ADV_CHAN_TXPWR_MIN (-20)
#define BLE_HCI_ADV_CHAN_TXPWR_MAX (10)
#if MYNEWT_VAL(BLE_VERSION) == 50
#define BLE_HCI_ADV_CHAN_TXPWR_MIN (-20)
#define BLE_HCI_ADV_CHAN_TXPWR_MAX (10)
#elif MYNEWT_VAL(BLE_VERSION) == 51
#define BLE_HCI_ADV_CHAN_TXPWR_MIN (-20)
#define BLE_HCI_ADV_CHAN_TXPWR_MAX (20)
#elif MYNEWT_VAL(BLE_VERSION) >= 52
#define BLE_HCI_ADV_CHAN_TXPWR_MIN (-127)
#define BLE_HCI_ADV_CHAN_TXPWR_MAX (20)
#endif


/* --- LE set scan enable (OCF 0x000c) */

Expand Down

0 comments on commit 9cb35ee

Please sign in to comment.