<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Implementing Set Tx Power command in USB CDC</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/116127/implementing-set-tx-power-command-in-usb-cdc</link><description>I am using the cdc_acm example and have added a command to set and read tx power. I am trying to use the following commands for this. 
 
 BT_HCI_OP_VS_WRITE_TX_POWER_LEVEL 
 
 
 BT_HCI_OP_VS_READ_TX_POWER_LEVEL 
 
 When I try to read or set tx power the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 08 Nov 2024 10:05:11 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/116127/implementing-set-tx-power-command-in-usb-cdc" /><item><title>RE: Implementing Set Tx Power command in USB CDC</title><link>https://devzone.nordicsemi.com/thread/509641?ContentTypeID=1</link><pubDate>Fri, 08 Nov 2024 10:05:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:015807fa-0583-468e-90c0-15697515a281</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;There is one thing sticking out here. You are setting&amp;nbsp;BT_HCI_VS_LL_HANDLE_TYPE_CONN and passing a handle that is never set. To set the power for a connection, you need to provide the handle to a active connection. Perhaps you should have set the advertising Tx power? That is done by&amp;nbsp;BT_HCI_VS_LL_HANDLE_TYPE_ADV (and any subsequent resulting connection will inherit that Tx power). This is also demonstrated in the hci_pwer_ctrl sample.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Implementing Set Tx Power command in USB CDC</title><link>https://devzone.nordicsemi.com/thread/509420?ContentTypeID=1</link><pubDate>Thu, 07 Nov 2024 11:09:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c2c404c0-01bd-448b-a365-c97387eb561b</guid><dc:creator>fowolabi</dc:creator><description>&lt;p&gt;Hello Einar,&lt;/p&gt;
&lt;p&gt;I have tried to copy and paste the implementation directly from the hci power control but still failing. I have the function outside of the shell command and then call it in the shell command with the value for tx power as the argument. I&amp;#39;ve attached my source code, the main.c has the implementation for the tx_power at the start of the code&amp;nbsp;&lt;pre class="ui-code" data-mode="text"&gt;/*
 * Copyright (c) 2019 Intel Corporation
 *
 * SPDX-License-Identifier: Apache-2.0
 */

/**
 * @file
 * @brief Sample echo app for CDC ACM class with BLE advertising and TX power control
 *
 * Sample app for USB CDC ACM class driver. The received data is echoed back
 * to the serial port. Additionally, it supports BLE advertising and TX power control 
 * via shell commands.
 */


#include &amp;lt;stdio.h&amp;gt;
#include &amp;lt;string.h&amp;gt;
#include &amp;lt;stdint.h&amp;gt;
#include &amp;lt;zephyr/device.h&amp;gt;
#include &amp;lt;zephyr/drivers/uart.h&amp;gt;
#include &amp;lt;zephyr/kernel.h&amp;gt;
#include &amp;lt;zephyr/sys/printk.h&amp;gt;
#include &amp;lt;zephyr/sys/ring_buffer.h&amp;gt;
#include &amp;lt;zephyr/usb/usb_device.h&amp;gt;
#include &amp;lt;zephyr/usb/usbd.h&amp;gt;
#include &amp;lt;zephyr/logging/log.h&amp;gt;
#include &amp;lt;zephyr/bluetooth/bluetooth.h&amp;gt;
#include &amp;lt;zephyr/bluetooth/hci.h&amp;gt;
#include &amp;lt;zephyr/shell/shell.h&amp;gt;
#include &amp;lt;C:\ncs\v2.6.1\modules\hal\nordic\nrfx\hal\nrf_radio.h&amp;gt;
#include &amp;lt;zephyr/bluetooth/hci_vs.h&amp;gt;
#include &amp;lt;zephyr/bluetooth/conn.h&amp;gt;

LOG_MODULE_REGISTER(cdc_acm_echo, LOG_LEVEL_INF);

#define RING_BUF_SIZE 1024
uint8_t ring_buffer[RING_BUF_SIZE];

struct ring_buf ringbuf;

static bool rx_throttled;
static struct bt_conn *default_conn;
static uint16_t default_conn_handle;

#if defined(CONFIG_USB_DEVICE_STACK_NEXT)
USBD_CONFIGURATION_DEFINE(config_1,
			  USB_SCD_SELF_POWERED,
			  200);

