CN112230951A - System and method for realizing OTA (over the air) upgrade of mouse based on BNEP (Bluetooth technology attachment) Bluetooth - Google Patents

System and method for realizing OTA (over the air) upgrade of mouse based on BNEP (Bluetooth technology attachment) Bluetooth Download PDF

Info

Publication number
CN112230951A
CN112230951A CN202011017017.XA CN202011017017A CN112230951A CN 112230951 A CN112230951 A CN 112230951A CN 202011017017 A CN202011017017 A CN 202011017017A CN 112230951 A CN112230951 A CN 112230951A
Authority
CN
China
Prior art keywords
mouse
bluetooth
module
ota
power
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.)
Granted
Application number
CN202011017017.XA
Other languages
Chinese (zh)
Other versions
CN112230951B (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.)
Yizhao Micro Electronics Hangzhou Co Ltd
Original Assignee
Yizhao Micro Electronics Hangzhou 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 Yizhao Micro Electronics Hangzhou Co Ltd filed Critical Yizhao Micro Electronics Hangzhou Co Ltd
Priority to CN202011017017.XA priority Critical patent/CN112230951B/en
Publication of CN112230951A publication Critical patent/CN112230951A/en
Application granted granted Critical
Publication of CN112230951B publication Critical patent/CN112230951B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. TPC [Transmission Power Control], power saving or power classes
    • H04W52/02Power saving arrangements
    • H04W52/0209Power saving arrangements in terminal devices
    • H04W52/0251Power saving arrangements in terminal devices using monitoring of local events, e.g. events related to user activity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/40Connection management for selective distribution or broadcast
    • 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)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Small-Scale Networks (AREA)

Abstract

A system and a method for realizing mouse OTA upgrading based on BNEP Bluetooth belong to the technical field of communication. The mouse terminal equipment and the user terminal equipment complete Bluetooth connection; the mouse terminal equipment starts a shared network switch, and OTA upgrading is realized by the mouse terminal equipment through BNEP and the built background server. According to the system and the method for realizing mouse OTA upgrading based on BNEP Bluetooth, the process of upgrading the mouse terminal equipment is simplified, the user terminal equipment does not need to download application software or an upper computer, and the memory space of the user terminal equipment is not occupied; the method and the device realize silent updating of the OTA firmware of the user, and the user can realize upgrading and updating of the mouse terminal equipment without operation, thereby greatly improving the operation convenience of the user and saving the resources of the user.

Description

