btool is a pc software tool for bluetooth devices debugging, which works in central / master. it allows users to establish a connection with peripheral / slave ble devices via pc software. when testing the direct-driven function of the bluetooth module, using btool can quickly develop the function of the module and shorten the development cycle.
there are several mainstream btool software on the market. cc2540 btool and nrf connect for desktop are more commonly used. how about the btool direct-driven test experience of the two? this paper specifically compares the use experience of cc2540 btool and nrf connect for desktop.
the experience comparison between cc2540 btool and nrf connect for desktop is as follows:
1. nrf connect for desktop can connect multiple slaves at the same time and perform direct-driven command operation. cc2540 btool can only switch devices one by one for direct-driven operation.
2. the direct-driven operation of nrf connect for desktop is more simplified, and the direct-driven operation of cc2540 btool is very complicated.
3. the optimized interface design of nrf connect for desktop makes it easy to view key information.
in the test, we chose rf-star's rf-dg-40a based on nrf52840, which is better in performance and stability than the ti cc2540 usb dongle. all electronic engineers can try rf-dg -40a.
of course, the focus of this paper is on the actual measurement comparison of software. for the specific test and analysis process, please see below.
first, we need to prepare the hardware and software before testing.
the hardware that needs to be prepared in the test of this paper are: cc2540 usb dongle, rf-dg-40a, rf-star rf-eb-rfmod cc254x development kit
the prepared software includes cc2540 btool and nrf connect for desktop.
a. cc2540 btool direct-driven function test
hardware preparation: cc2540 usb dongle, rf-eb-rfmod cc254x development kit
software preparation: cc2540 btool
download link of btool: https://www.szrfstar.com/downloadnda/568-cn.html
after the software and hardware are ready, we start the direct-driven test of cc2540 btool software:
1. after installing the cc2540 btool, power on the rf-eb-rfmod cc254x development kit, open the software cc2540 btool, confirm the com number, and click ok.
2. click scan to scan the device.
3. select the device to be connected according to the mac address in slave bad.
4. click establish to connect. after the connection is successful, the connected device will be displayed on the left. click read / write.
before the direct-driven test of the bluetooth module, we need to carry out the most basic communication test, namely the transparent transmission test.
use bluetooth module rf-eb-rfmod cc254x to send data to btool
1. select discover characteristic by uuid in sub-procedure, enter e4:ff in characteristic uuid and click read. status shows success.
2. enter 0x000f in the characteristic value handle, and enter 01 00 in the value. click write and status displays success.
3. at this time, 31 32 33 34 34 36 37 sent in hexadecimal through the serial port assistant, and the sent data appears in the message box.
the serial port sends data. after the btool end receives successfully, we test btool to send data to the bluetooth module.
1. enter e9:ff in characteristic uuid and click read. status displays success, enter 0x0013 in the characteristic value handle, and enter the sent data 11 33 66 99 in value. click write, status displays success, and the serial assistant displays 11 33 66 99.
after the basic communication test is successful, the direct-driven function test is officially started.
1. pwm function test:
1.1 in characteristic read, select read using characteristic uuid in sub-procedure, input b1:ff in characteristic uuid, click read, input 0x004d in in the characteristic value handle in characteristic write, input 01 in value, and click write to initialize full high pulse width output.
1.2 enter b2:ff in the characteristic uuid, click read, enter 0x0050 in the characteristic value handle in characteristic write, and enter 00 00 00 00 in the value, click write, the small light of the development board lights up.
1.3. enter b2:ff in the characteristic uuid, click read, enter 0x0050 in the characteristic value handle in characteristic write, enter ee ee ee ee in value, and click write. the small lamp of the development board is dimmed.
2. adc function test
2.1 enter d1:ff in the characteristic uuid, click read, enter 0x0036 in the characteristic value handle in characteristic write, enter 03 in the value, and click write to turn on the two adcs.
2.2: enter d2:ff in characteristic uuid, click read, enter 0x0039 in characteristic value handle in characteristic write, enter 01 f4 (500 ms) in value, click write, and set the sampling period.
2.3. enter d4:ff in the characteristic uuid, click read, enter 0x0041 in the characteristic value handle in characteristic write, and enter 01 00 in the value to collect all the adc data.
3. io level acquisition
3.1 enter f1:ff in the characteristic uuid, click read, enter 0x0017 in the characteristic value handle in characteristic write, and enter 00 to set all common i/o ports as input ports.
3.2. enter f3:ff in characteristic uuid, click read, enter 0x001e in characteristic value handle in characteristic write, enter 01 00 in value, click write, when there is a level change, the message box will output the value, press the button on the development board, the level value will change from 3f (00111111) to 3e (00111110).
4. timed reversal
4.1 input f1:ff in characteristic uuid, click read, enter 0x0017 in characteristic value handle in characteristic write, enter ff in value, click write. set i/o port as input port.
4.2. enter f5:ff in the characteristic uuid, click read, enter 0x0024 in the characteristic value handle in characteristic write, enter 05 dc (1.5 s) in the value, and click write.
4.3 enter f4:ff in the characteristic uuid, click read, enter 0x0021 in the characteristic value handle in characteristic write, enter 05 dc (1.5 s) in the value, click write. you can see that the small light connected to i06 on the development board turns on and off at the interval of 1.5 s.
4.4. enter f7:ff in the characteristic uuid, click read, enter 0x002a in the characteristic value handle in characteristic write, enter 05 dc (1.5 s) in the value, and click write.
4.5. enter f6:ff in the characteristic uuid, click read, enter 0x0027 in the characteristic value handle in characteristic write, enter 05 dc (1.5 s) in the value, and click write. you can see the small light connected to i07 on the development board turns on and off at the interval of 1.5 s.
5. custom event function
5.1. in characteristic read, select read characteristic value / descriptor in sub-procedure, enter 0x008c in characteristic value handle, click read, enter 0x008c in characteristic value handle in characteristic write, enter 01 00 1e ff ff ff ff ff 04 ff 00 00 in value, click write.
5.2 enter 0x0092 in the characteristic value handle, click read, enter 0x0092 in the characteristic value handle in characteristic write, enter 08 02 00 00 00 in value, and click write.
5.3. enter 0x0095 in the characteristic value handle, and click read. enter 0x0095 in the characteristic value handle in characteristic write, enter 01 02 in value, and click write.
5.4. enter 0x0086 in the characteristic value handle, click read, and enter 0x0086 in the characteristic value handle in characteristic write, enter 1f 1d 03 02 01 ff 07 in value, and click write.
the small light connected to the p07 port will turn off after 32 s.
next, we test nrf connect for desktop
b. nrf connect for desktop direct-driven function test
hardware preparation: rf-dg-40a, rf-eb-rfmod cc254x development kit
software preparation: nrf connect for desktop
nrf connect for desktop download address:
1. first open nrf connect for desktop, open the bluetooth low energy open button, if it is the first time to use, you need to click to install.
2. power on rf-dg-40a, select the com port corresponding to rf-dg-40a, and click start scan.
3. a list of bluetooth devices broadcasting nearby will appear. click on the bluetooth development board device under test to start to the connection process.
4. start testing the basic communication, that is, transparent transmission test, open notify in ffe4.
5. use the serial port assistant to send data, nrf connect for desktop receives the data sent from the serial port assistant.
6. enter 11 33 66 99 in ffe9 of nrf connect for desktop, you can also receive the same data in the serial assistant.
now start the direct-driven function test:
1.pwm function
1.1 at ffb1, enter 00 to initialize the four pwm channels at full-low pulse width, and all four small lights on the development board will turn on.
1.2. input ff ff ff ff in ffb2, set to full-high pulse width, all 4 lights will turn off.
1.3 enter ee ee ee ee in ffb2, the light is on, but the brightness is obviously dark.
1.4 enter 00 00 00 00 in ffb2, the brightness returns to the original brightest condition.
2. adc function
2.1 input 03 in ffd1 to open two adc channels.
2.2 open notify in ffd3 to receive adc data of adc0.
3. i/o function
3.1 input 00 in fff1, set i / o as input port.
3.2 open the notify channel of fff3, press the button of the development board, and you can see the data change from 3f (00111111) to 3e (00111110) and then back to 3f.
3.3 input ff in fff1, set i/o port as output port.
3.4 enter 00 00 05 dc in fff5.
3.5 enter 00 00 05 dc in fff4, you can see that the small light connected to i06 turns on and off at 1.5s intervals.
3.6 enter 00 00 05 dc in fff7.
3.7 input 00 00 05 dc in fff4, you can see the small light connected to i07 turns on and off at 1.5 s intervals.
4. event
4.1 enter 01 00 1e ff ff ff ff ff 04 ff 00 00 in fe03.
4.2 enter 08 02 00 00 00 in fe05.
4.3 enter 01 02 in fe06.
4.4 enter 1f 1d 03 02 01 dd 07 in fe01. the small light connected to p07 turns off after 32 s.
after comparing the direct-driven functionsof cc2540 btool and nrf connect for desktop, the following points are summarized:
1. cc2540 btool can only perform direct-driven control on one device at a time. if you want to operate another device, you need to switch the drop-down menu to switch the mac address paired. if you want to operate multiple slave devices at the same time, cc2540 btool is difficult to implement. nrf connect for desktop can connect multiple slaves at the same time and display them in real time. if you need to directly drive a specific module, you can directly open the corresponding module operation interface.
2. cc2540 btool is too troublesome to perform the direct-driven operation. as you can see from the screenshot above, each time the direct-drivne command is executed, the uuid must be entered firstly, the handle is read out, and then the corresponding parameters are entered in the assignment area. each operation requires at least 4 steps. on the other hand, nrf connect for desktop is much simpler. you don't need to read the handle and assign the value. enter the parameter directly at the corresponding handle address fe. moreover, all other handle parameters can be seen, other parameters of cc2540 btool cannot be seen at the same time.
3. the software interface optimization of nrf connect for desktop is much better than cc2540 btool. when testing on cc2540 btool, i felt that it was operating on a virtual machine, and the visual experience was very poor. the optimization of nrf connect for desktop is very good, and the visual display can basically view all the required parameters.
based on the above evaluation experience, if you choose btool software for ble module test, it is recommended to use nrf connect for desktop. in terms of packet capturing hardware, the rf-dg-40a launched by rf-star has a better user experience than the original cc2540 usb dongle from ti. if you are interested, you can try it.
rf-star technology has been focusing on the bluetooth field for ten years and has rich experience in solution design. rf-star 's nordic sniffer solution performed well.
rf-star technology is a radio frequency solution provider and low-power radio frequency core device supplier with excellent industry reputation and credibility. its products include a wealth of nordic series products, such as nrf52840. the professional technical support team provides you with professional customized services. for more nordic solutions, please follow rf-star technology.