CN108512574B - Method and device for communication between mobile terminal and user-defined 2.4G wireless equipment - Google Patents

Method and device for communication between mobile terminal and user-defined 2.4G wireless equipment Download PDF

Info

Publication number
CN108512574B
CN108512574B CN201710112900.9A CN201710112900A CN108512574B CN 108512574 B CN108512574 B CN 108512574B CN 201710112900 A CN201710112900 A CN 201710112900A CN 108512574 B CN108512574 B CN 108512574B
Authority
CN
China
Prior art keywords
data packet
ble
wireless device
custom
mobile terminal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710112900.9A
Other languages
Chinese (zh)
Other versions
CN108512574A (en
Inventor
胡商州
尹高伟
刘成
杨清华
孟浩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Angrui Microelectronics Technology Co ltd
Original Assignee
Shenzhen Angrui Microelectronics Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Angrui Microelectronics Technology Co ltd filed Critical Shenzhen Angrui Microelectronics Technology Co ltd
Priority to CN201710112900.9A priority Critical patent/CN108512574B/en
Publication of CN108512574A publication Critical patent/CN108512574A/en
Application granted granted Critical
Publication of CN108512574B publication Critical patent/CN108512574B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B5/00Near-field transmission systems, e.g. inductive or capacitive transmission systems
    • H04B5/70Near-field transmission systems, e.g. inductive or capacitive transmission systems specially adapted for specific purposes
    • H04B5/72Near-field transmission systems, e.g. inductive or capacitive transmission systems specially adapted for specific purposes for local intradevice communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/004Arrangements for detecting or preventing errors in the information received by using forward error control
    • H04L1/0072Error control for data other than payload data, e.g. control data
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L5/00Arrangements affording multiple use of the transmission path
    • H04L5/003Arrangements for allocating sub-channels of the transmission path
    • H04L5/0044Arrangements for allocating sub-channels of the transmission path allocation of payload
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L5/00Arrangements affording multiple use of the transmission path
    • H04L5/003Arrangements for allocating sub-channels of the transmission path
    • H04L5/0053Allocation of signaling, i.e. of overhead other than pilot signals
    • H04L5/0055Physical resource allocation for ACK/NACK
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention provides a method and a device for communication between a mobile terminal and a user-defined 2.4G wireless device. The method comprises the following steps: constructing a first BLE data packet carrying a first 2.4G data packet in a protocol data unit; sending the first BLE data packet to the custom 2.4G wireless device, so that the custom 2.4G wireless device can execute corresponding control operation according to a control command carried by the first 2.4G data packet; receiving a second BLE data packet which is sent by the user-defined 2.4G wireless device and is carried in a second 2.4G data packet protocol data unit; according to the response command carried by the second BLE data packet, obtaining response operation of the user-defined 2.4G wireless equipment to the control command; the protocol data unit of the first 2.4G data packet carries a control command for operating the customized 2.4G wireless device, and the protocol data unit of the second BLE data packet carries a response command of the control command. The invention can reduce the realization cost of controlling the user-defined 2.4G wireless equipment through the mobile terminal and the power consumption of the user-defined 2.4G wireless equipment.

Description

Method and device for communication between mobile terminal and user-defined 2.4G wireless equipment
Technical Field
The invention relates to the technical field of wireless communication, in particular to a method and a device for communication between a mobile terminal and a user-defined 2.4G wireless device.
Background
In recent years, with the rise of concepts such as smart home and smart hardware and the popularization of mobile terminals such as mobile phones, various home appliances and remote control toys have been developed in an intelligent direction, and it is fashionable to control the home appliances and the remote control toys through mobile phones. At present, products such as an air conditioner, a television, a lighting lamp, a remote control toy and the like are mainly controlled by a remote controller, communication schemes of the remote controller mainly comprise infrared, WIFI, Bluetooth, custom 2.4G and the like, wherein the custom 2.4G wireless communication scheme has the characteristics of low chip cost, simple scheme, flexible design and the like, and has an important share in the control field of household appliances and remote control toys. Specifically, 2.4G chips need to be configured in custom 2.4G wireless devices and remote controllers of household appliances, remote control toys and the like, so that the communication between the remote controllers and the custom 2.4G wireless devices is realized through a custom 2.4G wireless communication scheme, and the control of the custom 2.4G wireless devices by the remote controllers is realized.
The use of mobile phones to operate customized 2.4G wireless devices such as home appliances and remote control toys has become an important trend in the field. At present, the scheme for controlling these custom 2.4G wireless devices by using a mobile phone with BLE (Bluetooth Low Energy) function is as follows: a BLE chip is added in the customized 2.4G wireless equipment, wherein the mobile phone has a BLE (Bluetooth Low Energy) function. Therefore, the mobile phone and the user-defined 2.4G wireless equipment communicate in a BLE wireless communication mode, and the user-defined 2.4G wireless equipment is controlled by the mobile phone.
Wherein, BLE data packet structure and 2.4G data packet structure are shown in table 1 and table 2, respectively.
As shown in table 1, the BLE data packet includes a Preamble (Preamble) of 1 byte, a synchronization Address (Sync Address) of 4 bytes, a Protocol Data Unit (PDU) of 2-39 bytes, and a cyclic redundancy check code (CRC) of 3 bytes.
TABLE 1 BLE data packet structure
Figure BDA0001234825960000021
As can be seen from table 2, the 2.4G data packet includes a Preamble (Preamble) of 1 byte, a synchronization Address (Sync Address) of 3-5 bytes, a custom area (vector defined file) of 0-3 bytes, a Protocol Data Unit (PDU) of 0-32 bytes, and a cyclic redundancy check code (CRC) of 0-2 bytes.
Table 22.4G packet structure
Figure BDA0001234825960000022
Preamble: time-frequency synchronization, channel estimation, and AGC (automatic gain control) adjustment for the receiving side;
sync Address: the receiving party distinguishes the sending equipment and only receives the air data with the same synchronous address as the self synchronous address;
PDU: a payload;
vector defined filtered: 2.4G chip manufacturer self-defined area;
CRC: and the data check is carried out.
In the process of implementing the invention, the inventor finds that at least the following technical problems exist in the prior art:
in the prior art, the technical scheme of using a mobile phone to control a household appliance, a remote control toy and other user-defined 2.4G wireless devices needs to change the existing hardware scheme of the user-defined 2.4G wireless devices, namely, a BLE chip is added in the user-defined 2.4G wireless devices, and the BLE chip has the defects of complex protocol, high development difficulty, high cost and the like, so that the realization cost of the existing realization scheme is high, in addition, because two chips of the BLE chip and the 2.4G chip need to be configured in the user-defined 2.4G wireless devices, the defect of large power consumption of the device exists, and the battery needs to be frequently replaced by a user.
Disclosure of Invention
According to the method and the device for communication between the mobile terminal and the user-defined 2.4G wireless equipment, the existing hardware scheme in the user-defined 2.4G wireless equipment is not required to be changed, and the implementation cost for controlling the user-defined 2.4G wireless equipment through a mobile phone and the power consumption of the user-defined 2.4G wireless equipment can be reduced.
In a first aspect, the present invention provides a method for a mobile terminal to communicate with a custom 2.4G wireless device, which is applied to the mobile terminal and includes:
constructing a first BLE data packet carrying a first 2.4G data packet subjected to whitening processing on a protocol data unit;
performing whitening processing on the first BLE data packet;
sending the whitened first BLE data packet to the custom 2.4G wireless device, so that the custom 2.4G wireless device can execute corresponding control operation according to a control command carried by the first 2.4G data packet;
receiving a second BLE data packet carried in a second 2.4G data packet protocol data unit and sent by the custom 2.4G wireless device;
according to a response command carried by the second BLE data packet, obtaining a response operation of the user-defined 2.4G wireless device to the control command;
the protocol data unit of the first 2.4G data packet carries a control command for operating the customized 2.4G wireless device, and the protocol data unit of the second BLE data packet carries a response command of the control command;
the synchronization address of the first 2.4G data packet is a synchronization address of a custom 2.4G device, and the synchronization address of the second BLE data packet is a BLE broadcast synchronization address defined in BLE protocol specification.
Optionally, before the constructing the first BLE packet whose protocol data unit carries the whitened first 2.4G packet, the method further includes:
scanning to the synchronization address of the custom 2.4G wireless device.
In a second aspect, the present invention provides a method and an apparatus for a mobile terminal to communicate with a customized 2.4G wireless device, where the method and the apparatus are arranged in the mobile terminal, and the method and the apparatus include:
the first building module is used for building a first BLE data packet which carries the whitened first 2.4G data packet on a protocol data unit;
a first whitening module to whiten the first BLE data packet;
a first sending module, configured to send the whitened first BLE data packet to the custom 2.4G wireless device, so that the custom 2.4G wireless device can execute a corresponding control operation according to a control command carried in the first 2.4G data packet;
a first receiving module, configured to receive a second BLE data packet that is carried in a second 2.4G data packet protocol data unit and is sent by the custom 2.4G wireless device;
a first processing module, configured to obtain, according to a response command carried in the second BLE data packet, a response operation of the user-defined 2.4G wireless device to the control command;
the protocol data unit of the first 2.4G data packet carries a control command for operating the customized 2.4G wireless device, and the protocol data unit of the second BLE data packet carries a response command of the control command;
the synchronization address of the first 2.4G data packet is a synchronization address of a custom 2.4G device, and the synchronization address of the second BLE data packet is a BLE broadcast synchronization address defined in BLE protocol specification.
Optionally, the apparatus further comprises:
and the scanning module is used for scanning the synchronous address of the self-defined 2.4G wireless equipment.
In a third aspect, the present invention provides a method for a mobile terminal to communicate with a customized 2.4G wireless device, which is applied to the customized 2.4G wireless device, and includes:
receiving a first 2.4G data packet which is carried in a first BLE data packet and subjected to whitening processing and sent by the mobile terminal;
executing corresponding control operation according to the control command carried by the first 2.4G data packet;
constructing a second 2.4G data packet carrying the whitened second BLE data packet in the protocol data unit;
sending the second 2.4G data packet to a mobile terminal, so that the mobile terminal can obtain the response operation of the user-defined 2.4G wireless device according to a response command carried by the second BLE data packet;
wherein the protocol data unit of the first 2.4G data packet carries a control command for operating the customized 2.4G wireless device, and the protocol data unit of the second BLE data packet carries a response command of the control command;
the synchronization address of the first 2.4G data packet is a synchronization address of a custom 2.4G device, and the synchronization address of the second BLE data packet is a BLE broadcast synchronization address defined in BLE protocol specification.
Optionally, the method further comprises:
and broadcasting the self synchronous address at regular time.
In a fourth aspect, the present invention provides an apparatus for a mobile terminal to communicate with a customized 2.4G wireless device, where the apparatus is disposed in the customized 2.4G wireless device, and the apparatus includes:
a second receiving module, configured to receive a first 2.4G data packet that is carried in a first BLE data packet and subjected to whitening processing and sent by the mobile terminal;
the second processing module is used for executing corresponding control operation according to the control command carried by the first 2.4G data packet;
a second constructing module, configured to construct a second 2.4G packet that carries the whitened second BLE packet in the protocol data unit;
a second sending module, configured to send the second 2.4G data packet to a mobile terminal, so that the mobile terminal obtains a response operation of the custom 2.4G wireless device according to a response command carried in the second BLE data packet;
wherein the protocol data unit of the first 2.4G data packet carries a control command for operating the customized 2.4G wireless device, and the protocol data unit of the second BLE data packet carries a response command of the control command;
the synchronization address of the first 2.4G data packet is a synchronization address of a custom 2.4G device, and the synchronization address of the second BLE data packet is a BLE broadcast synchronization address defined in BLE protocol specification.
Optionally, the apparatus further comprises:
and the broadcasting module is used for broadcasting the self synchronous address at fixed time.
According to the method and the device for communication between the mobile terminal and the user-defined 2.4G wireless equipment, a first BLE data packet carrying a first 2.4G data packet subjected to whitening processing on a protocol data unit is constructed; performing whitening processing on the first BLE data packet; sending the whitened first BLE data packet to the custom 2.4G wireless device, so that the custom 2.4G wireless device can execute corresponding control operation according to a control command carried by the first 2.4G data packet; receiving a second BLE data packet carried in a second 2.4G data packet protocol data unit and sent by the custom 2.4G wireless device; and according to the response command carried by the second BLE data packet, obtaining the response operation of the user-defined 2.4G wireless equipment to the control command. Therefore, the invention realizes the communication between the mobile terminal and the customized 2.4G wireless device by software processing, namely, bearing the control command for operating the customized 2.4G wireless device in the protocol data unit of the BLE data packet sent by the mobile terminal in the form of a 2.4G data packet structure, and simultaneously bearing the response command of the control command in the protocol data unit of the 2.4G data packet sent by the customized 2.4G wireless device in the form of a BLE data packet structure. Compared with the prior art, the method and the device have the advantages that the existing hardware scheme in the user-defined 2.4G wireless device is not required to be changed, namely, a BLE chip is not required to be added in the user-defined 2.4G wireless device, so that the realization cost of controlling the user-defined 2.4G wireless device through a mobile phone and the power consumption of the user-defined 2.4G wireless device can be reduced.
Drawings
Fig. 1 is a flowchart of a mobile terminal in a method for communicating with a custom 2.4G wireless device according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a first BLE data packet constructed by the mobile terminal in the above embodiment;
fig. 3 is a schematic structural diagram of a mobile terminal in an apparatus for communicating with a customized 2.4G wireless device according to an embodiment of the present invention;
fig. 4 is a flowchart of a 2.4G device side in a method for a mobile terminal to communicate with a custom 2.4G wireless device according to another embodiment of the present invention;
fig. 5 is a schematic structural diagram of a second 2.4G data packet constructed by the 2.4G device in the above embodiment;
fig. 6 is a schematic structural diagram of a 2.4G device side in a device for communication between a mobile terminal and a customized 2.4G wireless device according to another embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The theoretical basis on which the invention can be implemented is first set forth here: as long as the receiving party and the sending party work at the same frequency point, the wireless devices can communicate with each other by using the same modulation and demodulation mode and rate and having the same synchronous address and air data packet structure.
Specifically, taking a mobile terminal such as a mobile phone as an example, the BLE chip in the mobile phone may operate in a connected state or a disconnected state. When the mobile phone works in a connectionless state, the mobile phone can transmit data through three frequency points: 2402Mhz, 2426Mhz and 2480Mhz transmit and receive data. The custom 2.4G wireless device can receive and transmit data at any frequency point in the frequency band of 2400MHz to 2500 Mhz. According to the invention, any one of three frequency points of the BLE chip in a connectionless state can be selected as a working frequency point for communication between the user-defined 2.4G wireless equipment and the mobile phone. Data of a BLE chip of the mobile phone and data of the user-defined 2.4G wireless equipment are modulated and demodulated in a GFSK mode; the communication rate of a BLE chip of the mobile phone is 1Mbps, the customized 2.4G wireless equipment generally supports the communication rates of 2Mbps and 1Mbps, and the working rate of the customized 2.4G wireless equipment is configured to be 1 Mbps.
The invention provides a method for communication between a mobile terminal and a user-defined 2.4G wireless device, which is applied to the mobile terminal and comprises the following steps:
s11, constructing a first BLE packet carrying the whitened first 2.4G packet in its protocol data unit.
And the protocol data unit of the first 2.4G data packet carries a control command for operating the customized 2.4G wireless equipment. Specifically, as shown in fig. 2, the application program of the mobile terminal first adds the control command to a PDU field of a first 2.4G data packet, generates a cyclic redundancy check code (CRC) according to a CRC polynomial in a 2.4G communication protocol, and adds the CRC field of the first 2.4G data packet, then puts a Preamble (Preamble), a synchronization Address (Sync Address), and a vendor defined file (vendor defined file) of the 2.4G data packet in a corresponding field, and finally, the application program of the mobile terminal whitens the first 2.4G data packet according to a BLE whitening formula and submits the whitened first 2.4G data packet to a BLE chip, and the BLE chip constructs the whitened first 2.4G data packet as data of a Protocol Data Unit (PDU).
In a specific implementation process, the length of the data packet needs to be corrected according to actual conditions, for example, the maximum length of the protocol data unit of the first BLE data packet is 39 bytes, and the minimum length of the protocol data unit of the first 2.4G data packet excluding the protocol data unit portion is 6 bytes (i.e., 1 byte of the preamble, 4 bytes of the synchronization address, and 1 byte of the crc), so the length of the protocol data unit of the first BLE data packet is 6-39 bytes, and the length of the protocol data unit of the first 2.4G data packet is 0-28 bytes.
And S12, whitening the first BLE data packet.
S13, sending the whitened first BLE data packet to the custom 2.4G wireless device, so that the custom 2.4G wireless device can execute a corresponding control operation according to a control command carried by the first 2.4G data packet.
And S14, receiving a second BLE data packet carried in a second 2.4G data packet protocol data unit and sent by the customized 2.4G wireless device.
Wherein the protocol data unit of the second BLE data packet carries a response command of the control command.
And S15, obtaining the response operation of the customized 2.4G wireless device to the control command according to the response command carried by the second BLE data packet.
The synchronization address of the first 2.4G data packet is a synchronization address of a custom 2.4G device, and the synchronization address of the second BLE data packet is a BLE broadcast synchronization address defined in BLE protocol specification.
According to the method and the device for communication between the mobile terminal and the custom 2.4G wireless device, provided by the embodiment of the invention, through software processing, a control command for operating the custom 2.4G wireless device is borne in a protocol data unit of a BLE data packet sent by the mobile terminal in a 2.4G data packet structure form, and a response command of the control command is borne in the protocol data unit of the 2.4G data packet sent by the custom 2.4G wireless device in a BLE data packet structure form, so that communication between the mobile terminal and the custom 2.4G wireless device is realized. Compared with the prior art, the method and the device have the advantages that the existing hardware scheme in the user-defined 2.4G wireless device is not required to be changed, namely, a BLE chip is not required to be added in the user-defined 2.4G wireless device, so that the realization cost of controlling the user-defined 2.4G wireless device through a mobile phone and the power consumption of the user-defined 2.4G wireless device can be reduced.
In this embodiment, the main body for executing the above steps may be a BLE chip of the mobile terminal, or a plurality of functional modules in the BLE chip, and the corresponding steps are executed by the respective functional modules. The BLE chip is used as an execution subject for detailed explanation. Specifically, firstly, a BLE chip generates a cyclic redundancy check code (CRC) for a whitened first 2.4G data packet according to a CRC polynomial in a BLE protocol, performs whitening processing on a PDU and the CRC, then places the whitened PDU and the whitened CRC in a corresponding domain, and places a BLE Preamble and a BLE broadcast synchronization Address in a Preamble and a Sync Address domain, thereby constructing the first BLE data packet; then, the BLE chip performs whitening processing on the first BLE data packet according to a whitening formula in a BLE protocol, and sends the whitened first BLE data packet to the air. Because the Protocol Data Unit (PDU) in the first BLE data packet carries the first 2.4G data packet, and after whitening twice, the signal in the air completely meets the receiving condition of the custom 2.4G device, so the custom 2.4G device receives data according to the Preamble and Sync Address in the Protocol Data Unit (PDU) of the first BLE data packet, and the other parts are treated as white noise.
Further, before the step S11, the method further includes:
and scanning the synchronous address of the custom 2.4G wireless device.
An embodiment of the present invention provides a device for communication between a mobile terminal and a user-defined 2.4G wireless device, which is disposed in the mobile terminal, and as shown in fig. 3, the device includes:
a first constructing module 11, configured to construct a first BLE packet that carries the whitened first 2.4G packet in its protocol data unit;
a first whitening module 12, configured to perform whitening processing on the first BLE data packet;
a first sending module 13, configured to send the whitened first BLE packet to the custom 2.4G wireless device, so that the custom 2.4G wireless device can execute a corresponding control operation according to a control command carried in the first 2.4G packet;
a first receiving module 14, configured to receive a second BLE data packet carried in a second 2.4G data packet protocol data unit and sent by the customized 2.4G wireless device;
the first processing module 15 is configured to obtain a response operation of the customized 2.4G wireless device to the control command according to a response command carried in the second BLE data packet;
the protocol data unit of the first 2.4G data packet carries a control command for operating the customized 2.4G wireless device, and the protocol data unit of the second BLE data packet carries a response command of the control command;
the synchronization address of the first 2.4G data packet is a synchronization address of a custom 2.4G device, and the synchronization address of the second BLE data packet is a BLE broadcast synchronization address defined in BLE protocol specification.
According to the device for communication between the mobile terminal and the customized 2.4G wireless device, provided by the embodiment of the invention, through software processing, namely, a control command for operating the customized 2.4G wireless device is borne in a protocol data unit of a BLE data packet sent by the mobile terminal in a form of a 2.4G data packet structure, and meanwhile, a response command of the control command is borne in the protocol data unit of the 2.4G data packet sent by the customized 2.4G wireless device in a form of the BLE data packet structure, so that the communication between the mobile terminal and the customized 2.4G wireless device is realized. Compared with the prior art, the method and the device have the advantages that the existing hardware scheme in the user-defined 2.4G wireless device is not required to be changed, namely, a BLE chip is not required to be added in the user-defined 2.4G wireless device, so that the realization cost of controlling the user-defined 2.4G wireless device through a mobile phone and the power consumption of the user-defined 2.4G wireless device can be reduced.
In this embodiment, the main body for executing the above steps may be a plurality of functional modules arranged in the BLE baseband chip, and each functional module executes the corresponding step, or may be the BLE chip of the mobile terminal.
Further, the apparatus further comprises:
and the scanning module is used for scanning the synchronous address of the self-defined 2.4G wireless equipment.
The invention provides a method for communication between a mobile terminal and a user-defined 2.4G wireless device, which is applied to the user-defined 2.4G wireless device, and as shown in figure 4, the method comprises the following steps:
and S21, receiving the first 2.4G data packet which is carried in the first BLE data packet and subjected to whitening processing and sent by the mobile terminal.
And the protocol data unit of the first 2.4G data packet carries a control command for operating the custom 2.4G wireless equipment.
And S22, executing corresponding control operation according to the control command carried by the first 2.4G data packet.
And S23, constructing a second 2.4G data packet carrying the whitened second BLE data packet in the protocol data unit.
Wherein the protocol data unit of the second BLE data packet carries a response command of the control command.
As shown in fig. 5, the customized 2.4G wireless device constructs the second BLE data packet, specifically, first generates a CRC corresponding to the response command sequence according to a CRC polynomial in the BLE protocol, adds the CRC to the response command, performs whitening processing according to a whitening formula in the BLE protocol, and places a Preamble and a Sync Address of the BLE before the sequence after the whitening processing, so as to construct the second BLE data packet.
And then, the customized 2.4G wireless device constructs the second 2.4G data packet, specifically, the second BLE data packet is firstly added into the protocol data unit, then the Preamble and the Sync Address of 2.4G are added in front of the protocol data unit, and the CRC generated according to the CRC polynomial in the 2.4G protocol is added after the protocol data unit.
As shown in fig. 5, since the maximum length of the protocol data unit of the second 2.4G packet is 32 bytes, and the minimum length of the protocol data unit of the second BLE packet excluding the protocol data unit portion is 8 bytes, and the minimum length of the protocol data unit is 2 bytes, the length of the protocol data unit of the second 2.4G packet is 10-32 bytes, and the length of the protocol data unit of the second BLE packet is 2-24 bytes.
And S24, sending the second 2.4G data packet to a mobile terminal, so that the mobile terminal can know the response operation of the custom 2.4G wireless device according to a response command carried by the second BLE data packet.
The synchronization address of the first 2.4G data packet is a synchronization address of a custom 2.4G device, and the synchronization address of the second BLE data packet is a BLE broadcast synchronization address defined in BLE protocol specification.
According to the method for communication between the mobile terminal and the custom 2.4G wireless device, provided by the embodiment of the invention, through software processing, namely, a control command for operating the custom 2.4G wireless device is borne in a protocol data unit of a BLE data packet sent by the mobile terminal in a 2.4G data packet structure form, and meanwhile, a response command of the control command is borne in the protocol data unit of the 2.4G data packet sent by the custom 2.4G wireless device in a BLE data packet structure form, so that communication between the mobile terminal and the custom 2.4G wireless device is realized. Compared with the prior art, the method and the device have the advantages that the existing hardware scheme in the user-defined 2.4G wireless device is not required to be changed, namely, a BLE chip is not required to be added in the user-defined 2.4G wireless device, so that the realization cost of controlling the user-defined 2.4G wireless device through a mobile phone and the power consumption of the user-defined 2.4G wireless device can be reduced.
In this embodiment, since the protocol data unit of the second 2.4G data packet sent by the customized 2.4G wireless device conforms to the BLE broadcast packet of the BLE protocol specification, the BLE chip of the mobile terminal may receive data through the Preamble and the Sync Address in the protocol data unit, and treat the other parts as white noise.
Further, the method further comprises:
and broadcasting the self synchronous address at regular time.
An embodiment of the present invention provides a device for communication between a mobile terminal and a custom 2.4G wireless device, which is disposed in the custom 2.4G wireless device, and as shown in fig. 6, the device includes:
a second receiving module 21, configured to receive a first 2.4G data packet that is carried in the first BLE data packet and subjected to whitening processing and sent by the mobile terminal;
the second processing module 22 is configured to execute a corresponding control operation according to the control command carried in the first 2.4G data packet;
a second constructing module 23, configured to construct a second 2.4G data packet that carries the whitened second BLE data packet in its protocol data unit;
a second sending module 24, configured to send the second 2.4G data packet to a mobile terminal, so that the mobile terminal obtains a response operation of the customized 2.4G wireless device according to a response command carried in the second BLE data packet;
wherein the protocol data unit of the first 2.4G data packet carries a control command for operating the customized 2.4G wireless device, and the protocol data unit of the second BLE data packet carries a response command of the control command;
the synchronization address of the first 2.4G data packet is a synchronization address of a custom 2.4G device, and the synchronization address of the second BLE data packet is a BLE broadcast synchronization address defined in BLE protocol specification.
According to the device for communication between the mobile terminal and the customized 2.4G wireless device, provided by the embodiment of the invention, through software processing, namely, a control command for operating the customized 2.4G wireless device is borne in a protocol data unit of a BLE data packet sent by the mobile terminal in a form of a 2.4G data packet structure, and meanwhile, a response command of the control command is borne in the protocol data unit of the 2.4G data packet sent by the customized 2.4G wireless device in a form of the BLE data packet structure, so that the communication between the mobile terminal and the customized 2.4G wireless device is realized. Compared with the prior art, the method and the device have the advantages that the existing hardware scheme in the user-defined 2.4G wireless device is not required to be changed, namely, a BLE chip is not required to be added in the user-defined 2.4G wireless device, so that the realization cost of controlling the user-defined 2.4G wireless device through a mobile phone and the power consumption of the user-defined 2.4G wireless device can be reduced.
Further, the apparatus further comprises:
and the broadcasting module is used for broadcasting the self synchronous address at fixed time.
It should be noted that, the mobile terminal described in the present invention may be a mobile phone, but is not limited to a mobile phone.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by controlling the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when executed, the program can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
The above description is only for the specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (8)

1. A method for communication between a mobile terminal and a user-defined 2.4G wireless device is applied to the mobile terminal, and is characterized by comprising the following steps:
constructing a first BLE data packet carrying a first 2.4G data packet subjected to whitening processing on a protocol data unit;
performing whitening processing on the first BLE data packet;
sending the whitened first BLE data packet to the custom 2.4G wireless device, so that the custom 2.4G wireless device can execute corresponding control operation according to a control command carried by the first 2.4G data packet;
receiving a second BLE data packet carried in a second 2.4G data packet protocol data unit and sent by the custom 2.4G wireless device;
according to a response command carried by the second BLE data packet, obtaining a response operation of the user-defined 2.4G wireless device to the control command;
the protocol data unit of the first 2.4G data packet carries a control command for operating the customized 2.4G wireless device, and the protocol data unit of the second BLE data packet carries a response command of the control command;
the synchronization address of the first 2.4G data packet is a synchronization address of a custom 2.4G wireless device, and the synchronization address of the second BLE data packet is a BLE broadcast synchronization address defined in a BLE protocol specification.
2. The method according to claim 1, wherein before the constructing the first BLE data packet carrying the whitened first 2.4G data packet in its protocol data unit, further comprises:
scanning to the synchronization address of the custom 2.4G wireless device.
3. The utility model provides a device that mobile terminal and self-defined 2.4G wireless device communicate, sets up in mobile terminal which characterized in that includes:
the first building module is used for building a first BLE data packet which carries the whitened first 2.4G data packet on a protocol data unit;
a first whitening module to whiten the first BLE data packet;
a first sending module, configured to send the whitened first BLE data packet to the custom 2.4G wireless device, so that the custom 2.4G wireless device can execute a corresponding control operation according to a control command carried in the first 2.4G data packet;
a first receiving module, configured to receive a second BLE data packet that is carried in a second 2.4G data packet protocol data unit and is sent by the custom 2.4G wireless device;
a first processing module, configured to obtain, according to a response command carried in the second BLE data packet, a response operation of the user-defined 2.4G wireless device to the control command;
the protocol data unit of the first 2.4G data packet carries a control command for operating the customized 2.4G wireless device, and the protocol data unit of the second BLE data packet carries a response command of the control command;
the synchronization address of the first 2.4G data packet is a synchronization address of a custom 2.4G wireless device, and the synchronization address of the second BLE data packet is a BLE broadcast synchronization address defined in a BLE protocol specification.
4. The apparatus of claim 3, further comprising:
and the scanning module scans the synchronous address of the self-defined 2.4G wireless equipment.
5. A method for communication between a mobile terminal and a custom 2.4G wireless device is applied to the custom 2.4G wireless device, and is characterized by comprising the following steps:
receiving a first 2.4G data packet which is carried in a first BLE data packet and subjected to whitening processing and sent by the mobile terminal;
executing corresponding control operation according to the control command carried by the first 2.4G data packet;
constructing a second 2.4G data packet carrying the whitened second BLE data packet in the protocol data unit;
sending the second 2.4G data packet to a mobile terminal, so that the mobile terminal can obtain the response operation of the user-defined 2.4G wireless device according to a response command carried by the second BLE data packet;
wherein the protocol data unit of the first 2.4G data packet carries a control command for operating the customized 2.4G wireless device, and the protocol data unit of the second BLE data packet carries a response command of the control command;
the synchronization address of the first 2.4G data packet is a synchronization address of a custom 2.4G wireless device, and the synchronization address of the second BLE data packet is a BLE broadcast synchronization address defined in a BLE protocol specification.
6. The method of claim 5, further comprising:
and broadcasting the self synchronous address at regular time.
7. The utility model provides a device of mobile terminal and self-defined 2.4G wireless device communication, sets up in self-defined 2.4G wireless device which characterized in that includes:
a second receiving module, configured to receive a first 2.4G data packet that is carried in a first BLE data packet and subjected to whitening processing and sent by the mobile terminal;
the second processing module is used for executing corresponding control operation according to the control command carried by the first 2.4G data packet;
a second constructing module, configured to construct a second 2.4G packet that carries the whitened second BLE packet in the protocol data unit;
a second sending module, configured to send the second 2.4G data packet to a mobile terminal, so that the mobile terminal obtains a response operation of the custom 2.4G wireless device according to a response command carried in the second BLE data packet;
wherein the protocol data unit of the first 2.4G data packet carries a control command for operating the customized 2.4G wireless device, and the protocol data unit of the second BLE data packet carries a response command of the control command;
the synchronization address of the first 2.4G data packet is a synchronization address of a custom 2.4G wireless device, and the synchronization address of the second BLE data packet is a BLE broadcast synchronization address defined in a BLE protocol specification.
8. The apparatus of claim 7, further comprising:
and the broadcasting module is used for broadcasting the self synchronous address at fixed time.
CN201710112900.9A 2017-02-28 2017-02-28 Method and device for communication between mobile terminal and user-defined 2.4G wireless equipment Active CN108512574B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710112900.9A CN108512574B (en) 2017-02-28 2017-02-28 Method and device for communication between mobile terminal and user-defined 2.4G wireless equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710112900.9A CN108512574B (en) 2017-02-28 2017-02-28 Method and device for communication between mobile terminal and user-defined 2.4G wireless equipment

Publications (2)

Publication Number Publication Date
CN108512574A CN108512574A (en) 2018-09-07
CN108512574B true CN108512574B (en) 2021-01-29

Family

ID=63374178

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710112900.9A Active CN108512574B (en) 2017-02-28 2017-02-28 Method and device for communication between mobile terminal and user-defined 2.4G wireless equipment

Country Status (1)

Country Link
CN (1) CN108512574B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108924804A (en) * 2018-07-09 2018-11-30 苏州澜普智能技术有限公司 A method of based on inexpensive GFSK chip and mobile communication
CN111144535A (en) * 2019-12-24 2020-05-12 湖州太平微特电机有限公司 Pseudo-bluetooth electronic tags of low cost
CN113242204A (en) * 2021-03-11 2021-08-10 上海兆煊微电子有限公司 Processing device supporting BLE standard protocol or private protocol
CN113613224A (en) * 2021-07-23 2021-11-05 上海磐启微电子有限公司 Bluetooth communication method based on 2.4G chip

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101977275A (en) * 2010-08-27 2011-02-16 深圳市汇通世纪移动科技有限公司 Method for obtaining on-board computer data by mobile communication terminal and mobile terminal thereof
CN103985234A (en) * 2014-04-23 2014-08-13 杭州微纳科技有限公司 Remote control method based on bluetooth broadcast packet
CN104036628A (en) * 2014-05-22 2014-09-10 杭州微纳科技有限公司 Intelligent remote controller based on Bluetooth and quick pairing method
CN104318741A (en) * 2014-10-20 2015-01-28 小米科技有限责任公司 Bluetooth device control method and device
CN104754494A (en) * 2015-02-28 2015-07-01 江苏惠通集团有限责任公司 Communicating method and device
CN105099836A (en) * 2014-05-14 2015-11-25 深圳市民展科技开发有限公司 BLE intelligent node control method and system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140273824A1 (en) * 2013-03-15 2014-09-18 Medtronic, Inc. Systems, apparatus and methods facilitating secure pairing of an implantable device with a remote device using near field communication

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101977275A (en) * 2010-08-27 2011-02-16 深圳市汇通世纪移动科技有限公司 Method for obtaining on-board computer data by mobile communication terminal and mobile terminal thereof
CN103985234A (en) * 2014-04-23 2014-08-13 杭州微纳科技有限公司 Remote control method based on bluetooth broadcast packet
CN105099836A (en) * 2014-05-14 2015-11-25 深圳市民展科技开发有限公司 BLE intelligent node control method and system
CN104036628A (en) * 2014-05-22 2014-09-10 杭州微纳科技有限公司 Intelligent remote controller based on Bluetooth and quick pairing method
CN104318741A (en) * 2014-10-20 2015-01-28 小米科技有限责任公司 Bluetooth device control method and device
CN104754494A (en) * 2015-02-28 2015-07-01 江苏惠通集团有限责任公司 Communicating method and device

Also Published As

Publication number Publication date
CN108512574A (en) 2018-09-07

Similar Documents

Publication Publication Date Title
CN108512574B (en) Method and device for communication between mobile terminal and user-defined 2.4G wireless equipment
CN103458399B (en) Intelligent WIFI module and method for configuring device supporting WIFI connection into WIFI network
WO2016192458A1 (en) User terminal, home central controller and smart home control method and system
US9917733B2 (en) Communication device, control method, program product and communication system
CN103684550A (en) Bluetooth signal transmission power adjusting system and mobile terminal
CN104185092A (en) Remote control adaptor and adaption method
CN107005939B (en) Prioritized RTS-CTS resources
CN109450749B (en) Communication switching electric control board, household electrical appliance and household electrical appliance control system
CN103986501B (en) A kind of Bluetooth control device, system and method
CN105223818A (en) A kind of incoming call sound method and system
CN107248977B (en) Binding authentication method, device, system and storage medium
CN104394048A (en) Intelligent module and intelligent household electrical appliance control system and method
US11218332B2 (en) Data transmission method and smart household control device
CN204438539U (en) A kind of dual-mode cloud water-heater system based on Wi-Fi communication mode
CN205046374U (en) But cell -phone remote control's intelligent airing machine
CN110798815A (en) Intelligent household system, electric appliance control method and device and router
CN105099836A (en) BLE intelligent node control method and system
CN108737228B (en) Intelligent home system, intelligent gateway and control method thereof
JP6703602B2 (en) First wireless communication terminal, second wireless communication terminal, wireless communication system, wireless communication method, and program
CN204733168U (en) Based on the Wi-Fi configuration-system of sound wave
CN108307447A (en) Wireless network transmissions control method, device, storage medium and terminal device
WO2017092256A1 (en) Anti-interference communication method, system, smart television and remote control device
CN109743715B (en) Processing method and system and electronic equipment
Steane et al. A universal iot joining protocol for DIY applications
CN105869375A (en) Method and device for controlling terminal device by remote control terminal and remote control terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 518057 room 407-408, west block, Skyworth semiconductor building, Gaoxin South 4th Road, Yuehai street, Nanshan District, Shenzhen City, Guangdong Province

Applicant after: Shenzhen Angrui Microelectronics Technology Co.,Ltd.

Address before: 518057 Room 303, block a, Skyworth building, Nanshan District, Shenzhen City, Guangdong Province

Applicant before: SHENZHEN ZHONGKEHAN TIANXIA ELECTRONICS Co.,Ltd.

GR01 Patent grant
GR01 Patent grant