System and method for realizing OTA (over the air) upgrade of mouse based on BNEP (Bluetooth technology attachment) Bluetooth
Technical Field
The invention belongs to the technical field of communication, and particularly relates to a system and a method for realizing OTA (over the air) mouse upgrading based on BNEP (Bluetooth technology attachment).
Background
Currently, application software or an upper computer is installed on user equipment, and the application software or the upper computer acquires firmware needing OTA on a server. The application software or the upper computer calls different protocol interfaces of the SPP/GATT to issue to the Bluetooth of the equipment according to the data transmission mode required by the corresponding protocol, and the Bluetooth of the equipment receives the data and then forwards the received OTA data to the MCU of the equipment through the Uart to finish the OTA firmware upgrade of the equipment; the mouse terminal equipment is connected with the user equipment through a Bluetooth module, and OTA upgrading is achieved. The prior art has the following defects: different devices adopt different Bluetooth schemes to cause OTA compatibility difference; the user equipment can realize the upgrading function only by downloading application software or installing an upper computer, and user equipment resources are occupied; compatibility and adaptability of application software on different devices; the transmission speed is slow.
Disclosure of Invention
Aiming at the problems in the prior art, the invention aims to design and provide a technical scheme for realizing mouse OTA upgrading based on BNEP Bluetooth and a method thereof.
The system for realizing OTA (over the air) mouse upgrading based on BNEP (Bluetooth technology over Ethernet) is characterized by comprising mouse terminal equipment, user terminal equipment and a network server, wherein the mouse terminal equipment comprises a hardware module, a mouse Bluetooth module and a low-power-consumption module; the mobile equipment end comprises a Bluetooth module and a network transceiving module; the network server comprises a data processing module and a server network module.
The hardware module comprises a key, a roller, an LED lamp, a photoelectric chip and a toggle switch; the mouse Bluetooth module is used for establishing connection, Bluetooth pairing, over-distance disconnection and back connection; the low-power module comprises a Yichip Bluetooth chip, LPM low-power consumption and Hibernate shutdown;
the user equipment end Bluetooth module is used for connecting with mouse terminal equipment and carrying out data transmission through BNEP, and the user equipment end network module is connected with 3G, 4G, 5G, WIFI or a wired network;
the data processing module is responsible for processing the received data information and sending data to the user terminal equipment through the server network module according to requirements; the server network module is mainly connected with a network, and is used for receiving data transmitted by the user terminal equipment through the network and transmitting the data to the user terminal equipment through the network.
The system for realizing mouse OTA upgrading based on BNEP Bluetooth is characterized in that the mobile equipment end is a mobile phone, a computer or a tablet, and the connection network between the mobile equipment end and the server is 3G, 4G, 5G, WIFI or a wired network.
The upgrading method for realizing the mouse OTA upgrading system based on BNEP Bluetooth is characterized by comprising the following steps:
1) a YIchip Bluetooth chip is arranged in a low-power-consumption module of the mouse terminal, the mouse Bluetooth module of the mouse terminal is matched and connected with user terminal equipment, and the mouse terminal realizes data exchange with the built background server through BNEP;
2) the mouse terminal initiatively initiates an OTA upgrading request to acquire OTA upgrading information, or a background server of a mouse manufacturer initiates OTA upgrading;
3) after OTA upgrading is started, the background server issues OTA firmware through a network, and the mobile equipment terminal directly transmits the firmware to the mouse terminal through BNEP;
4) the mouse terminal receives the OTA firmware sent by the server and can carry out verification, the verification data abnormity can request to resend the OTA firmware, and if the verification is correct, the received OTA firmware program is stored in the local memory;
5) after the mouse terminal finishes the firmware storage, the local updating of the firmware can be carried out, and the OTA upgrading is realized.
The upgrading method for realizing mouse OTA upgrading system based on BNEP Bluetooth is characterized in that an optoelectronic chip in a hardware module of the mouse terminal equipment is the basis that a mouse can be scribed, and converts an electric signal into an optical signal and then converts the optical signal into an optical signalThe digital signal is reflected, the lineation optimization algorithm enables lineation to be straighter and smoother, the principle is that a curve is pulled smoothly through coordinate points, a line drawn by a mouse is regarded as a cubic B-spline curve, and the general equation is as follows:
Figure BDA0002699388300000031
wherein Pi is a characteristic point of the control curve, and Fi, K (t) is a B-spline basis function of K order;
the basis functions in the cubic B-spline curve equation are:
Figure BDA0002699388300000032
wherein
Figure BDA0002699388300000033
The expression factorial, which is understood as a clear expression:
Figure BDA0002699388300000034
Figure BDA0002699388300000035
Figure BDA0002699388300000036
Figure BDA0002699388300000037
and substituting the basis function into a general equation to calculate a cubic B-spline curve equation:
P(t)=P0*F0,3(t)+P1*F1,3(t)+P2*F2,3(t)+P3*F3,3(t)
the curve can be smoothed based on the cubic B-spline curve equation, so that the mouse is linear, fine and smooth, and the use experience is better.
The upgrading method for realizing the mouse OTA upgrading system based on BNEP Bluetooth is characterized in that mouse terminal equipment is a slave computer, and user terminal equipment Bluetooth is a host computer; the slave computer end is started and triggers ADV broadcast, the host computer end scans Bluetooth equipment after Bluetooth is opened, and the slave computer is scanned to reply to the host computer; the host end is connected in a clicking mode, the slave end responds to a safety request broadcast packet after receiving a connection request of the host end, and the host end initiates a pairing request after receiving a broadcast packet of slave safety pairing; after receiving the pairing request of the host, the slave replies that the host agrees to pairing; the host and the slave can transmit information and generate a pairing secret key; after the secret key is generated, the host and the slave store the pairing information and complete the pairing.
The upgrading method for realizing the mouse OTA upgrading system based on BNEP Bluetooth is characterized in that the low-power module comprises an LPM power domain in the internal level of a chip, the LPM power domain is an independent power domain, the control chip enters a special mode-LPM mode, in the mode, other power domains are disconnected, the first part is an LPM module which comprises an RC oscillator and a 32K low-power oscillator LPO used for driving the module, important registers are contained in the LPM module, and an XTAL crystal oscillator oscillation starting circuit is also in the power domain; the power domain also comprises four memories, each memory can be independently turned off and on, the power consumption is microampere, the memory started by a 4k address on software is used at most, and the memory is divided into two 2k parts, namely a low address and a high address, so that power is saved by independently switching on and off in certain applications; the third block is a 8k sized patch; and a further block is 16k 51 codeam; the memory is placed under the LPM power domain to keep various states in the LPM mode, because other power domains are turned off in the low power consumption mode, and can be quickly awakened when the memory is recovered from the LPM mode, including patch and 51code, and the memory does not need to be loaded from the outside again; the 32K low-power oscillator independently provides an accurate Bluetooth clock for awakening the low-power mode;
the low-power-consumption module comprises hibernate shutdown, and can judge whether to enter a sleep state when the product is not operated for a long time; the sleep state configures a specific GPIO to wake up; each product needs to be turned on and off; by configuring a specific GPIO pin in the power-on initialization of a main program, equipment in a sleep state can detect the specific GPIO pin and can recover from the state immediately once being pressed, which is equivalent to soft reset; the soft reset uses a POR circuit, a voltage threshold value is detected in the process that VIN rises to 3V, and the POR circuit is always in a reset state, cannot be overturned and cannot be released when the VIN is below the threshold value; when the threshold value is reached, the retet is released, the system is initialized, and the system works normally; and (3) power-on reset POR, wherein the POR is used for outputting two modules of VIN-LDO and VIN-LPM-LDO, the two outputs can be changed into 1.2V when the VIN voltage reaches 3V, and the POR is triggered at the moment.
The upgrading method for realizing the mouse OTA upgrading system based on BNEP Bluetooth is characterized in that in the process of disconnection and reconnection of the over-distance of the mouse terminal Bluetooth module, when the Bluetooth exceeds the receiving range of the RF signal, the process of reconnection is carried out, and the specific realization method is as follows:
1) the master is always in a packet listening state;
2) the slave sends out an ADV broadcast packet with a master address, namely a reconnection packet;
3) the link management of the master side requests the LMP link management protocol Host _ connection _ req type protocol data unit, the link management of the slave side confirms the connection of the opposite side, and if the address is stored, the connection is carried out.
The upgrading method for realizing the mouse OTA upgrading system based on BNEP Bluetooth is characterized in that a mouse terminal actively initiates a request of OTA upgrading, acquires OTA upgrading information, or a background server of a mouse manufacturer initiates OTA upgrading, adopts automatic popup prompting to inform a user of upgrading, sets an ADV broadcast packet FLAG bit ADV _ FLAG _ BREDR _ NOT _ SUPPORTED, and the FLAG bit has three bytes: 020105, and checking for multiple times to ensure accuracy, the check code is randomly generated, and the original default check is: 06ff 0600030080, performs firmware overlay update by requesting p _ le _ adv _ data _ update.
The YiChip bluetooth low energy chip of the keyboard terminal device is a YC1021S chip manufactured by jammer microelectronics (hangzhou) gmbh of the applicant of the present patent, and is directly available in the market.
According to the system and the method for realizing mouse OTA upgrading based on BNEP Bluetooth, the process of upgrading the mouse terminal equipment is simplified, the user terminal equipment does not need to download application software or install an upper computer, and the memory space of the user terminal equipment is not occupied; the method realizes silent updating of the OTA firmware of the user, and the user can realize upgrading and updating of the mouse terminal equipment without operation; the data transmission efficiency is higher.
Drawings
FIG. 1 is a block diagram of the system architecture of the present invention;
FIG. 2 is a schematic diagram of the system of the present invention;
FIG. 3 is a flow chart of an implementation of the present invention;
FIG. 4 is a diagram of a matrix key structure of the present invention;
FIG. 5 is a block diagram of a YIChip Bluetooth Low energy chip of the mouse terminal device;
FIG. 6 is a diagram illustrating Bluetooth pairing according to the present invention;
FIG. 7 is a schematic diagram of the LPM power domain of the low power module of the present invention;
in the figure: 1-mouse terminal equipment, 2-user terminal equipment, 3-background server, 101-hardware module, 102-mouse Bluetooth module, 103-low power consumption module, 201-mobile terminal Bluetooth module, 202-mobile terminal network module, 301-data processing module and 302-server network module.
Detailed Description
The present invention will be further described with reference to the accompanying drawings, which are simplified schematic drawings illustrating only the basic mechanism of the present invention and thus show only the structure related to the present invention.
BNEP is called Bluetooth Network Encapsulation Protocol (Network Encapsulation Protocol, hereinafter referred to as BNEP). BNEP is designed for PAN applications and provides an application model for constructing bluetooth wireless lan, and BNEP can perform mapping network protocol hierarchy from IP layer to L2CAP layer as shown in fig. 1. The bluetooth personal area Network provides networking capability for bluetooth devices by using BNEP, so that two or more bluetooth devices form a temporary Ad-hoc Network (GN), or Access a remote Network through a Network Access Point (NAP). BNEP provides translation of the bluetooth protocol stack and the TCP/IP protocol stack, and IEEE802.3 ethernet encapsulation supports the same upper layer network protocols. The MTU of the BNEP payload area locates 1691 bytes, which can ensure one-time transmission of Ethernet layer packets sent downwards by the network layer. In terms of data transfer, BNEP directly receives the ethernet packet sent down by the IP layer, and directly copies the ethernet payload area to the BNEP payload area, and sends the resulting area to the L2CAP layer after adding the BNEP header.
The system for realizing mouse OTA upgrading based on BNEP Bluetooth comprises a mouse terminal device 1, a user terminal device 2 and a network server 3, wherein the mouse terminal device 1 comprises a hardware module 101, a mouse Bluetooth module 102 and a low power consumption module 103; the mobile device end 2 comprises a Bluetooth module 201 and a network transceiver module 202; the network server 3 comprises a data processing module 301 and a server network module 302. The hardware module 101 comprises a key, a roller, an LED lamp, a photoelectric chip and a toggle switch; the mouse Bluetooth module 102 is used for establishing connection, Bluetooth pairing, over-distance disconnection and reconnection; the low-power module 103 comprises a Yichip Bluetooth, LPM low-power and Hibernate shutdown; the user equipment side bluetooth module 201 is configured to connect with a mouse terminal device 1 and perform data transmission through BNEP, and the user equipment side network module 202 is connected to 3G, 4G, 5G, WIFI or a wired network; the data processing module 301 is responsible for processing the received data information and sending data to the user terminal device 2 through the server network module 302 as required; the server network module 302 is mainly connected to a network, and receives data transmitted by the user terminal device 2 through the network and transmits the data to the user terminal device 2 through the network. The mobile device end 2 is a mobile phone, a computer or a tablet, and the connection network between the mobile device end 2 and the server 3 is 3G, 4G, 5G, WIFI or a wired network.
In the above system, the keys of the hardware module 101 are important components of the mouse, each key has its own unique function, and further functions, such as switching system functions, triggering bluetooth broadcast functions, etc., can be realized by the combination keys, although the number of keys is not large, the key scanning module of the IO port needs to be specially written, and the adopted matrix key structure is as shown in fig. 4; the rollers of the hardware module 101 act together with the encoder to realize up-and-down rolling/page turning; the LED lamps of the hardware module 101 have different lamp effects in different scenes, and represent different meanings, and are distinguished by the color of the lamps and the flashing frequency, for example, bluetooth broadcast, mode indication, status indication, low-power indication, and the like can be represented; the toggle switch of the hardware module 101 is used for controlling the power supply of the mouse, the power supply is kept on when the mouse works, and the power supply can be selected to be off when the mouse does not work for a long time, so that the power can be saved, and the circuit can be protected.
The mouse Bluetooth module 102 is used for Bluetooth pairing, the pairing is a unique and important process in Bluetooth, data can be encrypted, and quick connection after data encryption is facilitated; pairing original names, wherein the definition in the protocol is the process of exchanging secret keys; pairing is a very complex process, information exchanged by two parties comprises equipment addresses, masks, IRKs and the like, and through a complex algorithm, a key generated finally is called LTK (Long term key); the two-side equipment finally stores the common LTK of the two sides and the address information of the other side, and some special addresses also need to store IRKs; the information can be stored in NV _ ram, eeprom exists in the equipment, power-off cannot be lost, and reconnection after next startup is facilitated; the main function of pairing is encryption, and once pairing takes effect, all information is processed by a special algorithm; thus, the information security of the equipment is greatly improved; BLE pairing is a three-phase process, the first two phases always being used, possibly followed by an optional phase of transmission-specific key allocation; stage 1, pairing feature exchange; stage 2, generating a short-term secret key (STK); stage 3, transmission specific key distribution.
The method for realizing the upgrading of the mouse OTA system based on the BNEP Bluetooth comprises the following steps:
1) a YIchip Bluetooth chip is arranged in a low-power-consumption module 103 of the mouse terminal 1, the mouse Bluetooth module 102 of the mouse terminal is matched and connected with the user terminal equipment 2, and the mouse terminal 1 realizes data exchange with the built background server 3 through BNEP;
2) the mouse terminal 1 actively initiates an OTA upgrading request to acquire OTA upgrading information, or the background server 3 of a mouse manufacturer initiates OTA upgrading;
3) after OTA upgrading is started, the background server 3 issues OTA firmware through a network, and the mobile equipment terminal 2 directly transmits the firmware to the mouse terminal 1 through BNEP;
4) the mouse terminal 1 receives the OTA firmware sent by the server 3 and can carry out verification, the verification data abnormity can request to resend the OTA firmware, and if the verification is correct, the received OTA firmware program is stored in a local memory;
5) after the mouse terminal 1 finishes the firmware storage, the local updating of the firmware can be carried out, and the OTA upgrading is realized.
In the above upgrading method, the optoelectronic chip in the hardware module 101 of the mouse terminal device 1 is the basis that the mouse can draw a line, converts an electrical signal into an optical signal and then converts the optical signal into a digital signal to be reflected, and the line drawing optimization algorithm makes the line drawing straighter and smoother, and the principle is to draw a curve smoothly through a coordinate point, and the line drawn by the mouse is regarded as a cubic B-spline curve, and the general equation is as follows:
Figure BDA0002699388300000091
wherein Pi is a characteristic point of the control curve, and Fi, K (t) is a B-spline basis function of K order;
the basis functions in the cubic B-spline curve equation are:
Figure BDA0002699388300000092
wherein
Figure BDA0002699388300000101
The expression factorial, which is understood as a clear expression:
Figure BDA0002699388300000102
Figure BDA0002699388300000103
Figure BDA0002699388300000104
Figure BDA0002699388300000105
and substituting the basis function into a general equation to calculate a cubic B-spline curve equation:
P(t)=P0*F0,3(t)+P1*F1,3(t)+P2*F2,3(t)+P3*F3,3(t)
the curve can be smoothed based on the cubic B-spline curve equation, so that the mouse is linear, fine and smooth, and the use experience is better.
In the upgrading method, the mouse terminal device 1 is a slave computer, and the user terminal device 2 is a master computer through Bluetooth; the slave computer end is started and triggers ADV broadcast, the host computer end scans Bluetooth equipment after Bluetooth is opened, and the slave computer is scanned to reply to the host computer; the host end is connected in a clicking mode, the slave end responds to a safety request broadcast packet after receiving a connection request of the host end, and the host end initiates a pairing request after receiving a broadcast packet of slave safety pairing; after receiving the pairing request of the host, the slave replies that the host agrees to pairing; the host and the slave can transmit information and generate a pairing secret key; after the secret key is generated, the host and the slave store the pairing information and complete the pairing.
In the above upgrading method, the low power consumption module 103 includes an LPM power domain at an internal level of the chip, the LPM power domain is a separate power domain, the chip is controlled to enter a special mode, i.e., an LPM mode, in which other power domains are all off, the first part is an LPM module including an RC oscillator, a 32K low power consumption oscillator LPO for driving the module, important registers are included therein, and the XTAL crystal oscillation start circuit is also in the power domain; the power domain also comprises four memories, each memory can be independently turned off and on, the power consumption is microampere, the memory started by a 4k address on software is used at most, and the memory is divided into two 2k parts, namely a low address and a high address, so that power is saved by independently switching on and off in certain applications; the third block is a 8k sized patch; and a further block is 16k 51 codeam; the memory is placed under the LPM power domain to keep various states in the LPM mode, because other power domains are turned off in the low power consumption mode, and can be quickly awakened when the memory is recovered from the LPM mode, including patch and 51code, and the memory does not need to be loaded from the outside again; the 32K low-power oscillator independently provides an accurate Bluetooth clock for awakening the low-power mode;
the low power consumption module 103 comprises hibernate shutdown, and can judge whether to enter a sleep state when the product is not operated for a long time; the sleep state configures a specific GPIO to wake up; each product needs to be turned on and off; by configuring a specific GPIO pin in the power-on initialization of a main program, equipment in a sleep state can detect the specific GPIO pin and can recover from the state immediately once being pressed, which is equivalent to soft reset; the soft reset uses a POR circuit, a voltage threshold value is detected in the process that VIN rises to 3V, and the POR circuit is always in a reset state, cannot be overturned and cannot be released when the VIN is below the threshold value; when the threshold value is reached, the retet is released, the system is initialized, and the system works normally; and (3) power-on reset POR, wherein the POR is used for outputting two modules of VIN-LDO and VIN-LPM-LDO, the two outputs can be changed into 1.2V when the VIN voltage reaches 3V, and the POR is triggered at the moment.
In the above upgrading method, during the over-distance disconnection and reconnection of the mouse terminal bluetooth module 102, when the bluetooth exceeds the receiving range of the RF signal, the procedure of the reconnection will be followed:
1) the master is always in a packet listening state;
2) the slave sends out an ADV broadcast packet with a master address, namely a reconnection packet;
the link management of the 3master side requests the LMP link management protocol Host _ connection _ req type protocol data unit, the link management of the slave side confirms the connection of the other side, and if the connection is carried out by the saved address.
In the above upgrading method, the mouse terminal 1 actively initiates a request for OTA upgrading to obtain OTA upgrading information, or the mouse manufacturer background server 3 initiates OTA upgrading, and adopts automatic popup prompt to notify the user of upgrading, and sets the FLAG bit ADV _ FLAG _ broadcast _ NOT _ SUPPORTED of the ADV broadcast packet, and the FLAG bit has three bytes: 020105, and checking for multiple times to ensure accuracy, the check code is randomly generated, and the original default check is: 06ff 0600030080, performs firmware overlay update by requesting p _ le _ adv _ data _ update.
While specific embodiments of the invention have been described above, it will be appreciated by those skilled in the art that these are by way of example only, and that the scope of the invention is defined by the appended claims. Various changes and modifications to these embodiments may be made by those skilled in the art without departing from the spirit and scope of the invention, and these changes and modifications are within the scope of the invention.

