Method and device for sending and receiving data
First Claim
1. A method for sending data, which is implemented by a device including a main module and a connection module, the connection module is configured to connect to a Personal Computer (PC) by using a USB connection mode, and the main module communicates with the connection module wirelessly, the method comprising:
- determining, by the main module, data to be sent corresponding to operation information according to the operation information input by a user;
encapsulating identification information and the data to be sent according to an identified type of the data to be sent and the identification information corresponding to the type of the data, and sending the encapsulated data to the connection module; and
decapsulating, by the connection module, the encapsulated data received, and sending the data to be sent after being removed the identification information to the PC;
wherein the types of the data to be sent comprise;
a type of internet data and a type of mouse control data;
the identification information is for identifying that the type of the data to be sent is the type of internet data or the type of mouse control data, and the identification information occupies 1 bit;
wherein the device acts as a data card when the type of the data to be sent is the type of internet data;
the device acts as a wireless mouse when the type of the data to be sent is the type of mouse control data.
2 Assignments
0 Petitions
Accused Products
Abstract
The disclosure discloses a method and device for sending and receiving data, which are used to solve the problem that the existing device having the function of the laser pen and the function of the data card cannot implement the integrated control over the function of the laser pen and the function of the data card. The device includes a main module and a connection module. The connection module is configured to connect to a PC by using a USB mode, and the main module communicates with the connection module by high frequency. The method for sending data includes: the main module encapsulates data to be sent according to a type of the data to be sent and identification information corresponding to the type of the data, and sends the encapsulated data to the connection module; and the connection module decapsulates the encapsulated data and sends the decapsulated data to the PC. Since the device determines the identification information corresponding to the type according to the type of the received data, and encapsulates the identification information and the data, in order to be capable of performing corresponding processing when needed, so that intelligent integration of the function of the laser pen and the function of the data card is implemented and an intelligent control over the function of the laser pen is implemented.
-
Citations
8 Claims
-
1. A method for sending data, which is implemented by a device including a main module and a connection module, the connection module is configured to connect to a Personal Computer (PC) by using a USB connection mode, and the main module communicates with the connection module wirelessly, the method comprising:
-
determining, by the main module, data to be sent corresponding to operation information according to the operation information input by a user; encapsulating identification information and the data to be sent according to an identified type of the data to be sent and the identification information corresponding to the type of the data, and sending the encapsulated data to the connection module; and decapsulating, by the connection module, the encapsulated data received, and sending the data to be sent after being removed the identification information to the PC; wherein the types of the data to be sent comprise;
a type of internet data and a type of mouse control data;
the identification information is for identifying that the type of the data to be sent is the type of internet data or the type of mouse control data, and the identification information occupies 1 bit;wherein the device acts as a data card when the type of the data to be sent is the type of internet data;
the device acts as a wireless mouse when the type of the data to be sent is the type of mouse control data. - View Dependent Claims (2, 3)
-
-
4. A method for receiving data, which is implemented by a device including a main module and a connection module, the connection module is configured to connect to a Personal Computer (PC) by using a USB connection mode, and the main module communicates with the connection module wirelessly, the method comprising:
-
receiving, by the connection module, data from the PC; encapsulating, by the connection module, identification information and the data according to a type of the data and the identification information corresponding to the type of the data, and sending the encapsulated data to the main module; and decapsulating, by the main module, the encapsulated data received, and performing corresponding processing on the data after being removed the identification information; wherein the types of the data comprise;
a type of internet data and a type of mouse control data;
the identification information is for identifying that the type of the data to be sent is the type of internet data or the type of mouse control data, and the identification information occupies 1 bit;wherein the device acts as a data card when the type of the data is the type of internet data;
the device acts as a wireless mouse when the type of the data is the type of mouse control data. - View Dependent Claims (5)
-
-
6. A device for sending and receiving data, comprising:
- a main module and a connection module, the connection module is configured to connect to a Personal Computer (PC) by using a USB connection mode, and the main module communicates with the connection module wirelessly, wherein
the main module is configured to determine data to be sent corresponding to operation information according to the operation information input by a user, to encapsulate identification information and the data to be sent according to a type of the data to be sent and the stored identification information corresponding to the type of the data, and to send the encapsulated data to the connection module;
or to decapsulate the encapsulated data received from the connection module, and to perform corresponding processing on the data after being removed the identification information; andthe connection module is configured to decapsulate the encapsulated data received, and to send the data to be sent after being removed the identification information to the PC;
or to receive data from the PC, to encapsulate identification information and the data according to a type of the data and the stored identification information corresponding to the type of the data, and to send the encapsulated data to the main modulewherein the types of the data or the data to be send comprise;
a type of internet data and a type of mouse control data;
the identification information is for identifying that the type of the data to be sent is the type of internet data or the type of mouse control data, and the identification information occupies 1 bit;wherein the device acts as a data card when the type of the data or the data to be send is the type of internet data;
the device acts as a wireless mouse when the type of the data or the data to be send is the type of mouse control data. - View Dependent Claims (7, 8)
- a main module and a connection module, the connection module is configured to connect to a Personal Computer (PC) by using a USB connection mode, and the main module communicates with the connection module wirelessly, wherein
Specification