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

Pending Publication Date: 2021-12-21
FUJIAN MOREFUN ELECTRONICS TECH CO LTD
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

At present, on the Android platform, the control and operation of related hardware devices are realized through SDK interface calls, which greatly affects the project integration speed

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Bluetooth communication method and device for local extension hardware equipment on Android platform
  • Bluetooth communication method and device for local extension hardware equipment on Android platform
  • Bluetooth communication method and device for local extension hardware equipment on Android platform

Examples

Experimental program
Comparison scheme
Effect test

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...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention provides a Bluetooth communication method for local extension hardware equipment on an Android platform. The method comprises the following steps: when an Android system is started, creating a socket background server for monitoring and receiving data and then forwarding the data to a client; adding a virtual equipment node in a native Android framework, providing all attributes of Bluetooth equipment by the virtual equipment node, and establishing connection with a socket background server; and taking the Android Bluetooth application program as a client side to be connected to the socket background server, adding data processing and communication functions to the Bluetooth application program, wherein the Bluetooth application program is used for carrying out data interaction with the data processing program, and after the data processing program receives data, carrying out corresponding processing according to the data by the extension hardware equipment. According to the Bluetooth communication method and device for the local extension hardware device on the Android platform, calling of the extension hardware device by the application program is achieved through the virtual Bluetooth device and Bluetooth communication, and then the project integration speed is greatly increased.

Description

technical field [0001] The invention relates to the technical field of mobile devices, in particular to a Bluetooth communication method and device for natively expanding hardware devices on an Android platform. Background technique [0002] Android is a free and open source operating system based on Linux, mainly used in mobile devices, such as smart phones and tablets, led and developed by Google and the Open Handset Alliance. [0003] The extended hardware devices integrated natively on the Android platform generally provide interfaces for secondary development through the SDK. During secondary development, it is necessary to be familiar with the SDK framework and implementation methods before proceeding with development. At present, on the Android platform, the control and operation of related hardware devices are realized through SDK interface calls, which greatly affects the project integration speed. Contents of the invention [0004] The technical problem to be s...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
IPC IPC(8): H04W4/80H04W4/70
CPCH04W4/80H04W4/70
Inventor 陈嘉祺谢纯珀
Owner FUJIAN MOREFUN ELECTRONICS TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products