USBD_DESC_LANG_DEFINE(sample_lang);
USBD_DESC_MANUFACTURER_DEFINE(sample_mfr, &amp;quot;ZEPHYR&amp;quot;);
USBD_DESC_PRODUCT_DEFINE(sample_product, &amp;quot;Zephyr USBD CDC ACM&amp;quot;);
USBD_DESC_SERIAL_NUMBER_DEFINE(sample_sn, &amp;quot;0123456789ABCDEF&amp;quot;);

USBD_DEVICE_DEFINE(sample_usbd,
		   DEVICE_DT_GET(DT_NODELABEL(zephyr_udc0)),
		   0x2fe3, 0x0001);

static int enable_usb_device_next(void)
{
	int err;

	err = usbd_add_descriptor(&amp;amp;sample_usbd, &amp;amp;sample_lang);
	if (err) {
		LOG_ERR(&amp;quot;Failed to initialize language descriptor (%d)&amp;quot;, err);
		return err;
	}

	err = usbd_add_descriptor(&amp;amp;sample_usbd, &amp;amp;sample_mfr);
	if (err) {
		LOG_ERR(&amp;quot;Failed to initialize manufacturer descriptor (%d)&amp;quot;, err);
		return err;
	}

	err = usbd_add_descriptor(&amp;amp;sample_usbd, &amp;amp;sample_product);
	if (err) {
		LOG_ERR(&amp;quot;Failed to initialize product descriptor (%d)&amp;quot;, err);
		return err;
	}

	err = usbd_add_descriptor(&amp;amp;sample_usbd, &amp;amp;sample_sn);
	if (err) {
		LOG_ERR(&amp;quot;Failed to initialize SN descriptor (%d)&amp;quot;, err);
		return err;
	}

	err = usbd_add_configuration(&amp;amp;sample_usbd, &amp;amp;config_1);
	if (err) {
		LOG_ERR(&amp;quot;Failed to add configuration (%d)&amp;quot;, err);
		return err;
	}

	err = usbd_register_class(&amp;amp;sample_usbd, &amp;quot;cdc_acm_0&amp;quot;, 1);
	if (err) {
		LOG_ERR(&amp;quot;Failed to register CDC ACM class (%d)&amp;quot;, err);
		return err;
	}

	err = usbd_init(&amp;amp;sample_usbd);
	if (err) {
		LOG_ERR(&amp;quot;Failed to initialize device support&amp;quot;);
		return err;
	}

	err = usbd_enable(&amp;amp;sample_usbd);
	if (err) {
		LOG_ERR(&amp;quot;Failed to enable device support&amp;quot;);
		return err;
	}

	LOG_DBG(&amp;quot;USB device support enabled&amp;quot;);

	return 0;
}
#endif /* IS_ENABLED(CONFIG_USB_DEVICE_STACK_NEXT) */


static int set_tx_power(uint8_t handle_type, uint16_t handle, int8_t tx_pwr_lvl)
{
	struct bt_hci_cp_vs_write_tx_power_level *cp;
	struct bt_hci_rp_vs_write_tx_power_level *rp;
	struct net_buf *buf, *rsp = NULL;
	int err;

	buf = bt_hci_cmd_create(BT_HCI_OP_VS_WRITE_TX_POWER_LEVEL,
				sizeof(*cp));
	if (!buf) {
		printk(&amp;quot;Unable to allocate command buffer\n&amp;quot;);
		return;
	}

	cp = net_buf_add(buf, sizeof(*cp));
	cp-&amp;gt;handle = sys_cpu_to_le16(handle);
	cp-&amp;gt;handle_type = handle_type;
	cp-&amp;gt;tx_power_level = tx_pwr_lvl;

	err = bt_hci_cmd_send_sync(BT_HCI_OP_VS_WRITE_TX_POWER_LEVEL,
				   buf, &amp;amp;rsp);
	if (err) {
		uint8_t reason = rsp ?
			((struct bt_hci_rp_vs_write_tx_power_level *)
			  rsp-&amp;gt;data)-&amp;gt;status : 0;
		printk(&amp;quot;Set Tx power err: %d reason 0x%02x\n&amp;quot;, err, reason);
		return;
	}

	rp = (void *)rsp-&amp;gt;data;
	printk(&amp;quot;Actual Tx Power: %d\n&amp;quot;, rp-&amp;gt;selected_tx_power);

	net_buf_unref(rsp);
}

