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?
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?
For this type of work, including certification, I would suggest that you use Direct Test Mode. This allows you to set the channel frequency and trigger continuous transmission of the carrier wave without any data modulation. Incidentally, it does have a mode that will broadcast a known packet sequence as it's a requirement for certification.
You can place your device into Direct Test Mode and control the sequence yourself, but normally it's best to have a jumper on your circuit that allows a UART to be connected to an external control device and have your code set to respond to external commands.
OK,are these external commands defined by myself? If not where can I get these commands?another questions:if finally i get the frequence in the scope of 2.399990GHz~2.410010GHz,when i get out the Direct Test Mode,how can I hold it?
OK,thanks you very much,this is a good help for me.But I will come back if I have a new question.
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.
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.
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);
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.
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);
Thanks you very much! I have understood what the DTM doing.