How to Configure TX power and read BT address for nRF54L15 ?

Hi,

I want to know how to Configure TX power and read the BT address for nRF54L15.

Thanks,

PG

Parents
  • Hi,

    You can configure the CONFIG_BT_CTLR_TX_PWR_ANTENNA in your project configuration file (prj.conf). For example, if you want +8dBm (is 0 dBm by default), you can add CONFIG_BT_CTLR_TX_PWR_ANTENNA=8.

    To read the local identity address, you can call bt_id_get() after settings_load() (or bt_enable(NULL) if BT_SETTINGS==n).

    E.g.,

    	bt_addr_le_t bt_addr[CONFIG_BT_ID_MAX];
    	size_t count = CONFIG_BT_ID_MAX;
    	char addr_str[BT_ADDR_LE_STR_LEN];
    
    	bt_id_get(bt_addr, &count);
    
    	for (int i=0; i < count; i++) {
    		bt_addr_le_to_str(&bt_addr[i], addr_str, sizeof(addr_str));
    		printk("BT address %d: %s\n", i, addr_str);
    	}

    Best regards,

    Vidar

Reply
  • Hi,

    You can configure the CONFIG_BT_CTLR_TX_PWR_ANTENNA in your project configuration file (prj.conf). For example, if you want +8dBm (is 0 dBm by default), you can add CONFIG_BT_CTLR_TX_PWR_ANTENNA=8.

    To read the local identity address, you can call bt_id_get() after settings_load() (or bt_enable(NULL) if BT_SETTINGS==n).

    E.g.,

    	bt_addr_le_t bt_addr[CONFIG_BT_ID_MAX];
    	size_t count = CONFIG_BT_ID_MAX;
    	char addr_str[BT_ADDR_LE_STR_LEN];
    
    	bt_id_get(bt_addr, &count);
    
    	for (int i=0; i < count; i++) {
    		bt_addr_le_to_str(&bt_addr[i], addr_str, sizeof(addr_str));
    		printk("BT address %d: %s\n", i, addr_str);
    	}

    Best regards,

    Vidar

Children
Related