927***950
Hello,
I’m currently developing a program for the GR5513BENDU processor and encountering an issue with the Bluetooth Low Energy (BLE) transmit power setting. I’m attempting to set the maximum transmit power to 7 dBm using the ble_gap_tx_power_set
function. However, when I read back the power using the ble_gap_tx_power_get
function, it returns a value of 4 dBm. For some reason, I’m unable to set the power higher than 4 dBm.
Has anyone else faced this issue or can provide insight into why the transmit power cannot be set above 4 dBm despite the function allowing for a higher value?
Any help or suggestions would be greatly appreciated.
Thank you!
927***950
I found out that the reason is that I'm setting the mode with ble_rf_tx_mode_set(BLE_RF_TX_MODE_ULP_MODE). I don't exactly remember where I got this code from, I think it was from the documentation on the official website. Perhaps I shouldn't enable this mode if I want to use maximum power.
zhongchengzhi
Hi,
1. I have tried both GCC and Keil, they have the same result.
2. You can try ble_app_cts project using GCC and your project using Keil. If it's caused by your code, you can send your code to my email zhongchengzhi@goodix.com.
927***950
It's probably worth clarifying that my project is built using make, and the ble_app_cts project I built using Keil.
927***950
Yes, I can see that in the ble_app_cts project, setting the output power to 7 dBm is working. However, in my project, it's giving such logs:
(First tx_power_offset: 0)ADV status: 00, error: 0
First error_code: 0, tx_pwr: 4
(Second tx_power_offset: 12)ADV status: 00, error: 0
Second error_code: 0, tx_pwr: 1
(Third tx_power_offset: 0)ADV status: 00, error: 0
Third error_code: 0, tx_pwr: 4
I don't see a significant difference in the configuration of these two projects yet.
zhongchengzhi
I see the ble_gap_tx_power_get return value is 7 dBm, not you said 4 dBm, so what's the difference?
927***950
APP_I: Goodix BLE SDK V2.0.1 (commit 3b19832f)
APP_I: Local Board EA:CB:3E:CF:00:05.
APP_I: Current Time example started.
APP_D: (First tx_power_offset: 0)ADV status: 00, error: 0
APP_D: First error_code: 0, tx_pwr: 7
APP_D: (Second tx_power_offset: 12)ADV status: 00, error: 0
APP_D: Second error_code: 0, tx_pwr: 4
APP_D: (Third tx_power_offset: 0)ADV status: 00, error: 0
APP_D: Third error_code: 0, tx_pwr: 7
APP_I: (tx_power_offset: 0)status: 0, tx_pwr: 7
APP_I: (tx_power_offset: 0)status: 0, tx_pwr: 7
APP_I: (tx_power_offset: 0)status: 0, tx_pwr: 7
APP_I: (tx_power_offset: 0)status: 0, tx_pwr: 7
zhongchengzhi
Could you use the attachment file replace the ble_app_cts example same name file, compile and run, then show me the log?
927***950
1) I do not know if my chip is calibrated. The dump of the int16_t tx_power_offset variable returns 0x0000.
2) Unfortunately, I do not have a device for measuring the output power
zhongchengzhi
Hi,
1. Is your chip calibrated? Could you dump "int16_t tx_power_offset" this variable?
2. You can use the instrument to measure the output power level, if the measured Tx power level is OK, you can ignore the ble_gap_tx_power_get return value.
927***950
In both modes, when setting the BLE transmission power to 3dBm, the function ble_gap_tx_power_get returns 3.
Open WeChat, use "Scan" to follow.