There are two methods in general: one is to writeProgramWhen the test mode is added, another way is to send the HCI command through the PC to enter.
The method to add the test mode to the underlying program is to add the connectionenterdutmod call to the program.
Sending commands via PC is a little more complicated. The specific steps are as follows:
- Use the pstool tool to enable the Bluetooth chip through SPI or UART, modify VM disable item Wei true, change host interface to UART link runing bcsp, and change HCI traffic routed internally to 0.
- Use the btcli tool to open the Bluetooth chip and select the serial port. First, send the slave command and then the edutm command.
Of course, there are many other ways to enter the test mode, such as using the bluetest3 tool to send commands to the Bluetooth chip. However, these methods Basically send commands to the Bluetooth chip through the HCI Layer. After entering the test mode, in some cases, you may also need to send instructions to enable Bluetooth to enter the paired and connectable status so that you can use the Bluetooth tester to connect to the Bluetooth chip for various tests.