Claims (8)

1. A system for realizing mouse OTA upgrading based on BNEP Bluetooth is characterized by comprising a mouse terminal device (1), a user terminal device (2) and a network server (3), wherein the mouse terminal device (1) comprises a hardware module (101), a mouse Bluetooth module (102) and a low-power module (103); the mobile equipment end (2) comprises a Bluetooth module (201) and a network transceiver module (202); the network server (3) comprises a data processing module (301) and a server network module (302); the hardware module (101) comprises a key, a roller, an LED lamp, a photoelectric chip and a toggle switch; the mouse Bluetooth module (102) is used for establishing connection, Bluetooth pairing, over-distance disconnection and back connection; the low-power module (103) comprises a Yichip Bluetooth chip, LPM low-power and Hibernate shutdown; the user equipment end Bluetooth module (201) is used for being connected with a mouse terminal device (1) and carrying out data transmission through BNEP, and the user equipment end network module (202) is connected with 3G, 4G, 5G, WIFI or a wired network; the data processing module (301) is responsible for processing the received data information and sending data to the user terminal equipment (2) through the server network module (302) according to requirements; the server network module (302) is mainly connected with a network, receives data transmitted by the user terminal equipment (2) through the network and transmits the data to the user terminal equipment (2) through the network.
2. The BNEP Bluetooth-based mouse OTA upgrade system according to claim 1, wherein the mobile device end (2) is a mobile phone, a computer or a tablet, and the connection network between the mobile device end (2) and the server (3) is 3G, 4G, 5G, WIFI or a wired network.
3. The upgrading method for realizing mouse OTA upgrading system based on BNEP Bluetooth as claimed in claim 1, comprising the following steps:
1) a YIchip Bluetooth chip is arranged in a low-power-consumption module (103) of the mouse terminal (1), the mouse Bluetooth module (102) of the mouse terminal is matched and connected with the user terminal equipment (2), and the mouse terminal (1) is in data exchange with the built background server (3) through BNEP;
2) the mouse terminal (1) initiatively initiates an OTA upgrade request to acquire OTA upgrade information, or the background server (3) of the mouse manufacturer initiates OTA upgrade;
3) after OTA upgrading is started, the background server (3) issues OTA firmware through a network, and the mobile equipment terminal (2) directly transmits the firmware to the mouse terminal (1) through BNEP;
4) the mouse terminal (1) receives the OTA firmware sent by the server (3) and can carry out verification, the OTA firmware can be requested to be sent again when the verification data is abnormal, and the received OTA firmware program is stored in the local memory when the verification is correct;
5) after the mouse terminal (1) finishes the firmware storage, the local updating of the firmware can be carried out, and the OTA upgrading is realized.
4. The upgrading method for implementing mouse OTA upgrading system based on BNEP Bluetooth as claimed in claim 1, wherein the optical electrical core in the hardware module (101) of the mouse terminal device (1)The sheet is the basis that the mouse can be scribed, the sheet converts an electric signal into an optical signal and then converts the optical signal into a digital signal to be reflected, the scribing optimization algorithm enables scribing to be straighter and smoother, the principle is that a curve is pulled smoothly through coordinate points, a line scribed by the mouse is regarded as a cubic B-spline curve, and the general equation is as follows:
Figure FDA0002699388290000021
wherein Pi is a characteristic point of the control curve, and Fi, K (t) is a B-spline basis function of K order;
the basis functions in the cubic B-spline curve equation are:
Figure FDA0002699388290000022
wherein
Figure FDA0002699388290000023
The expression factorial, which is understood as a clear expression:
Figure FDA0002699388290000031
Figure FDA0002699388290000032
Figure FDA0002699388290000033
Figure FDA0002699388290000034
and substituting the basis function into a general equation to calculate a cubic B-spline curve equation:
P(t)=P0*F0,3(t)+P1*F1,3(t)+P2*F2,3(t)+P3*F3,3(t)
the curve may be smoothed based on the cubic B-spline curve equation described above.
5. The upgrading method of realizing mouse OTA upgrading system based on BNEP Bluetooth as claimed in claim 3, wherein the mouse terminal device (1) is slave, the user terminal device (2) Bluetooth is master; the slave computer end is started and triggers ADV broadcast, the host computer end scans Bluetooth equipment after Bluetooth is opened, and the slave computer is scanned to reply to the host computer; the host end is connected in a clicking mode, the slave end responds to a safety request broadcast packet after receiving a connection request of the host end, and the host end initiates a pairing request after receiving a broadcast packet of slave safety pairing; after receiving the pairing request of the host, the slave replies that the host agrees to pairing; the host and the slave can transmit information and generate a pairing secret key; after the secret key is generated, the host and the slave store the pairing information and complete the pairing.
6. The upgrading method of claim 3 for realizing mouse OTA upgrading system based on BNEP Bluetooth, wherein the low power module (103) comprises an LPM power domain of an internal level of the chip, the LPM power domain is a separate power domain, the control chip enters a special mode-LPM mode, in which other power domains are disconnected, the first part is an LPM module including an RC oscillator, a 32K low power oscillator LPO for driving the module, important registers are included therein, and an XTAL crystal oscillation starting circuit is also in the power domain; the power domain also comprises four memories, each memory can be independently turned off and on, the power consumption is microampere, the memory started by a 4k address on software is used at most, and the memory is divided into two 2k parts, namely a low address and a high address, so that power is saved by independently switching on and off in certain applications; the third block is a 8k sized patch; and a further block is 16k 51 codeam; the memory is placed under the LPM power domain to keep various states in the LPM mode, because other power domains are turned off in the low power consumption mode, and can be quickly awakened when the memory is recovered from the LPM mode, including patch and 51code, and the memory does not need to be loaded from the outside again; the 32K low-power oscillator independently provides an accurate Bluetooth clock for awakening the low-power mode;
the low-power-consumption module (103) comprises hibernate shutdown, and can judge whether to enter a sleep state when the product is not operated for a long time; the sleep state configures a specific GPIO to wake up; each product needs to be turned on and off; by configuring a specific GPIO pin in the power-on initialization of a main program, equipment in a sleep state can detect the specific GPIO pin and can recover from the state immediately once being pressed, which is equivalent to soft reset; the soft reset uses a POR circuit, a voltage threshold value is detected in the process that VIN rises to 3V, and the POR circuit is always in a reset state, cannot be overturned and cannot be released when the VIN is below the threshold value; when the threshold value is reached, the retet is released, the system is initialized, and the system works normally; and (3) power-on reset POR, wherein the POR is used for outputting two modules of VIN-LDO and VIN-LPM-LDO, the two outputs can be changed into 1.2V when the VIN voltage reaches 3V, and the POR is triggered at the moment.
7. The upgrading method of claim 3 for realizing mouse OTA upgrading system based on BNEP Bluetooth, wherein during the disconnection and reconnection of the mouse terminal Bluetooth module (102), when the Bluetooth exceeds the receiving range of the RF signal, the process of going back to the connection is executed, and the specific implementation method is as follows:
1) the master is always in a packet listening state;
2) the slave sends out an ADV broadcast packet with a master address, namely a reconnection packet;
3) the link management of the master side requests the LMP link management protocol Host _ connection _ req type protocol data unit, the link management of the slave side confirms the connection of the opposite side, and if the address is stored, the connection is carried out.
8. The upgrading method of claim 3 for realizing mouse OTA upgrading system based on BNEP Bluetooth, characterized in that the mouse terminal (1) actively initiates the request of OTA upgrading, acquires OTA upgrading information, or the mouse vendor background server (3) initiates OTA upgrading, uses automatic popup prompt to notify the user of upgrading, sets ADV broadcast packet FLAG bit ADV _ FLAG _ BREDR _ NOT _ SUPPORTED, the FLAG bit has three bytes: 020105, and checking for multiple times to ensure accuracy, the check code is randomly generated, and the original default check is: 06ff 0600030080, performs firmware overlay update by requesting p _ le _ adv _ data _ update.
CN202011017017.XA 2020-09-24 2020-09-24 System and method for realizing mouse OTA upgrading based on BNEP Bluetooth Active CN112230951B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011017017.XA CN112230951B (en) 2020-09-24 2020-09-24 System and method for realizing mouse OTA upgrading based on BNEP Bluetooth

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011017017.XA CN112230951B (en) 2020-09-24 2020-09-24 System and method for realizing mouse OTA upgrading based on BNEP Bluetooth

