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

Constant carrier on nRF Connect DTM command error

Hi,

For Direct Test Mode on nRF Connect for Desktop, I have confirmed that Constant carrier can be selected.

The log was obtained at the time of the following settings.
Frequency: 2440MHz, Length: 1, Constant carrier
------------------
LOG
2020-10-29T06: 01: 53.177Z INFO Starting test
2020-10-29T06: 01: 53.178Z DEBUG DTM Transport: Create transmitter CMD with frequency: 2440
2020-10-29T06: 01: 53.178Z DEBUG DTM Transport: Create transmitter CMD with length: 1
2020-10-29T06: 01: 53.178Z DEBUG DTM Transport: Create transmitter CMD with packet type: 3
2020-10-29T06: 01: 53.199Z DEBUG DTM Transport: Sending data: 0x93 0x02
2020-10-29T06: 01: 53.208Z DEBUG DTM Transport: Receiving data: 0x00 0x00
------------------
Sending data is 0x93 0x02, but I think the correct command is 0x93 0x07.

Can you confirm it?
Best Regards,
uba
  • Hi,

    Tried the same settings, and get the same output at the end:

    2020-11-10T08:56:31.840Z DEBUG DTM Transport: Create transmitter CMD with frequency: 2440
    2020-11-10T08:56:31.841Z DEBUG DTM Transport: Create transmitter CMD with length: 1
    2020-11-10T08:56:31.841Z DEBUG DTM Transport: Create transmitter CMD with packet type: 3
    2020-11-10T08:56:31.873Z DEBUG DTM Transport: Sending data: 0x93 0x02
    2020-11-10T08:56:31.879Z DEBUG DTM Transport: Receiving data: 0x00 0x00

    However; there's a set of commands prior to this, which sets up the timer, tx power, etc:

    2020-11-10T09:16:43.037Z DEBUG DTM Transport: Create setup CMD with control: 0
    2020-11-10T09:16:43.038Z DEBUG DTM Transport: Create setup CMD with parameter: 0
    2020-11-10T09:16:43.038Z DEBUG DTM Transport: Create setup CMD with dc type: 00
    2020-11-10T09:16:43.043Z DEBUG DTM Transport: Serialport is opened
    2020-11-10T09:16:43.044Z DEBUG DTM Transport: Succeeded to open serialport
    2020-11-10T09:16:43.045Z DEBUG DTM Transport: Sending data: 0x00 0x00
    2020-11-10T09:16:43.056Z DEBUG DTM Transport: Receiving data: 0x00 0x00
    2020-11-10T09:16:43.056Z DEBUG DTM Transport: Create tx power CMD: 0
    2020-11-10T09:16:43.057Z DEBUG DTM Transport: Sending data: 0x80 0x0B
    2020-11-10T09:16:43.069Z DEBUG DTM Transport: Receiving data: 0x00 0x00
    2020-11-10T09:16:43.070Z DEBUG DTM Transport: Create setup CMD with control: 1
    2020-11-10T09:16:43.070Z DEBUG DTM Transport: Create setup CMD with parameter: 0
    2020-11-10T09:16:43.070Z DEBUG DTM Transport: Create setup CMD with dc type: 00
    2020-11-10T09:16:43.070Z DEBUG DTM Transport: Sending data: 0x01 0x00
    2020-11-10T09:16:43.077Z DEBUG DTM Transport: Receiving data: 0x00 0x00
    2020-11-10T09:16:43.077Z DEBUG DTM Transport: Create setup CMD with control: 3
    2020-11-10T09:16:43.077Z DEBUG DTM Transport: Create setup CMD with parameter: 0
    2020-11-10T09:16:43.077Z DEBUG DTM Transport: Create setup CMD with dc type: 00
    2020-11-10T09:16:43.078Z DEBUG DTM Transport: Sending data: 0x03 0x00
    2020-11-10T09:16:43.084Z DEBUG DTM Transport: Receiving data: 0x00 0x00
    2020-11-10T09:16:43.084Z DEBUG DTM Transport: Create setup CMD with control: 2
    2020-11-10T09:16:43.084Z DEBUG DTM Transport: Create setup CMD with parameter: 1
    2020-11-10T09:16:43.085Z DEBUG DTM Transport: Create setup CMD with dc type: 00
    2020-11-10T09:16:43.085Z DEBUG DTM Transport: Sending data: 0x02 0x04
    2020-11-10T09:16:43.092Z DEBUG DTM Transport: Receiving data: 0x00 0x00
    2020-11-10T09:16:43.092Z INFO Starting test
    2020-11-10T09:16:43.094Z DEBUG DTM Transport: Create transmitter CMD with frequency: 2440
    2020-11-10T09:16:43.094Z DEBUG DTM Transport: Create transmitter CMD with length: 1
    2020-11-10T09:16:43.094Z DEBUG DTM Transport: Create transmitter CMD with packet type: 3
    2020-11-10T09:16:43.115Z DEBUG DTM Transport: Sending data: 0x93 0x02
    2020-11-10T09:16:43.122Z DEBUG DTM Transport: Receiving data: 0x00 0x00
    
     

     

    Sending data is 0x93 0x02, but I think the correct command is 0x93 0x07.

    The length field is bits 8:2, which gets shifted down 2 bits in ble_dtm.c and masked with 0x3f, which gives 0 for 0x02, and 1 for 0x07. Both of these ends up in the same switch case:

        switch (vendor_cmd)
        {
            // nRFgo Studio uses CARRIER_TEST_STUDIO to indicate a continuous carrier without
            // a modulated signal.
            case CARRIER_TEST: <--- '0'
            case CARRIER_TEST_STUDIO: <--- '1'
                // Not a packet type, but used to indicate that a continuous carrier signal
                // should be transmitted by the radio.
                radio_prepare(TX_MODE);
    
                dtm_constant_carrier();

     

    Have I misunderstood? Could you elaborate on why the specific bitmask is incorrect?

     

    Kind regards,

    Håkon

     

  • Hi,

    Thank you for checking.
    LE_Transmitter_Test consists of:
    CMD, FREQUENCY, LENGTH, PKT

    The command is created as follows:
    Frequency: 2440MHz, Length: 1, Constant carrier

    CMD: 10b
    FREQUENCY: 010011b
    → 0x93

    LENGTH: 000001b
    PKT: 11b
    → 0x07

    I refer to BLUETOOTH CORE SPECIFICATION Vol 6, Part F and understand as above.

    Sending 0x93 0x07 with a serial tool will output a carrier, but selecting Constant carrier on nRF Connect DTM will output a modulated wave. Then, when I checked the log of nRF Connect DTM, it was 0x93 0x02, so I inquired.

    Best Regards,
    uba
  • Dear uba,

     

    My apologies, you are of course correct! I see what you mean. This is clearly a bug from our side, which I will report internally and make the nRF connect team aware of this.

    Thank you very much for taking the time to report this to us, and helping us improve our products and deliveries!

     

    Kind regards,

    Håkon

  • Dear Håkon,

    I think nRF connect is the great tool.

    I hope the bug is fixed.

    Best regards,

    uba

  • In Direct Test Mode v1.1.7, I have checked that the command is correct.

    2021-04-27T02:18:18.225Z INFO Starting test
    2021-04-27T02:18:18.227Z DEBUG DTM Transport: Create transmitter CMD with frequency: 2440
    2021-04-27T02:18:18.227Z DEBUG DTM Transport: Create transmitter CMD with length: 1
    2021-04-27T02:18:18.227Z DEBUG DTM Transport: Create transmitter CMD with packet type: 3
    2021-04-27T02:18:18.246Z DEBUG DTM Transport: Sending data: 0x93 0x07
    2021-04-27T02:18:18.258Z DEBUG DTM Transport: Receiving data: 0x00 0x00

Related