static void get_tx_power(uint8_t handle_type, uint16_t handle, int8_t *tx_pwr_lvl)
{
	struct bt_hci_cp_vs_read_tx_power_level *cp;
	struct bt_hci_rp_vs_read_tx_power_level *rp;
	struct net_buf *buf, *rsp = NULL;
	int err;

	*tx_pwr_lvl = 0xFF;
	buf = bt_hci_cmd_create(BT_HCI_OP_VS_READ_TX_POWER_LEVEL,
				sizeof(*cp));
	if (!buf) {
		printk(&amp;quot;Unable to allocate command buffer\n&amp;quot;);
		return;
	}

	cp = net_buf_add(buf, sizeof(*cp));
	cp-&amp;gt;handle = sys_cpu_to_le16(handle);
	cp-&amp;gt;handle_type = handle_type;

	err = bt_hci_cmd_send_sync(BT_HCI_OP_VS_READ_TX_POWER_LEVEL,
				   buf, &amp;amp;rsp);
	if (err) {
		uint8_t reason = rsp ?
			((struct bt_hci_rp_vs_read_tx_power_level *)
			  rsp-&amp;gt;data)-&amp;gt;status : 0;
		printk(&amp;quot;Read Tx power err: %d reason 0x%02x\n&amp;quot;, err, reason);
		return;
	}

	rp = (void *)rsp-&amp;gt;data;
	*tx_pwr_lvl = rp-&amp;gt;tx_power_level;

	net_buf_unref(rsp);
}

static int cmd_set_tx_pwr(const struct shell *shell, size_t argc, char **argv)
{
    int8_t tx_power;
    struct net_buf *buf, *rsp;
    int err;

    if (argc &amp;lt; 2) {
        shell_error(shell, &amp;quot;Usage: tx_power &amp;lt;value&amp;gt;&amp;quot;);
        return -EINVAL;
    }

    // Print the received argument
    shell_print(shell, &amp;quot;Received argument: %s&amp;quot;, argv[1]);

    // Convert the argument to an integer
    tx_power = atoi(argv[1]);

    // Print the parsed value
    shell_print(shell, &amp;quot;Parsed TX power value: %d&amp;quot;, tx_power);

    // Check if tx_power is within the acceptable range
    if (tx_power &amp;lt; -40 || tx_power &amp;gt; 8) { // Adjust range based on your chip
        shell_error(shell, &amp;quot;TX power must be between -40 and +8 dBm&amp;quot;);
        return -EINVAL;
    }

    LOG_INF(&amp;quot;Setting TX power to %d dBm&amp;quot;, tx_power);

    // Send the command and wait for a response
    set_tx_power(BT_HCI_VS_LL_HANDLE_TYPE_CONN,
				     default_conn_handle,
				     tx_power);
    if (err) {
        shell_error(shell, &amp;quot;Failed to set TX power, error: %d&amp;quot;, err);
        return -EIO;
    }

    shell_print(shell, &amp;quot;TX power set to %d dBm&amp;quot;, tx_power);
    return 0;
}



static void nrf_radio_ook_configure(bool enable)
{
    if (enable) {
        // Configure the radio to transmit continuously (OOK &amp;quot;on&amp;quot;)
        NRF_RADIO-&amp;gt;TXPOWER = RADIO_TXPOWER_TXPOWER_0dBm &amp;lt;&amp;lt; RADIO_TXPOWER_TXPOWER_Pos;
        NRF_RADIO-&amp;gt;MODE = RADIO_MODE_MODE_Nrf_1Mbit &amp;lt;&amp;lt; RADIO_MODE_MODE_Pos;

        // Set packet configuration for continuous transmission
        NRF_RADIO-&amp;gt;PCNF0 = (8 &amp;lt;&amp;lt; RADIO_PCNF0_LFLEN_Pos);   // 8-bit length field
        NRF_RADIO-&amp;gt;PCNF1 = (1 &amp;lt;&amp;lt; RADIO_PCNF1_MAXLEN_Pos);   // Max length 1 byte
        NRF_RADIO-&amp;gt;PACKETPTR = (uint32_t)&amp;amp;(uint8_t){0xFF};  // Send 0xFF for continuous &amp;quot;on&amp;quot;

        // Start transmitting
        NRF_RADIO-&amp;gt;TASKS_TXEN = 1;
    } else {
        // Disable radio to stop transmission (OOK &amp;quot;off&amp;quot;)
        NRF_RADIO-&amp;gt;TASKS_DISABLE = 1;
    }
}