Publications (2)

Publication Number Publication Date
CN112230951A true CN112230951A (en) 2021-01-15
CN112230951B CN112230951B (en) 2024-05-10

Family

ID=74107637

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011017017.XA Active CN112230951B (en) 2020-09-24 2020-09-24 System and method for realizing mouse OTA upgrading based on BNEP Bluetooth

Country Status (1)

Country Link
CN (1) CN112230951B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080295087A1 (en) * 2007-05-25 2008-11-27 Samsung Electronics Co., Ltd. Firmware upgrade system and control method thereof
EP2128760A1 (en) * 2008-05-29 2009-12-02 Research in Motion Limited A method and system for performing a software upgrade on an electronic device connected to a computer
US20130185563A1 (en) * 2012-01-12 2013-07-18 Gueorgui Djabarov Multiple System Images for Over-The-Air Updates
US20130275956A1 (en) * 2012-04-17 2013-10-17 Hon Hai Precision Industry Co., Ltd. Firmware upgrade method and system and terminal device using the method
CN106603311A (en) * 2017-01-18 2017-04-26 北京洋浦伟业科技发展有限公司 OTA upgrade method, client, server and system
CN107045450A (en) * 2017-04-10 2017-08-15 深圳市中易腾达科技股份有限公司 A kind of security upgrading method of the mouse of bluetooth 3.0 based on HID protocol
CN107301064A (en) * 2017-05-19 2017-10-27 深圳Tcl新技术有限公司 Upgrade method, television terminal and the computer-readable recording medium of bluetooth firmware
CN109491691A (en) * 2018-11-30 2019-03-19 歌尔科技有限公司 A kind of TWS earphone and its upgrade method, device, medium
CN109982294A (en) * 2019-03-08 2019-07-05 四川爱联科技有限公司 The method that NBIot module is upgraded using bluetooth equipment
CN110621011A (en) * 2019-09-12 2019-12-27 北京方研矩行科技有限公司 OTA firmware upgrading method and system based on Bluetooth device end

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080295087A1 (en) * 2007-05-25 2008-11-27 Samsung Electronics Co., Ltd. Firmware upgrade system and control method thereof
EP2128760A1 (en) * 2008-05-29 2009-12-02 Research in Motion Limited A method and system for performing a software upgrade on an electronic device connected to a computer
US20130185563A1 (en) * 2012-01-12 2013-07-18 Gueorgui Djabarov Multiple System Images for Over-The-Air Updates
US20130275956A1 (en) * 2012-04-17 2013-10-17 Hon Hai Precision Industry Co., Ltd. Firmware upgrade method and system and terminal device using the method
CN106603311A (en) * 2017-01-18 2017-04-26 北京洋浦伟业科技发展有限公司 OTA upgrade method, client, server and system
CN107045450A (en) * 2017-04-10 2017-08-15 深圳市中易腾达科技股份有限公司 A kind of security upgrading method of the mouse of bluetooth 3.0 based on HID protocol
CN107301064A (en) * 2017-05-19 2017-10-27 深圳Tcl新技术有限公司 Upgrade method, television terminal and the computer-readable recording medium of bluetooth firmware
CN109491691A (en) * 2018-11-30 2019-03-19 歌尔科技有限公司 A kind of TWS earphone and its upgrade method, device, medium
CN109982294A (en) * 2019-03-08 2019-07-05 四川爱联科技有限公司 The method that NBIot module is upgraded using bluetooth equipment
CN110621011A (en) * 2019-09-12 2019-12-27 北京方研矩行科技有限公司 OTA firmware upgrading method and system based on Bluetooth device end

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
LIANG SHEN等: "Optimization on ZigBee OTA Technique", LIAN2016 IEEE ADVANCED INFORMATION MANAGEMENT, COMMUNICATES, ELECTRONIC AND AUTOMATION CONTROL CONFERENCE (IMCEC), 2 March 2017 (2017-03-02), pages 119 - 122 *
姚晓光;: "基于GPRS的单片机固件升级系统设计", 单片机与嵌入式系统应用, no. 06, 30 June 2010 (2010-06-30), pages 23 - 25 *

