BLE Pixel Screen Debugging
I. Function Introduction
The Bluetooth Pixel Screen debugging module aims to help developers quickly understand the working principles, communication methods, and debugging methods of BLE Pixel Screen (BLE) devices. By understanding the MCU, Bluetooth module, serial communication methods, and log viewing process, developers can more efficiently troubleshoot Bluetooth pass-through data issues and improve development efficiency.
II. Device Introduction
The following is a typical structural diagram of a Bluetooth pixel display device:
The Bluetooth pixel screen mainly consists of two parts:
-
MCU (Main Control Chip): Responsible for the pixel screen's drawing logic, internal rendering, screen driving, and instruction parsing.
-
Bluetooth Module (Tuya BLE Module): Responsible for BLE communication between the mobile app and the device, acting as a data bridge between the MCU and the app.
Internal Communication Methods:
-
MCU <--> Bluetooth Module: Communication via UART serial port (TX/RX)
-
Bluetooth Module <--> Mobile App: Communication via wireless BLE protocol
Overall Architecture Diagram:
III. Equipment Debugging Methods
MCU and Computer Serial Port Connection
If the MCU supports log output, the MCU's serial port log can be output to the computer using a USB-to-TTL adapter for convenient debugging.
The connection method is as follows:
Instructions:
-
RX (Receive) connects to the MCU's TX (Transmit)
-
TX (Transmit) connects to the MCU's RX (Receive)
IV. Log Viewing Tools
1. Introduction to SecureCRT
SecureCRT is a multi-protocol terminal debugging software that supports SSH/Telnet/Serial. It is widely used for connecting embedded devices, routers, MCU debugging, etc.
In pixel screen debugging, SecureCRT is used for:
-
Viewing MCU output logs
-
Viewing Bluetooth pass-through data parsing results
-
Observing whether the MCU correctly receives data sent from the panel
2. Serial Port Debugging Steps
① Create a New Session
File → New Session or File → Quick Connect
② Select Protocol: Serial
③ Enter Serial Port Parameters (Recommended Values)
| Parameters | Recommended Values | Explanation |
| ------------ | -------------------- | ----------- |
| Port | Based on system (COM7 / ttyUSB0) | USB to serial port automatically assigned |
| Baud rate | 115200 | Commonly used baud rate for MCU debugging |
| Data bits | 8 | Standard value |
| Parity | None | No parity |
| Stop bits | 1 | Standard value |
| Flow control | None | Not recommended to enable |
④ Click Connect to view logs
After successful connection, you can see the MCU output logs:
V. Bluetooth Pixel Screen Image Data Transmission and Debugging
In the development of the Bluetooth pixel screen, the panel transmits image data via BLE big data pass-through. The key points for debugging are:
1. Confirm whether the panel has correctly sent the transparent data.
-
Observe the App-side logs (console or upload logs)
-
Check whether the packet sub-format conforms to the protocol format.
-
Confirm whether the device has received an ACK response packet.
2. Confirm whether the MCU has received the correct transparent data.
-
Observe the transparent packet content displayed on the MCU serial port.
-
Verify that the received packet header, packet sequence number, and data length are consistent.
3. Confirm whether the MCU has correctly parsed and rendered the pixel image.
-
Check whether the MCU side outputs rendering success/failure logs.
-
Confirm whether the display effect is consistent with the panel preview.
The following issues can be quickly checked through the serial port logs:
-
Is there packet loss in BLE?
-
Is the packet sub-formatting order incorrect?
-
Is the MCU correctly parsing the image protocol?
-
Are there any abnormalities in screen drawing?
VI. Debugging Suggestions
-
If the device does not respond with an ACK, check whether the Bluetooth module has entered receive mode.
-
If the data length received by the MCU is incorrect, check the App. Packet Substitution Logic
-
If the MCU displays garbled characters, it's often a base64 → hex → bytes conversion issue.
-
If the pixel image displays color cast/misalignment, confirm the MCU's pixel rendering format (RGB / GRB / row and column order).
VII. Summary
Bluetooth pixel screen debugging involves three key steps:
-
Ensure normal serial port output for easy viewing of MCU logs
-
Use SecureCRT to analyze the communication between the MCU and the Bluetooth module
-
Use the packet substitution/return mechanism of the Bluetooth pass-through module to troubleshoot the data delivery process
By mastering the above process, developers can debug BLE pixel screen devices more efficiently. This helps in troubleshooting problems during panel development. Developers can quickly locate and resolve issues by viewing the output logs, improving development efficiency.