Link Key print on terminal for Bluetooth Sample connected_cs

Hi there,

I'm using /opt/nordic/ncs/v3.3.0/zephyr/samples/bluetooth/channel_sounding/connected_cs/initiator and /opt/nordic/ncs/v3.3.0/zephyr/samples/bluetooth/channel_sounding/connected_cs/reflector, I can make them work but I can't export link key between initiator and reflector. 

I tried to add CONFIG_BT_LOG_SNIFFER_INFO=y but it seems not work. 

Parents
  • Hi,

    The samples you are using are not supported in nRF Connect SDK. Please refer to the corresponding samples under nrf:

    Here adding adding CONFIG_BT_LOG_SNIFFER_INFO=y to prj.conf works as expected. You can see an example here with the initiator side log from NCS 3.3.0 with debug info enabled (the key is printed on line 19):

    *** Booting nRF Connect SDK v3.3.0-ba167d9f3db4 ***
    *** Using Zephyr OS v4.3.99-fd9204a02d52 ***
    I: Starting Channel Sounding Initiator Sample
    I: SoftDevice Controller build revision: 
    I: 27 03 7d 53 04 8d fe 99 |'.}S....
    I: a9 f2 9a ad de 5b 6a e2 |.....[j.
    I: 74 6c ac 75             |tl.u    
    I: HW Platform: Nordic Semiconductor (0x0002)
    I: HW Variant: nRF54Lx (0x0005)
    I: Firmware: Standard Bluetooth controller (0x00) Version 39.32003 Build 4270654547
    I: HCI transport: SDC
    I: Identity: F1:85:7D:92:0C:12 (random)
    I: HCI: version 6.2 (0x10) revision 0x30a3, manufacturer 0x0059
    I: LMP: version 6.2 (0x10) subver 0x30a3
    I: NRPA: 13:27:68:07:8C:B3
    I: Filters matched. Address: FA:F0:B3:51:3E:65 (random) connectable: 1
    I: Connecting
    I: Connected to FA:F0:B3:51:3E:65 (random) (err 0x00)
    I: SC LTK: 0xf21b623bd369599c2e87375ea18d58c6 (No bonding)
    I: Security changed: FA:F0:B3:51:3E:65 (random) level 2
    I: MTU exchange success (498)
    I: The discovery procedure succeeded
    I: Read RAS feature bits: 0x1
    I: CS capability exchange completed.
    I: CS config creation complete.
     - id: 0
     - mode: Invalid
     - min_main_mode_steps: 2
     - max_main_mode_steps: 5
     - main_mode_repetition: 0
     - mode_0_steps: 3
     - role: Initiator
     - rtt_type: AA only
     - cs_sync_phy: LE 1M PHY
     - channel_map_repetition: 1
     - channel_selection_type: Algorithm #3b
     - ch3c_shape: Hat shape
     - ch3c_jump: 2
     - t_ip1_time_us: 30
     - t_ip2_time_us: 20
     - t_fcs_time_us: 60
     - t_pm_time_us: 10
     - channel_map: 0x1FFFFFFFFFFFFC7FFFFC
    
    I: CS security enabled.
    I: CS procedures enabled:
     - config ID: 0
     - antenna configuration index: 0
     - TX power: 0 dbm
     - subevent length: 16000 us
     - subevents per event: 1
     - subevent interval: 0
     - event interval: 2
     - procedure interval: 5
     - procedure count: 0
     - maximum procedure length: 128
    I: Latest distance estimates on antenna path 0: ifft: 0.52, phase_slope: 0.55, rtt: 0.00 meters
    I: Latest distance estimates on antenna path 0: ifft: 0.52, phase_slope: 0.54, rtt: 0.00 meters
    I: Latest distance estimates on antenna path 0: ifft: 0.53, phase_slope: 0.52, rtt: 0.00 meters
    I: Latest distance estimates on antenna path 0: ifft: 0.53, phase_slope: 0.52, rtt: 0.00 meters
    I: Latest distance estimates on antenna path 0: ifft: 0.53, phase_slope: 0.52, rtt: 0.00 meters
    I: Latest distance estimates on antenna path 0: ifft: 0.53, phase_slope: 0.52, rtt: 0.00 meters
    I: Latest distance estimates on antenna path 0: ifft: 0.53, phase_slope: 0.52, rtt: 0.00 meters
    I: Latest distance estimates on antenna path 0: ifft: 0.52, phase_slope: 0.51, rtt: 0.00 meters
    I: Latest distance estimates on antenna path 0: ifft: 0.52, phase_slope: 0.51, rtt: 0.00 meters
    I: Latest distance estimates on antenna path 0: ifft: 0.52, phase_slope: 0.50, rtt: 0.00 meters

Reply
  • Hi,

    The samples you are using are not supported in nRF Connect SDK. Please refer to the corresponding samples under nrf:

    Here adding adding CONFIG_BT_LOG_SNIFFER_INFO=y to prj.conf works as expected. You can see an example here with the initiator side log from NCS 3.3.0 with debug info enabled (the key is printed on line 19):

    *** Booting nRF Connect SDK v3.3.0-ba167d9f3db4 ***
    *** Using Zephyr OS v4.3.99-fd9204a02d52 ***
    I: Starting Channel Sounding Initiator Sample
    I: SoftDevice Controller build revision: 
    I: 27 03 7d 53 04 8d fe 99 |'.}S....
    I: a9 f2 9a ad de 5b 6a e2 |.....[j.
    I: 74 6c ac 75             |tl.u    
    I: HW Platform: Nordic Semiconductor (0x0002)
    I: HW Variant: nRF54Lx (0x0005)
    I: Firmware: Standard Bluetooth controller (0x00) Version 39.32003 Build 4270654547
    I: HCI transport: SDC
    I: Identity: F1:85:7D:92:0C:12 (random)
    I: HCI: version 6.2 (0x10) revision 0x30a3, manufacturer 0x0059
    I: LMP: version 6.2 (0x10) subver 0x30a3
    I: NRPA: 13:27:68:07:8C:B3
    I: Filters matched. Address: FA:F0:B3:51:3E:65 (random) connectable: 1
    I: Connecting
    I: Connected to FA:F0:B3:51:3E:65 (random) (err 0x00)
    I: SC LTK: 0xf21b623bd369599c2e87375ea18d58c6 (No bonding)
    I: Security changed: FA:F0:B3:51:3E:65 (random) level 2
    I: MTU exchange success (498)
    I: The discovery procedure succeeded
    I: Read RAS feature bits: 0x1
    I: CS capability exchange completed.
    I: CS config creation complete.
     - id: 0
     - mode: Invalid
     - min_main_mode_steps: 2
     - max_main_mode_steps: 5
     - main_mode_repetition: 0
     - mode_0_steps: 3
     - role: Initiator
     - rtt_type: AA only
     - cs_sync_phy: LE 1M PHY
     - channel_map_repetition: 1
     - channel_selection_type: Algorithm #3b
     - ch3c_shape: Hat shape
     - ch3c_jump: 2
     - t_ip1_time_us: 30
     - t_ip2_time_us: 20
     - t_fcs_time_us: 60
     - t_pm_time_us: 10
     - channel_map: 0x1FFFFFFFFFFFFC7FFFFC
    
    I: CS security enabled.
    I: CS procedures enabled:
     - config ID: 0
     - antenna configuration index: 0
     - TX power: 0 dbm
     - subevent length: 16000 us
     - subevents per event: 1
     - subevent interval: 0
     - event interval: 2
     - procedure interval: 5
     - procedure count: 0
     - maximum procedure length: 128
    I: Latest distance estimates on antenna path 0: ifft: 0.52, phase_slope: 0.55, rtt: 0.00 meters
    I: Latest distance estimates on antenna path 0: ifft: 0.52, phase_slope: 0.54, rtt: 0.00 meters
    I: Latest distance estimates on antenna path 0: ifft: 0.53, phase_slope: 0.52, rtt: 0.00 meters
    I: Latest distance estimates on antenna path 0: ifft: 0.53, phase_slope: 0.52, rtt: 0.00 meters
    I: Latest distance estimates on antenna path 0: ifft: 0.53, phase_slope: 0.52, rtt: 0.00 meters
    I: Latest distance estimates on antenna path 0: ifft: 0.53, phase_slope: 0.52, rtt: 0.00 meters
    I: Latest distance estimates on antenna path 0: ifft: 0.53, phase_slope: 0.52, rtt: 0.00 meters
    I: Latest distance estimates on antenna path 0: ifft: 0.52, phase_slope: 0.51, rtt: 0.00 meters
    I: Latest distance estimates on antenna path 0: ifft: 0.52, phase_slope: 0.51, rtt: 0.00 meters
    I: Latest distance estimates on antenna path 0: ifft: 0.52, phase_slope: 0.50, rtt: 0.00 meters

Children
No Data
Related