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
Parents
  • 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

     

Reply
  • 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

     

Children
Related