Also Published As

Publication number Publication date
CN112230951B (en) 2024-05-10

Similar Documents

Publication Publication Date Title
CN110601870B (en) Method, device and system for registering device distribution network
WO2018000134A1 (en) Bluetooth connection method and terminal
US9998880B2 (en) Method and apparatus for forming Wi-Fi P2P group using Wi-Fi direct
EP3026944B1 (en) Discovery method and an electronic device thereof
CN106600935B (en) Control system based on bluetooth mesh
EP2273828B1 (en) Power savings for wireless access points
US9986126B2 (en) Communications apparatus
US20030027608A1 (en) Power optimized request response communication protocol with timer mechanism to enforce client to generate request
US20210297523A1 (en) Communication apparatus
CN110830968A (en) Networking method and device, Bluetooth equipment and computer readable medium
CN109688570B (en) Bluetooth connection method, system and storage medium
US11895364B2 (en) Bluetooth connection method and television
CN111787540B (en) Method and device for accessing Internet of things, electronic equipment and readable storage medium
CN102685856A (en) Wireless communication method and Wi-Fi Direct (Wireless Fidelity Direct) communication system
CN108234562B (en) Equipment control method, control equipment and controlled equipment
US9113413B2 (en) Communication terminal and communication method
WO2023221948A1 (en) Information processing method, and device, storage medium and program product
KR20160123149A (en) Electronic apparatus, wake-up apparatus for turning on the electronic apparatus, wake-up system and control method thereof
JP2017212501A (en) Communication device, control method, and program
CN112912862A (en) Data system on module (DSoM) for connecting computing device and cloud-based service
CN115250544A (en) Equipment networking method, electronic equipment and storage medium
CN112230951A (en) System and method for realizing OTA (over the air) upgrade of mouse based on BNEP (Bluetooth technology attachment) Bluetooth
US11317347B2 (en) Method and apparatus for providing service by using Bluetooth low energy technology
CN111954207B (en) BNEP Bluetooth-based OTA upgrading system and upgrading method thereof
CN103986588A (en) Computer system and far-end remote control method of computer device

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
GR01 Patent grant
GR01 Patent grant