Bluetooth Technology: Design of a Wireless Display System

This article introduces a design scheme for a Bluetooth wireless display system. By using Bluetooth technology, it enables short-range wireless control of display terminals, allowing for the wireless transmission and display of image and character data, eliminating the drawbacks of wired connections, and making it applicable in various fields.

1 Overall System Design The wireless graphic display system mainly consists of two parts: the host part and the display terminal part. The host is responsible for controlling commands and sending the data to be displayed, while the display terminal part is responsible for receiving and displaying the data. The system structure is shown in Figure 1.

Bluetooth Technology: Design of a Wireless Display System

The host part consists of a PC running the Linux operating system connected to a BlueCore4 Bluetooth module via a USB interface. The display terminal is composed of an embedded Linux platform centered around the ARM9 microcontroller S3C2440A, along with a BlueCore4 Bluetooth module and an LCD display. The Linux operating system is installed in NAND FLASH and connected to 64 MB of external RAM. Due to the rich interfaces of the S3C2440A, the system hardware has good expansion capabilities. The system communicates through the RFCOMM protocol layer of the Bluetooth protocol stack. The RFCOMM protocol provides serial data transmission and can maintain up to 60 connections between two Bluetooth devices simultaneously, supporting both legacy serial port applications and OBEX protocol in other applications. The structural block diagram of the Bluetooth protocol stack is shown in Figure 2.

Bluetooth Technology: Design of a Wireless Display System

The working process of the system is as follows: after system initialization, the host and display terminal establish a Bluetooth connection. Once the connection is successful, the host application sends display commands to the display terminal via the Bluetooth module. The display terminal receives image data or character data based on the corresponding commands and then sends the data to the LCD display through the LCD controller. After the connection is established, the display terminal can display different images and character data in real-time based on the received data until the host issues an exit command to end the communication.

2 System Hardware Design Both the host and display terminal use a Bluetooth transceiver module composed of CSR’s BlueCore4-ROM chip. The BlueCore4 series complies with the Bluetooth 2.0 standard and is fully compatible with existing Bluetooth 1.1 and 1.2 devices. The BlueCore4-ROM chip used here has a high level of integration and requires very few external components. It provides host interfaces such as UART and USB2.0, as well as PCM audio and SPI interfaces. It supports micro-networks and scatter networks, has low power consumption, and is well compatible with mobile phones, allowing coexistence with the 802.11 protocol. The structure of the BlueCore4 Bluetooth module is shown in Figure 3.

Bluetooth Technology: Design of a Wireless Display System

The PC host connects to the BlueCore4 Bluetooth module via a USB interface, and the corresponding Bluetooth module is also connected to the USB-HOST interface of the S3C2440A via a USB interface. The USB interface has the advantage of plug-and-play. With the support of the Linux operating system, this module can also use a generic USB Bluetooth adapter as a substitute. The reference circuit diagram for the BlueCore4 Bluetooth module is shown in Figure 4.

Bluetooth Technology: Design of a Wireless Display System

The LCD display is connected to the S3C2440A microcontroller through the built-in LCD controller interface of the S3C2440A. The LCD used here is a 3.5-inch L35T32, which has a display resolution of 240×320, can display 16-bit colors, and can be easily expanded to larger LCD screens. The reference circuit diagram for the USB-HOST interface and LCD controller interface of the S3C2440A is provided. The connections for the LCD controller interface mainly include: VD0 to VD23 (R, G, B color separation information), VCLK (data transmission clock), HSYNC (line synchronization signal), VSYNC (field synchronization signal), VDEN (data enable), LCD_PWREN (display enable).

3 System Software Design The system software is also divided into the host part and the display terminal part. Here, we mainly analyze the software design of the display terminal part, which is similar to the host part. The display terminal program includes: LCD initialization, Bluetooth device initialization, establishment of Bluetooth connection, and transmission and display of image and character data. The program flow is shown in Figure 6.

Bluetooth Technology: Design of a Wireless Display System

The user program is developed on the Bluez Bluetooth protocol stack on the Linux operating system. The host application is compiled using the GCC compiler, while the display terminal application is cross-compiled using the arm-linux-gcc compiler.

3.1 Bluetooth Part Program Design This part uses Bluetooth socket programming. A socket is established through the Bluetooth RFCOMM protocol layer for connection. Once the connection is successfully established, the functions recv or read can be called to read data sent from the host, while the host side uses the functions send or write to send data correspondingly. After communication ends, the function close can be called to terminate the connection. Both the host and display terminal Bluetooth modules have fixed Bluetooth addresses, and the host directly connects to the display terminal device with the fixed Bluetooth address. One host can communicate with multiple display terminals, displaying images and characters on different display terminals. The reference program for Bluetooth initialization is as follows:

Bluetooth Technology: Design of a Wireless Display System

3.2 LCD Part Program Design The LCD part program uses the framebuffer programming interface of the Linux kernel driver. The framebuffer provides an abstraction for image hardware devices, allowing applications to access image hardware devices through a clearly defined interface without needing to understand any underlying hardware driver details. Through the framebuffer, applications can use the mmap function to map video memory to the application’s virtual address space, and writing the data to be displayed into the memory space will display it on the screen. The reference program for LCD initialization and clearing is as follows:

Bluetooth Technology: Design of a Wireless Display System

After the LCD initialization and Bluetooth socket connection are completed, image and character data can be sent via Bluetooth. The programs for receiving and displaying image and character data are similar, both reading commands sent from the host using the functions recv or read, and receiving data in the same way after program judgment. The reference program for character data reception and display is as follows:

Bluetooth Technology: Design of a Wireless Display System

This segment of the program uses the received character data to obtain the corresponding display font data, which is then displayed on the LCD screen through the framebuffer display interface. The source program includes a display font library file, which is compiled and embedded into the executable code, then downloaded to the display terminal file system. This system only includes an English font library and corresponding display code, allowing for normal display of English characters. If needed, Chinese character display can be easily implemented by adding a Chinese font library and a small amount of display code. The image part program directly displays the received bitmap data on the LCD screen through the framebuffer display interface.

To use the Bluetooth protocol stack on the display terminal’s Linux operating system, the required Bluetooth support options must be selected during cross-compilation of the embedded Linux kernel, and the necessary Bluez Bluetooth library must be compiled and installed in the terminal file system. User applications are also cross-compiled to obtain executable code, which is then downloaded to the terminal file system for execution. This system can be applied in public information display screens, such as lobby advertisement screens, building signage, etc., avoiding the drawbacks of wired connections. The system can also be expanded to exchange data with mobile phones, PDAs, wireless headsets, and wireless speakers.

4 Conclusion Bluetooth development on the embedded Linux operating system using the existing Bluetooth protocol stack allows for wireless data transmission without concern for the implementation of Bluetooth low-level drivers. Users can perform more complex communications through various upper-layer protocols, and audio data can also be sent through the Bluetooth SCO protocol layer. Therefore, developing a Bluetooth wireless display system on the embedded Linux operating system platform is relatively convenient and has good expansion capabilities.

Bluetooth Technology: Design of a Wireless Display SystemBluetooth Technology: Design of a Wireless Display System

Bluetooth Technology: Design of a Wireless Display System

Bluetooth Technology: Design of a Wireless Display System

Bluetooth Technology: Design of a Wireless Display System

Long press the QR code above to sign up and win many super gifts

Leave a Comment