Speaking of Bluetooth, everyone should be familiar with it now. Almost all office workers will choose Bluetooth headsets instead of traditional wired headsets, in order to listen to music in daily life without being noticed by the boss.
Briefly introduce some knowledge about Bluetooth.
Bluetooth is a short-range wireless communication technology that enables data exchange between fixed and mobile devices. BR/EDR Bluetooth before Bluetooth 3.0 is generally called traditional Bluetooth, while LE Bluetooth under the Bluetooth 4.0 specification is called low-power Bluetooth.
The Bluetooth 4.0 standard includes the traditional Bluetooth module part and the low-power Bluetooth module part, and is a dual-mode standard. Low-power Bluetooth is also developed on the basis of traditional Bluetooth, and is different from traditional modules. Its biggest feature is that it reduces cost and power consumption, and is used in applications with high real-time requirements.
BLE (Bluetooh Low Energy) Bluetooth low energy technology is a short-range, low-cost, interoperable wireless technology that uses many intelligent means to minimize power consumption.
The operating mode of BLE technology is well suited for transmitting data from tiny wireless sensors (exchanging data every half a second) or other peripherals such as remote controls that use fully asynchronous communication. These devices send very small amounts of data (usually a few bytes) and send very infrequently (for example, a few times per second to once per minute or even less).
-----Reference article "Popularize what Bluetooth and BLE are, you will understand them in seconds after reading this"
One of the highlights of W801 is the Bluetooth module, which supports BT/BLE dual-mode working mode and BT/BLE4.2 protocol.
Let's take a look at how to debug this module.
Enable the BT test module in the SDK
First configure the macro definition in wm_demo.h to enable the BT function
Then compile the code and burn it
If you don't know how to do it here, refer to another article in the directory "MCU-HLK-W801 Development Environment Construction"
Installing the test tool
If you want to debug Bluetooth on Windows 10, here is a software recommended, Bluetooth LE Explorer. You can search and install it in Microsoft Store.
I have to mention the Microsoft App Store here. It’s the first time I used it today and it’s pretty good.
After the software is opened, this interface appears
Test steps
1. Turn on the Bluetooth module
Enter t-bt-on in the serial port to turn on the Bluetooth module
2. Turn on the Bluetooth host
Type t-ble-server-on to turn on blehost
3. Pairing and connection
Click start to start scanning
Find our development board WM-XXX
Click on the Pair below
Then we click on the device icon, then click Start Transaction, and then click Handle2, 2 should be the downlink channel
Enter the data and click Write
The command line can receive data
Go back and click Handle4, check this, and you can receive data reports.
Is not it simple
Code Analysis
The function triggered by the command line is in wm_bt_app.c
The tls_ble_server_demo_api_init function is called in demo_ble_server_on
Then you can analyze the code structure based on the information printed out by debugging.
Here you need to study in depth.
Previous article:MCU---HLK-W801 Bluetooth remote control lighting
Next article:MCU---HLK-W801 development environment construction
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- CGD and Qorvo to jointly revolutionize motor control solutions
- CGD and Qorvo to jointly revolutionize motor control solutions
- Keysight Technologies FieldFox handheld analyzer with VDI spread spectrum module to achieve millimeter wave analysis function
- Infineon's PASCO2V15 XENSIV PAS CO2 5V Sensor Now Available at Mouser for Accurate CO2 Level Measurement
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- A new chapter in Great Wall Motors R&D: solid-state battery technology leads the future
- Naxin Micro provides full-scenario GaN driver IC solutions
- Interpreting Huawei’s new solid-state battery patent, will it challenge CATL in 2030?
- Are pure electric/plug-in hybrid vehicles going crazy? A Chinese company has launched the world's first -40℃ dischargeable hybrid battery that is not afraid of cold
- [Integrated subway security control system based on Raspberry Pi 400] Material unboxing - Raspberry Pi 400
- SinA332.0 development board Linux & Qt adjust VGA resolution to 1280x720
- Single chip microcomputer CPU card programming system main frequency setting
- GD32307E-START IO analog SPI control RGBLED (03)
- 【GD32E503 Review】+ cJSON Porting Test
- Is one of the two MOS tubes in the step-down switching power supply chip used to replace the diode?
- The NiMH battery charging circuit is relatively complex, and some SMD components cannot be found in the specification sheet.
- Ding~ The weekly evaluation information has been delivered~
- Is there any plugin or function in KEIL or other compilation environment that can help check if there is an error like if ( a=1 )
- Problems with dsp2812 downloading using C2Prog