-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bluetooth: controller: Extend DTM commands #42300
bluetooth: controller: Extend DTM commands #42300
Conversation
platform_allow: nrf52833dk_nrf52833 | ||
extra_configs: | ||
- CONFIG_BT_CTLR_DF=y | ||
- CONFIG_BT_CTLR_DTM_HCI_DF_IQ_REPORT=y" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- CONFIG_BT_CTLR_DTM_HCI_DF_IQ_REPORT=y" | |
- CONFIG_BT_CTLR_DTM_HCI_DF_IQ_REPORT=y |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
#if defined(CONFIG_BT_CTLR_DF_SCAN_CTE_RX) | ||
if (lll && ull_df_sync_cfg_is_not_enabled(&lll->df_cfg)) { | ||
/* Drop further processing of the event. */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Heads up, will conflict with #42302
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Resloved
#endif /* CONFIG_BT_CTLR_DF_CTE_RX */ | ||
|
||
#if defined(CONFIG_BT_CTLR_DTM_HCI_DF_IQ_REPORT) | ||
static void create_iq_report(bool crc_ok) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
static void create_iq_report(bool crc_ok) | |
static int create_iq_report(bool crc_ok) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
uint32_t start_us; | ||
uint32_t err; | ||
bool cte_request = (cte_len > 0) ? 1 : 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uint32_t start_us; | |
uint32_t err; | |
bool cte_request = (cte_len > 0) ? 1 : 0; | |
const bool cte_request = (cte_len > 0) ? 1 : 0; | |
uint32_t start_us; | |
uint8_t err; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@@ -193,74 +499,119 @@ static uint32_t init(uint8_t chan, uint8_t phy, void (*isr)(void *)) | |||
/* NOTE: No whitening in test mode. */ | |||
radio_phy_set(test_phy, test_phy_flags); | |||
radio_tmr_tifs_set(150); | |||
radio_tx_power_max_set(); | |||
|
|||
err = tx_power_set(tx_power); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
declare a local uint8_t ret;
err = tx_power_set(tx_power); | |
ret = tx_power_set(tx_power); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
RADIO_PKT_CONF_CTE(cte ? RADIO_PKT_CONF_CTE_ENABLED : | ||
RADIO_PKT_CONF_CTE_DISABLED)); | ||
|
||
return err; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return err; | |
return ret; |
7b549b2
to
bed66fb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One new comment added.
Please go through unresolved comments from previous review also.
bed66fb
to
4700bfa
Compare
4700bfa
to
1c0bffb
Compare
subsys/bluetooth/shell/ll.c
Outdated
@@ -69,7 +69,7 @@ int cmd_test_tx(const struct shell *sh, size_t argc, char *argv[]) | |||
type = strtoul(argv[3], NULL, 16); | |||
phy = strtoul(argv[4], NULL, 16); | |||
|
|||
err = ll_test_tx(chan, len, type, phy); | |||
err = ll_test_tx(chan, len, type, phy, 0, 0, 0, NULL, 0x7F); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't you forget about this?
subsys/bluetooth/shell/ll.c
Outdated
@@ -92,7 +92,7 @@ int cmd_test_rx(const struct shell *sh, size_t argc, char *argv[]) | |||
phy = strtoul(argv[2], NULL, 16); | |||
mod_idx = strtoul(argv[3], NULL, 16); | |||
|
|||
err = ll_test_rx(chan, phy, mod_idx); | |||
err = ll_test_rx(chan, phy, mod_idx, 0, 0, 0, 0, NULL); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't you forget about this?
1c0bffb
to
58506d1
Compare
@ppryga I replaced magic number in shell related files and also I added a doc entry about the Direction Finding in hci_uart sample doc. |
58506d1
to
66a693c
Compare
Approved in regard of changes I've requested. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since you would be testing DTM, this is a request to include related suggestion mentioned here: #42866 (comment)
I added DNM. I just want to check one more thing |
This adds support for the following Direct Test mode commands: - HCI LE Receiver Test [v3] - HCI LE Transmitter Test [v3] - HCI LE Transmitter Test [v4] Those commands set add a possibility to test an CTE reception and transmission. The HCI LE Transmitter Test [v4] commands allows also setting a transmit power. Signed-off-by: Kamil Gawor <[email protected]>
Alignes the Openisa ll_test_tx and ll_test_rx functions with the new test API. Signed-off-by: Kamil Gawor <[email protected]>
Adds support for the nrf52833dk_nrf52833 which supports the Direction Finding feature. It allows also to perform the Direct Test Mode with the CTE feature. Signed-off-by: Kamil Gawor <[email protected]>
Adds antenna description for the nrf5340dk_nrf5340_cpunet target. It allows to performthe Direct Test Mode with the CTE feature on this target. Signed-off-by: Kamil Gawor <[email protected]>
Add the Direction Finding documentation section into the sample README.rst file. Signed-off-by: Kamil Gawor <[email protected]>
66a693c
to
72e89fe
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quick look - ACK
This PR adds a support for following HCI commands:
Those command set add a possibility to test the radio CTE reception and transmission. The HCI LE Transmitter Test v4 commands allows setting a transmit power. The Controller under the DTM test can also generate the HCI Connectionless IQ Report event when it receives the CTE.