Bluetooth communication method and device for local extension hardware equipment on Android platform
A hardware device and Bluetooth technology, applied in the field of Bluetooth communication methods and devices, can solve problems such as affecting the integration speed of projects, and achieve the effect of improving the integration speed
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0031] The present embodiment provides a bluetooth communication method of a local extended hardware device on an Android platform, such as figure 1 shown, including;
[0032] When the Android system starts, a background server is created to monitor and receive data, and then forward it to the client;
[0033] Add a virtual device node in the native Android framework, the virtual device node provides all attributes of the bluetooth device, and establishes a connection with the background server;
[0034] Make the Android Bluetooth application program connect to the socket background server as a client, and add data processing and communication functions for the Bluetooth application program, for data interaction with the data processing program, and after the data processing program receives the data, expand The hardware device performs corresponding processing according to the data.
[0035] Specifically, the method also includes:
[0036] The user application program is c...
Embodiment 2
[0041] Many applications now output receipts through bluetooth printers. Generally, Bluetooth printers support ESC script printing. Such as figure 2 As shown, this embodiment adopts the following method specifically to use bluetooth communication to realize the application program to output receipts through the bluetooth printer.
[0042] S1. When the Android system is started, a background server is created, which is mainly responsible for monitoring and receiving data, and then forwards it to the client. Specifically, the background server may be a socket background server (socket server), and the socket server forwards the received data to the client socket handle after monitoring.
[0043] S2. In the native Android framework code (Bluetooth Android Framework), add corresponding virtual device nodes, provide all attributes of the Bluetooth device, and receive data sent by the user application program through the Bluetooth communication protocol.
[0044] S3. The Bluetoo...
Embodiment 3
[0057] Provided in this embodiment is a bluetooth communication device that extends hardware equipment locally on the Android platform, such as image 3 As shown, including: background server module, virtual device module and data communication module;
[0058] The background server module is used to create a background server when the Android system starts, for monitoring and receiving data, and then forwarding to the client;
[0059] The virtual device module is used to add a virtual device node in the native Android framework, and the virtual device node provides all attributes of the bluetooth device, and establishes a connection with the background server;
[0060] The data communication module is used to connect the Android bluetooth application program to the background server as a client, and add data processing and communication functions for the bluetooth application program, for data interaction and data processing with the data processing program After the program...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com