Return-Path: Date: Wed, 12 Oct 2016 09:22:44 +0200 From: Johan Hedberg To: Hieu Le Cc: Steve Gladden , Barry Byford <31baz66@gmail.com>, "linux-bluetooth@vger.kernel.org" Subject: Re: How can you set Transmit power level in Bluetooth LE mode for an LE beacon? Message-ID: <20161012072244.GA29209@x1c> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: Sender: linux-bluetooth-owner@vger.kernel.org List-ID: Hi, On Wed, Oct 12, 2016, Hieu Le wrote: > In my opinion, the only way I can find to increase the tx_power is to > recompile the linux kernel. There may be a better way > > It seems that bluetooth stack within kernel separated into two classes: > 1. Inquiry Tx_power. > 2. Advertise Tx_power. > > And the default value is 0. > > You can take a look at: > *hci_alloc_dev(void) function within net/bluetooth/hci_core.c file > hdev->inq_tx_power = HCI_TX_POWER_INVALID; > hdev->adv_tx_power = HCI_TX_POWER_INVALID; The adv_tx_power is not used for changing the controller advertising TX power. It's only used for reading the current controller setting and storing it in this variable. The reason for all this is that currently (as of Bluetooth 4.2) there is no standard HCI command for changing the advertising TX power. Johan