Tool/software:
While using HCI_LE_TransmitterTestCmd_V2 am attempting to set the device output power level using HCI_EXT_SetTxPowerCmd(level).
Analysis of the HCI return event appear to imply that only level argument 0x00, 0x01, 0x02, or 0x03 are valid. Is this correct?
The HCI_LE_TransmitterTestCmd_V2 command is successful, on the Rohde&Schwarz instrument I'm able to observe the signal and correctly analyze BLE LE1M. The observed power level is around 20dBm from the device.
Attempt to set the level with HCI_EXT_SetTxPowerCmd(level) to levels 0, 1, 2, or 3 either before or after starting HCI_LE_TransmitterTestCmd_V2 appears to make no difference in the observed power level output from the device. Should the level be adjustable?
p.s. am attaching session log to this case
ty br mrw.
=~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2025.01.29 16:14:34 =~=~=~=~=~=~=~=~=~=~=~= login as: root root@am335x-evm:~# cd /usr/share/cc33xx root@am335x-evm:/usr/share/cc33xx# ./ble_enable.sh ./ble_enable.sh: line 5: echo: write error: Invalid argument // COMMENT, already enabled root@am335x-evm:/usr/share/cc33xx# hciconfig hci0 down root@am335x-evm:/usr/share/cc33xx# hciconfig hci0 up root@am335x-evm:/usr/share/cc33xx# hciconfig -a hci0:Type: Primary Bus: UART BD Address: A4:34:F1:B3:17:7F ACL MTU: 255:10 SCO MTU: 0:0 UP RUNNING RX bytes:1310 acl:0 sco:0 events:116 errors:0 TX bytes:801 acl:0 sco:0 commands:116 errors:0 Features: 0x00 0x00 0x00 0x00 0x60 0x00 0x00 0x00 Packet type: DM1 DH1 HV1 Link policy: Link mode: PERIPHERAL ACCEPT Can't read local name on hci0: Input/output error (5) root@am335x-evm:/usr/share/cc33xx# btmgmt -i hci0 info hci0:Primary controller addr A4:34:F1:B3:17:7F version 12 manufacturer 13 class 0x000000 supported settings: powered connectable discoverable bondable le advertising secure-conn debug-keys privacy static-addr phy-configuration current settings: powered le name cc33xx_ble short name root@am335x-evm:/usr/share/cc33xx# btmgmt -i hci0 power off hci0 Set Powered complete, settings: le root@am335x-evm:/usr/share/cc33xx# btmgmt -i hci0 le on hci0 Set Low Energy complete, settings: le root@am335x-evm:/usr/share/cc33xx# btmgmt -i hci0 connectable off hci0 Set Connectable complete, settings: le root@am335x-evm:/usr/share/cc33xx# btmgmt -i hci0 debug-keys off hci0 Set Debug Keys complete, settings: le root@am335x-evm:/usr/share/cc33xx# btmgmt -i hci0 sc off hci0 Set Secure Connections complete, settings: le root@am335x-evm:/usr/share/cc33xx# btmgmt -i hci0 bondable off hci0 Set Bondable complete, settings: le root@am335x-evm:/usr/share/cc33xx# btmgmt -i hci0 pairable off hci0 Set Bondable complete, settings: le root@am335x-evm:/usr/share/cc33xx# btmgmt -i hci0 privacy off hci0 Set Privacy complete, settings: le root@am335x-evm:/usr/share/cc33xx# btmgmt -i hci0 name cc33xx_ble root@am335x-evm:/usr/share/cc33xx# btmgmt -i hci0 advertising off hci0 Set Advertising complete, settings: le root@am335x-evm:/usr/share/cc33xx# btmgmt -i hci0 power on hci0 Set Powered complete, settings: powered le root@am335x-evm:/usr/share/cc33xx# hcidump -i hci0 --raw& // COMMENT, enable dumping of HEX traffic to session [1] 1026 root@am335x-evm:/usr/share/cc33xx# HCI sniffer - Bluetooth packet analyzer ver 5.65 device: hci0 snap_len: 1500 filter: 0xffffffff hcitool -i hci0 cmd 0x3f 0x000e // COMMENT: HCI_EXT_EnablePTMCmd < HCI Command: ogf 0x3f, ocf 0x000e, plen 0 < 01 0E FC 00 > 04 0E 04 01 03 0C 00 > HCI Event: 0x0e plen 4 01 03 0C 00 root@am335x-evm:/usr/share/cc33xx# hcitool -i hci0 cmd 0x3f 0x0001 00 // COMMENT: HCI_EXT_SetTxPowerCmd(0x00) < HCI Command: ogf 0x3f, ocf 0x0001, plen 1 00 < 01 01 FC 01 00 > 04 FF 05 01 04 00 01 FC > HCI Event: 0xff plen 5 01 04 00 01 FC root@am335x-evm:/usr/share/cc33xx# hcitool -i hci0 cmd 0x08 0x0034 00 25 00 01 // COMMENT: HCI_LE_TransmitterTestCmd_V2(channel 0, 37t payload length, PRBS9 sequence, LE1M PHY) < HCI Command: ogf 0x08, ocf 0x0034, plen 4 00 25 00 01 < 01 34 20 04 00 25 00 01 > 04 0E 04 01 34 20 00 > HCI Event: 0x0e plen 4 01 34 20 00 root@am335x-evm:/usr/share/cc33xx# hcitool -i hci0 cmd 0x08 0x001f // COMMENT: HCI_LE_TestEnd < HCI Command: ogf 0x08, ocf 0x001f, plen 0 < 01 1F 20 00 > 04 0E 06 01 1F 20 00 00 00 > HCI Event: 0x0e plen 6 01 1F 20 00 00 00 root@am335x-evm:/usr/share/cc33xx#
I was able to clean this up with reference to another case https://e2e.ti.com/support/wireless-connectivity/wi-fi-group/wifi/f/wi-fi-forum/1437012/bp-cc3351-ble-production-test
it appears the power level adjustment is using HCI_EXT_SetMaxDtmTxPowerCmd.
The observed power levels were as follows, can you confirm please what are the expected levels from this power level command?
HCI_EXT_SetMaxDtmTxPowerCmd(3) 14.4dBm
HCI_EXT_SetMaxDtmTxPowerCmd(2) 4.8dBm
HCI_EXT_SetMaxDtmTxPowerCmd(1) -0.8dBm
HCI_EXT_SetMaxDtmTxPowerCmd(0) -5.6dBm
trace code was,
ifconfig wlan0 down
calibrator dev wlan0 plt power_mode on
calibrator dev wlan0 cc33xx_plt ble_plt
hciconfig hci0 up
btmon &
// ********************* LE 2M PHY test: ************************
hcitool cmd 0x3f 0x11 0x03 // Set TX power level
hcitool -i hci0 cmd 0x08 0x0034 00 25 00 02 // HCI_LE_TransmitterTestCmd_v2, channel 0, 37t payload length, PRBS9 sequence, LE2M PHY
// Measure using instrument
hcitool -i hci0 cmd 0x08 0x001f // HCI_LE_TestEnd
// ********************* LE 1M PHY test: ************************
hcitool cmd 0x3f 0x11 0x03 // Set TX power level
hcitool -i hci0 cmd 0x08 0x0034 00 25 00 01 // HCI_LE_TransmitterTestCmd_v2, channel 0, 37t payload length, PRBS9 sequence, LE1M PHY
// Measure using instrument 14.4dBm observed
hcitool -i hci0 cmd 0x08 0x001f // HCI_LE_TestEnd
hcitool cmd 0x3f 0x11 0x02 // Set TX power level
hcitool -i hci0 cmd 0x08 0x0034 00 25 00 01 // HCI_LE_TransmitterTestCmd_v2, channel 0, 37t payload length, PRBS9 sequence, LE1M PHY
// Measure using instrument 4.8dBm observed
hcitool -i hci0 cmd 0x08 0x001f // HCI_LE_TestEnd
hcitool cmd 0x3f 0x11 0x01 // Set TX power level
hcitool -i hci0 cmd 0x08 0x0034 00 25 00 01 // HCI_LE_TransmitterTestCmd_v2, channel 0, 37t payload length, PRBS9 sequence, LE1M PHY
// Measure using instrument -0.8dBm observed
hcitool -i hci0 cmd 0x08 0x001f // HCI_LE_TestEnd
hcitool cmd 0x3f 0x11 0x00 // Set TX power level
hcitool -i hci0 cmd 0x08 0x0034 00 25 00 01 // HCI_LE_TransmitterTestCmd_v2, channel 0, 37t payload length, PRBS9 sequence, LE1M PHY
// Measure using instrument -5.6dBm observed
hcitool -i hci0 cmd 0x08 0x001f // HCI_LE_TestEnd
still no response to my question - what are the expected target levels from power level command?
Hi Michael,
Target levels are in current firmware are as follows.
#0 --> 0dBm #1 --> 5dBm #2 --> 10dBm #3 --> 20dBm
~roger
great thanks, btw are these target levels fixed/hardcoded in firmware or is there a production per device calibration that should be followed?
mrw.