/* Shell command to toggle OOK (On-Off Keying) */
static int cmd_toggle_ook(const struct shell *shell, size_t argc, char **argv)
{
    static bool ook_enabled = false;

    // Parse the command argument
    if (argc &amp;gt; 1) {
        if (strcmp(argv[1], &amp;quot;on&amp;quot;) == 0) {
            ook_enabled = true;
        } else if (strcmp(argv[1], &amp;quot;off&amp;quot;) == 0) {
            ook_enabled = false;
        } else {
            shell_error(shell, &amp;quot;Invalid argument. Use &amp;#39;on&amp;#39; or &amp;#39;off&amp;#39;.&amp;quot;);
            return -EINVAL;
        }
    } else {
        shell_error(shell, &amp;quot;Usage: ook &amp;lt;on|off&amp;gt;&amp;quot;);
        return -EINVAL;
    }

    if (ook_enabled) {
        LOG_INF(&amp;quot;Enabling OOK&amp;quot;);
        nrf_radio_ook_configure(true);  // Enable OOK (start transmission)
    } else {
        LOG_INF(&amp;quot;Disabling OOK&amp;quot;);
        nrf_radio_ook_configure(false);  // Disable OOK (stop transmission)
    }

    shell_print(shell, &amp;quot;OOK %s&amp;quot;, ook_enabled ? &amp;quot;enabled&amp;quot; : &amp;quot;disabled&amp;quot;);
    return 0;
}

/* Shell command to start advertising */
static int cmd_start_adv(const struct shell *shell, size_t argc, char **argv) {
    LOG_INF(&amp;quot;Starting BLE advertising&amp;quot;);

	int err = bt_enable(NULL);
	if (err) {
		printk(&amp;quot;Bluetooth init failed (err %d)\n&amp;quot;, err);
		return;
	}

	printk(&amp;quot;Bluetooth initialized\n&amp;quot;);

    struct bt_le_adv_param adv_param = {
        .options = BT_LE_ADV_OPT_CONNECTABLE,
        .interval_min = BT_GAP_ADV_SLOW_INT_MIN,
        .interval_max = BT_GAP_ADV_SLOW_INT_MAX,
        .peer = NULL
    };

    err = bt_le_adv_start(&amp;amp;adv_param, NULL, 0, NULL, 0);
    if (err) {
        shell_error(shell, &amp;quot;Failed to start advertising: %d&amp;quot;, err);
        return err;
    }

    shell_print(shell, &amp;quot;Advertising started&amp;quot;);
    return 0;
}


/* Shell command to stop advertising */
static int cmd_stop_adv(const struct shell *shell, size_t argc, char **argv)
{
    int err = bt_le_adv_stop();
    if (err) {
        shell_error(shell, &amp;quot;Failed to stop advertising: %d&amp;quot;, err);
        return err;
    }
    shell_print(shell, &amp;quot;Advertising stopped&amp;quot;);
    return 0;
}

/* Shell commands */
// Define a static subcommand set for Bluetooth commands
SHELL_STATIC_SUBCMD_SET_CREATE(sub_ble);

// Register the tx_power command
SHELL_CMD_ARG_REGISTER(tx_power, NULL, &amp;quot;Set TX power &amp;lt;value&amp;gt;&amp;quot;, cmd_set_tx_pwr, 2, 0);

// Register the read_power command
//SHELL_CMD_ARG_REGISTER(rd_power, NULL, &amp;quot;Read Current Tx power&amp;quot;, cmd_get_tx_power, 1, 0);

// Register the start_adv command
SHELL_CMD_ARG_REGISTER(start_adv, NULL, &amp;quot;Start BLE advertising&amp;quot;, cmd_start_adv, 1, 0);

// Register the stop_adv command
SHELL_CMD_ARG_REGISTER(stop_adv, NULL, &amp;quot;Stop BLE advertising&amp;quot;, cmd_stop_adv, 1, 0);

SHELL_CMD_ARG_REGISTER(ook, NULL, &amp;quot;Toggle OOK &amp;lt;on|off&amp;gt;&amp;quot;, cmd_toggle_ook, 2, 0);

// Register the main Bluetooth command with the subcommands
SHELL_CMD_REGISTER(ble, &amp;amp;sub_ble, &amp;quot;Bluetooth commands&amp;quot;, NULL);


static void interrupt_handler(const struct device *dev, void *user_data)
{
	ARG_UNUSED(user_data);

	while (uart_irq_update(dev) &amp;amp;&amp;amp; uart_irq_is_pending(dev)) {
		if (!rx_throttled &amp;amp;&amp;amp; uart_irq_rx_ready(dev)) {
			int recv_len, rb_len;
			uint8_t buffer[64];
			size_t len = MIN(ring_buf_space_get(&amp;amp;ringbuf),
					 sizeof(buffer));

			if (len == 0) {
				/* Throttle because ring buffer is full */
				uart_irq_rx_disable(dev);
				rx_throttled = true;
				continue;
			}

			recv_len = uart_fifo_read(dev, buffer, len);
			if (recv_len &amp;lt; 0) {
				LOG_ERR(&amp;quot;Failed to read UART FIFO&amp;quot;);
				recv_len = 0;
			};

			rb_len = ring_buf_put(&amp;amp;ringbuf, buffer, recv_len);
			if (rb_len &amp;lt; recv_len) {
				LOG_ERR(&amp;quot;Drop %u bytes&amp;quot;, recv_len - rb_len);
			}

			LOG_DBG(&amp;quot;tty fifo -&amp;gt; ringbuf %d bytes&amp;quot;, rb_len);
			if (rb_len) {
				uart_irq_tx_enable(dev);
			}
		}

		if (uart_irq_tx_ready(dev)) {
			uint8_t buffer[64];
			int rb_len, send_len;

			rb_len = ring_buf_get(&amp;amp;ringbuf, buffer, sizeof(buffer));
			if (!rb_len) {
				LOG_DBG(&amp;quot;Ring buffer empty, disable TX IRQ&amp;quot;);
				uart_irq_tx_disable(dev);
				continue;
			}

			if (rx_throttled) {
				uart_irq_rx_enable(dev);
				rx_throttled = false;
			}

			send_len = uart_fifo_fill(dev, buffer, rb_len);
			if (send_len &amp;lt; rb_len) {
				LOG_ERR(&amp;quot;Drop %d bytes&amp;quot;, rb_len - send_len);
			}

			LOG_DBG(&amp;quot;ringbuf -&amp;gt; tty fifo %d bytes&amp;quot;, send_len);
		}
	}
}

void main(void)
{
	const struct device *dev;
	uint32_t baudrate, dtr = 0U;
	int ret;

	dev = DEVICE_DT_GET_ONE(zephyr_cdc_acm_uart);
	if (!device_is_ready(dev)) {
		LOG_ERR(&amp;quot;CDC ACM device not ready&amp;quot;);
		return;
	}

#if defined(CONFIG_USB_DEVICE_STACK_NEXT)
		ret = enable_usb_device_next();
#else
		ret = usb_enable(NULL);
#endif

	if (ret != 0) {
		LOG_ERR(&amp;quot;Failed to enable USB&amp;quot;);
		return;
	}

	ring_buf_init(&amp;amp;ringbuf, sizeof(ring_buffer), ring_buffer);

	LOG_INF(&amp;quot;Wait for DTR&amp;quot;);

	while (true) {
		uart_line_ctrl_get(dev, UART_LINE_CTRL_DTR, &amp;amp;dtr);
		if (dtr) {
			break;
		} else {
			/* Give CPU resources to low priority threads. */
			k_sleep(K_MSEC(100));
		}
	}

	LOG_INF(&amp;quot;DTR set&amp;quot;);

	/* They are optional, we use them to test the interrupt endpoint */
	ret = uart_line_ctrl_set(dev, UART_LINE_CTRL_DCD, 1);
	if (ret) {
		LOG_WRN(&amp;quot;Failed to set DCD, ret code %d&amp;quot;, ret);
	}

	ret = uart_line_ctrl_set(dev, UART_LINE_CTRL_DSR, 1);
	if (ret) {
		LOG_WRN(&amp;quot;Failed to set DSR, ret code %d&amp;quot;, ret);
	}

	/* Wait 100ms for the host to do all settings */
	k_msleep(100);

	ret = uart_line_ctrl_get(dev, UART_LINE_CTRL_BAUD_RATE, &amp;amp;baudrate);
	if (ret) {
		LOG_WRN(&amp;quot;Failed to get baudrate, ret code %d&amp;quot;, ret);
	} else {
		LOG_INF(&amp;quot;Baudrate detected: %d&amp;quot;, baudrate);
	}

	/* Initialize Bluetooth */
	if (bt_enable(NULL)) {
		LOG_ERR(&amp;quot;Failed to enable Bluetooth&amp;quot;);
		return;
	}

	uart_irq_callback_set(dev, interrupt_handler);

	/* Enable rx interrupts */
	uart_irq_rx_enable(dev);
}
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;# Enable USB device stack
CONFIG_USB_DEVICE_STACK=y
CONFIG_USB_DEVICE_PRODUCT=&amp;quot;nRF52840 Dongle&amp;quot;

# Enable USB CDC ACM (UART over USB)
CONFIG_UART_LINE_CTRL=y
CONFIG_UART_CONSOLE=y
CONFIG_USB_CDC_ACM=y
CONFIG_UART_INTERRUPT_DRIVEN=y

# Enable Bluetooth functionality
CONFIG_BT=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_DEVICE_NAME=&amp;quot;nRF52840 Dongle&amp;quot;
CONFIG_BT_SHELL=y
CONFIG_BT_HCI_VS_EXT=y

# Enable TX power control
CONFIG_BT_HCI=y
CONFIG_BT_HCI_VS=y
CONFIG_BT_CTLR=y
CONFIG_BT_BROADCASTER=y
CONFIG_BT_CENTRAL=y
CONFIG_BT_LL_SOFTDEVICE=y
CONFIG_BT_LL_SW_SPLIT=y

CONFIG_BT_CTLR_TX_PWR_DYNAMIC_CONTROL=y
CONFIG_BT_CTLR_ADVANCED_FEATURES=y
CONFIG_BT_CTLR_CONN_RSSI=y
# Shell configuration
CONFIG_SHELL=y

# Enable console
CONFIG_CONSOLE=y

# Power management settings
CONFIG_PM_DEVICE=y

#Enable logging
CONFIG_LOG=y&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Implementing Set Tx Power command in USB CDC</title><link>https://devzone.nordicsemi.com/thread/509247?ContentTypeID=1</link><pubDate>Wed, 06 Nov 2024 13:34:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0eebc2f3-0768-4c6d-8345-aa9fc0e329ae</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;I see. The same should work and does so om my end.&amp;nbsp;Can you start by copy-pasting in the exact implementation from the sample and see that it works before you start modifyin things? Does it still fail? If so, can you share a simple but complete project I can test on my end that fails so that I can have a look? (as source code/text, not screenshots)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Implementing Set Tx Power command in USB CDC</title><link>https://devzone.nordicsemi.com/thread/509239?ContentTypeID=1</link><pubDate>Wed, 06 Nov 2024 13:04:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3c10aa00-495b-4b91-a2d1-0ceb6e88c8c6</guid><dc:creator>fowolabi</dc:creator><description>&lt;p&gt;I have referred to this and get the same issue when using the method from this sample&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Implementing Set Tx Power command in USB CDC</title><link>https://devzone.nordicsemi.com/thread/509237?ContentTypeID=1</link><pubDate>Wed, 06 Nov 2024 12:55:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6612bb76-2f85-431d-aeb1-abf59cec3303</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You can refer to the &lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/zephyr/samples/bluetooth/hci_pwr_ctrl/README.html"&gt;HCI Power Control sample&lt;/a&gt;&amp;nbsp;for how to set the Tx power via HCI.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>