Generate modulated carrier wave with random data for certification test


I am working with the RSL10 and am in need of a way of generating a modulated carrier wave at a selected channel that transmits a random set of data for the purposes of certification testing. I previously ran across KB: How to generate a CW (Continuous Wave) signal for a certification test?, but it appears to cover a continuous wave with no modulation. And I was not able to see a way to modify that example to add modulation.

How would I be able to programmatically set up a modulated carrier wave with random data? In my particular testing/usage case I am unable to connect any kind of cable or JTAG or any other device during testing, so I need the application to start up in a normal BLE operational mode with advertising and FOTA capabilities and then switch to the modulated carrier wave after some delay.


Hi @mmongeon ,
1, The you can’t use CW method to generate a modulated signal.
You need to use DTM (hci project) test and UART interface using RF Tools PC software.

 1. First you need load Hci proejct into RSL10 and run RF tools PC software through UART to test **DTM**.

  1. If you don’t have Jtag or UART for device and still need to do DTM test, you might need to use our GAPM command in your application to let device into DTM mode and run TX/RX DTM test.

Here is an example:

void BLE_TEST_MODE_TX(void)
    /* Prepare the DTM CMD message */
    struct gapm_le_test_mode_ctrl_cmd  *cmd;

    /* Prepare the start DTM test command message */
    		           gapm_le_test_mode_ctrl_cmd );
    cmd->operation = GAPM_LE_TEST_TX_START;
    cmd->channel = 0x00;                                    //Range 0x00 to 0x0x27

    cmd->tx_data_length = 0x00 ;
    cmd->tx_pkt_payload =GAP_PKT_PLD_PRBS9;
    cmd->phy =GAP_RATE_LE_1MBPS; 
    cmd->modulation_idx= GAP_MODULATION_STABLE;
    /* Send the message */

Hi @larry.zhu,

Thanks for the prompt reply. I have tried the code snippet you provided, but it doesn’t seem to be setting up the modulated carrier.

I am calling the function you provided after I have initialized my peripheral application and have been advertising for a few seconds. I am facilitating the delay by registering a kernel timer that fires after a few seconds. I can confirm that timer is firing and the BLE_TEST_MODE_TX() function is being called. I know that the message is making it through because my GAPM_MsgHandler() function then executes with a GAPM_CMP_EVT reply, and the gapm_cmp_evt.operation is set to GAPM_LE_TEST_TX_START. However, my application keeps advertising and is not broadcasting a carrier.

Do you have any thoughts as to why this isn’t working or what I might be doing wrong? Are there any additional GAPM message handlers from the SDK that I need to register for this particular message? Are there any additional preprocessor definitions I need that will specifically enable DTM? Do I need to link any particular static library from the SDK?


Hi @mmongeon ,

  1. If you start advertising first, you need run GAPM_CANCEL to stop advertising .
  2. Once finishing GAPM_CANCEL, you can call BLE_TEST_MODE_TX() function.

Here is an example to run GAPM_CANCEL command.

/* When it is in the advertising state, use this to stop */
void BLE_Operation_Cancel(int device_indx)
/* Instantiate cancel command message structure */
struct gapm_cancel_cmd *cmd;

/* Allocate message for cancel command */

/* Set parameters */
/* Set command operation */
cmd->operation = GAPM_CANCEL;

/* Send the message */

Hi @larry.zhu,

Thanks for this suggestion of sending GAPM_CANCEL as a setup step. This has worked for me, and I am getting the modulated carrier wave.

A few items of note that I should mention:

  • At first I simply tried calling BLE_Operation_Cancel() and BLE_TEST_MODE_TX() from your provided code samples back to back with no luck. Ultimately I got it to work by calling BLE_Operation_Cancel() and then setting up another kernel timer to call BLE_TEST_MODE_TX() after a short delay.
  • In BLE_TEST_MODE_TX() I modified cmd->tx_data_length to be a value other than 0. In my case I used 0xFF. With the value set to 0, no wave was apparent. When I set it to something non-zero the wave showed up.

Thank you for your help.