乐虎游戏

乐虎游戏

Software Test Comparison: CC2540 BTool vs nRF Connect for Desktop

2020-05-29 15:33:46 RFstar

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: //maibeir.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.


乐虎-游戏「lehu国际」官方网站 乐虎-游戏 乐虎游戏 乐虎游戏 乐虎游戏 乐虎游戏 乐虎游戏 乐虎游戏