Hello Nordic team,
I'm working with the nRF54L15 DK and using the latest NCS version that supports Bluetooth Channel Sounding. Here the sample is channel_sounding_ras_initiator from zephyr, by default it uses the MODE 2(PBR) for CS I’m trying to use the bt_le_cs_create_config_params structure to modify the CS configuration as shown below:
struct bt_le_cs_create_config_params config_params = { .id = CS_CONFIG_ID, .main_mode_type = BT_CONN_LE_CS_MAIN_MODE_3, .sub_mode_type = BT_CONN_LE_CS_SUB_MODE_1, " };
Everything works fine when main_mode_type is set to BT_CONN_LE_CS_MAIN_MODE_2. However, when I change it to BT_CONN_LE_CS_MAIN_MODE_3, the Channel Sounding setup fails with the following log:
I: Filters matched. Address: D1:54:D5:0C:83:1B (random) connectable: 1 I: Connecting I: Connected to D1:54:D5:0C:83:1B (random) (err 0x00) I: Security changed: D1:54:D5:0C:83:1B (random) level 2 I: MTU exchange success (498) I: The discovery procedure succeeded I: Read RAS feature bits: 0x1 I: CS capability exchange completed. W: opcode 0x2090 status 0x12 E: Failed to create CS config (err -22)
From what I understand, error -22 is -EINVAL (invalid argument), and status 0x12 from the opcode suggests a issue with Invalid HCI Command Parameters. I am using the nRF54L15DK board, which supports Channel Sounding, including RTT measurements. However, I'm unsure why MAIN_MODE_3 is causing the failure
Questions:
Is BT_CONN_LE_CS_MAIN_MODE_3 currently supported on the nRF54L15 for the Initiator role?
Are there any parameter constraints or requirements (e.g. PHY, RTT type, steps count) specific to MAIN_MODE_3 that could cause this error?
Does this mode require a specific controller capability that might be missing?
Let me know if you need more details (full config or logs). Thanks in advance!