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

BLE radio frequency calibration

I want to to ensure the stability of BLE connection for BLE frequence calibration,but i don't know how to get the nordic into the test mode and broadcast the empty packet.who can help me to deal with it?

Parents Reply
  • HI! I have seen the SDK about Direct Test Mode,but it's not what I want.What I want to do is that I want the device get into a certain state that broadcast continue,and I can get the BLE frequence offset and TX Power through the spectrometer,then I want to change one or more parameters about BLE to get the frequence offset in the range of -10KHz~10KHz in broadcase channel 0,and the distance in device and spectrometer is about 50cm.

Children
  • But that is exactly what you can do using direct Test mode. You can set the carrier frequency by using channel number, set the output power and then enabled transmission. Channel numbers are only a step offset from the base frequency to the top of the range.

    You don't need to implement the uart protocol, you can just select the parts that you want.

    I'm on a mobile at the moment otherwise I'd give you some example code.

  • Year,I know,what I mean is when I select a broadcast channel,the BLE frequence will be at 2.441GHz,but in actual,the BLE frequence will not be 2.441GHz,may be 2.441050GHz or 2.440050GHz ect.So I want to change one or more parameters to make it in the range of -10KHz~10KHz,in other words,the frequence range is 2.440990GHz~2.441010GHz.

    That's great if you can geive me some example code in your convenince,maybe I can get some inspiration.

  • Hi,

    My apologies for the delay in responding. I've been away from a computer for the last week.

    The frequencies that you can specify using DTM must be selected from the range 2.402GHz to 2.480GHz using the calculation 2.402 + (2*channel number). Thus you can select channel 19 for 2.440GHz or channel 20 for 2.442GHz.

    Okay a couple of points to clear  up.

    • BLE channels have a 2MHz interval between them.
    • Bluetooth Classic has more channels at 1MHz intervals.

    2.441GHz would be a Bluetooth Classic frequency. Do you wish to test BLE or Classic? 

    The following is are the DTM API calls that will puts out a constant carrier on channel 19 (2.440GHz):

         
      /* initialise DTM library */
        dtm_error_code = dtm_init();
        if (dtm_error_code != DTM_SUCCESS)
        {
            // If DTM cannot be correctly initialized, then we just return.
            return -1;
        }
    
        /* set a constant carrier signal on channel 19 (2.440GHz) */
        dtm_error_code  = dtm_cmd(LE_TRANSMITTER_TEST, 19,0, 0);
        if(dtm_error_code != DTM_SUCCESS)
        {
          return -1;
        }
    
      /* some more code here or timer - don't forget dtm_wait() in a loop if you need to process anything */
     
      /* turn off carrier */
       dtm_error_code = dtm_cmd(LE_TEST_END, 0,0,0);
    
    
    The Bluetooth specification allows for an inaccuracy in frequency of +/- 75KHz I think. Crystal accuracy will have a bearing on system performance but really you will need to tune the antenna using your pi network that you've place on the antenna feed path to get your output frequency as close to 2.440GHz as possible.
  • Thanks you very much! I have understood what the DTM doing.

Related