This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

dtm_set_txpower conflicting with dtm_cmd

If I want to set transmit power to -4dB, these are the settings: command=LE_TRANSMITTER_TEST (this wouldn't be used anyway) freq=0x3C (meaning: -4dB) length=2 (meaning: SET_TX_POWER) payload=3(meaning: DTM_PKT_VENDORSPECIFIC).

But, when the program flow enters (in ble_dtm.c) dtm_cmd, m_phys_ch is made to be the same as freq;(m_phys_ch = freq;). So, m_phys_ch would be 0x3C. But since, m_phys_ch>PHYS_CH_MAX(which is 0x27), the program returns with DTM_ERROR_ILLEGAL_CHANNEL , instead of going to dtm_vendor_specific_pkt and then to dtm_set_txpower.

Related