Bluetooth gateway and data transmission system
By designing a Bluetooth gateway that includes a microcontroller, a reset circuit, and an Ethernet circuit, the problem of Bluetooth devices being unable to upload data in a timely manner during low-power mode was solved, enabling real-time data upload and stable communication for Bluetooth devices.
Patent Information
- Application Number
- CN202422980032.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-03
- Publication Date
- 2025-12-05
- Estimated Expiration
- 2034-12-03
AI Technical Summary
When Bluetooth devices are not used by the user, their data cannot be reported to the terminal app in a timely manner, resulting in data loss.
Design a Bluetooth gateway comprising a microcontroller, a reset circuit, a power supply circuit, and an Ethernet circuit. The microcontroller supports Bluetooth and wireless network functions, and the Ethernet circuit uploads data from Bluetooth devices to a cloud server in real time, allowing terminal devices to obtain complete data from the cloud server.
This ensures that data can be uploaded to the cloud server in a timely manner when the user is not using the Bluetooth device, avoiding data loss and achieving stable communication between the Bluetooth device and the terminal device.
Smart Images

Figure CN223639398U_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The utility model relates to wireless communication technical field especially relates to a kind of bluetooth gateway and data transmission system. BACKGROUND
[0002] Bluetooth device is usually used to establish point-to-point direct connection communication connection with terminal device such as mobile phone, under this connection mode, mobile phone will enter low-power mode in the case that user does not use operation, at this time, the application program installed on mobile phone APP will not be able to carry out normal message communication with bluetooth device. Therefore, it will cause that bluetooth device data cannot be reported to the APP of terminal in time, when user checks bluetooth device communication data record from APP, data loss will appear. SUMMARY
[0003] The bluetooth gateway and data transmission system provided by the utility model can ensure the data integrity of the bluetooth device.
[0004] In a first aspect, the utility model provides a kind of bluetooth gateway, comprising:
[0005] Microcontroller, the microcontroller has bluetooth communication and wireless network communication function;
[0006] Reset circuit, the reset circuit has first reset switch and second reset switch, the first reset switch is electrically connected with the soft control pin of the microcontroller, and the second reset switch is electrically connected with the enable pin of the microcontroller;
[0007] Power supply circuit, the power supply circuit is electrically connected with the first power supply pin of the microcontroller, and the power supply circuit is used to convert the first voltage provided by the second power supply pin of USB interface or the second voltage provided by power line into the third voltage required by microcontroller;
[0008] Ethernet circuit, the Ethernet circuit is connected with the microcontroller by medium independent interface, and the Ethernet circuit is used to send data to cloud server through wired network.
[0009] Optionally, the reset circuit includes:
[0010] First resistor, the first end of the first resistor is electrically connected with the output end of the power supply circuit;
[0011] First reset switch, the first end of the first reset switch is electrically connected with the second end of the first resistor and the soft control pin of microcontroller, and the second end of the first reset switch is grounded;
[0012] First capacitor, the first end of the first capacitor is electrically connected with the first end of the first reset switch, and the second end of the first capacitor is grounded;
[0013] A second reset switch, a first end of the second reset switch is electrically connected with an enable pin of the microcontroller, and a second end of the second reset switch is grounded.
[0014] Optionally, the Bluetooth gateway further comprises:
[0015] An indicator light circuit, the indicator light circuit comprises a plurality of indicator light sub-circuits, each indicator light sub-circuit comprises:
[0016] A pull-up resistor, a first end of the pull-up resistor is electrically connected with an output end of the power supply circuit;
[0017] An LED lamp bead, a first end of the LED lamp bead is electrically connected with a second end of the pull-up resistor, and a second end of the LED lamp bead is electrically connected with a corresponding control pin of the microcontroller.
[0018] Optionally, the power supply circuit comprises:
[0019] A switching switch, the switching switch has a first input end electrically connected with a second power supply pin of the USB interface and a second input end electrically connected with a power line interface, and the switching switch is used for selecting and transmitting voltages of the first input end and the second input end to an output end;
[0020] A voltage regulator, an input pin of the voltage regulator is electrically connected with the output end of the switching switch, and the voltage regulator is used for outputting the third voltage to the microcontroller.
[0021] Optionally, the power supply circuit further comprises:
[0022] A first filter capacitor, a first end of the filter capacitor is grounded, and a second end of the filter capacitor is electrically connected with an input pin of the voltage regulator;
[0023] An enable resistor, a first end of the enable resistor is electrically connected with the input pin of the voltage regulator, and a second end of the enable resistor is electrically connected with an enable pin of the voltage regulator.
[0024] Optionally, the power supply circuit further comprises:
[0025] A second resistor, a first end of the second resistor is electrically connected with a mode selection pin of the voltage regulator;
[0026] A second capacitor, a first end of the second capacitor is electrically connected with a second end of the second resistor, and a second end of the second capacitor is electrically connected with a switch node pin of the voltage regulator;
[0027] a first inductor, a first end of the first inductor being electrically connected with a second end of the second capacitor, a second end of the first inductor being electrically connected with a power supply pin of the microcontroller;
[0028] a third resistor, a first end of the third resistor being electrically connected with a feedback pin of the voltage regulator, a second end of the third resistor being electrically connected with the second end of the first inductor;
[0029] a third capacitor, a first end of the third capacitor being electrically connected with the feedback pin of the voltage regulator, a second end of the third capacitor being electrically connected with the second end of the first inductor;
[0030] a fourth resistor, a first end of the fourth resistor being grounded, a second end of the fourth resistor being electrically connected with the first end of the third resistor and the first end of the third capacitor;
[0031] a second filter capacitor, a first end of the second filter capacitor being grounded, a second end of the second filter capacitor being electrically connected with the second end of the first inductor.
[0032] Optionally, the Bluetooth gateway further comprises:
[0033] a debugging circuit, the debugging circuit comprising:
[0034] a data converter, the data converter being electrically connected with the USB interface, the data converter being configured to receive data sent by the host computer via the USB interface and convert the data into a digital logic level, a data receiving pin of the data converter being electrically connected with a data sending pin of the microcontroller, a data sending pin of the data converter being electrically connected with a data receiving pin of the microcontroller.
[0035] Optionally, the debugging circuit further comprises:
[0036] a fourth capacitor, a first end of the fourth capacitor being electrically connected with an enable pin of the microcontroller, a second end of the fourth capacitor being grounded;
[0037] a first MOS transistor, a first end of the first MOS transistor being electrically connected with the enable pin of the microcontroller, a second end of the first MOS transistor being electrically connected with a request sending pin of the data converter;
[0038] a first bias resistor, a first end of the first bias resistor being electrically connected with a gate of the first MOS transistor, a second end of the first bias resistor being electrically connected with a data terminal preparation pin of the data converter;
[0039] a second bias resistor, a first end of the second bias resistor being electrically connected with the request sending pin of the data converter;
[0040] A second MOS transistor, a gate of the second MOS transistor is electrically connected with a second end of the second bias resistor, a first end of the second bias resistor is electrically connected with a general input and output pin of the microcontroller, and the second end of the second bias resistor is electrically connected with a data terminal preparation pin of the data converter.
[0041] Optionally, the Ethernet circuit comprises:
[0042] An Ethernet control chip, the Ethernet control chip is electrically connected with the microcontroller through a media independent interface;
[0043] A network port transformer, an input side of the network port transformer is electrically connected with the Ethernet control chip;
[0044] An information socket connector, the information socket is electrically connected with an output side of the network port transformer.
[0045] In a second aspect, the present application provides a data transmission system, comprising:
[0046] The Bluetooth gateway according to any one of the preceding aspects is used for connecting with a terminal device through Bluetooth or a wireless network to send data to the terminal device, and / or is used for connecting with a Bluetooth device through Bluetooth to receive data sent by the Bluetooth device;
[0047] A cloud server, the cloud server is in communication connection with the Bluetooth gateway through a network, and the cloud server is used for receiving and storing data sent by the Bluetooth gateway;
[0048] A Bluetooth device, the Bluetooth device is in Bluetooth connection with the Bluetooth gateway and / or the terminal device;
[0049] A terminal device, the terminal device is used for connecting with the Bluetooth device through Bluetooth, and / or is used for connecting with the Bluetooth gateway through Bluetooth or a wireless network.
[0050] In the technical scheme, the microcontroller supports Bluetooth and wireless network functions simultaneously, and the Bluetooth function of the microcontroller can work continuously, so that when the microcontroller is connected with the Bluetooth device, data of the Bluetooth device can be transmitted to the microcontroller in real time, the microcontroller communicates with the Ethernet circuit, the data of the Bluetooth device is uploaded to the cloud server in real time through the Ethernet circuit, and thus, when the terminal needs to obtain data of the Bluetooth device, the terminal can obtain complete data of the Bluetooth device from the cloud server through the Bluetooth gateway. BRIEF DESCRIPTION OF DRAWINGS
[0051] Figure 1 A schematic block diagram of a Bluetooth gateway according to an embodiment of the present application;
[0052] Figure 2 Pin diagram of the microcontroller of the Bluetooth gateway of another embodiment of the utility model for another embodiment of the utility model;
[0053] Figure 3 Reset circuit schematic diagram of the Bluetooth gateway of another embodiment of the utility model for another embodiment of the utility model;
[0054] Figure 4 Indicating lamp circuit schematic diagram of the Bluetooth gateway of another embodiment of the utility model for another embodiment of the utility model;
[0055] Figure 5 Power supply circuit schematic diagram of the Bluetooth gateway of another embodiment of the utility model for another embodiment of the utility model;
[0056] Figure 6 Debugging circuit schematic diagram of the Bluetooth gateway of another embodiment of the utility model for another embodiment of the utility model;
[0057] Figure 7 Ethernet circuit schematic diagram of the Bluetooth gateway of another embodiment of the utility model for another embodiment of the utility model;
[0058] Figure 8 Schematic block diagram of the data transmission system of another embodiment of the utility model for another embodiment of the utility model;
[0059] Figure 9 Data communication flow chart in the data transmission system of another embodiment of the utility model. DETAILED DESCRIPTION
[0060] In order to make the purpose, technical scheme and advantages of the embodiments of the utility model clearer, the technical scheme in the embodiments of the utility model will be described clearly and completely below in conjunction with the drawings in the embodiments of the utility model. Obviously, the described embodiments are only part of the embodiments of the utility model, rather than all the embodiments. Based on the embodiments in the utility model, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the utility model.
[0061] The embodiments of the utility model provide a Bluetooth gateway, as shown in the drawings, comprising: Figure 1
[0062] Microcontroller, the microcontroller has Bluetooth communication and wireless network communication function;
[0063] In some embodiments, the microcontroller can be, for example, an ESP32 microcontroller, used to handle the main control functions of the Bluetooth gateway. The ESP32 microcontroller has multiple I / O pins for connecting to external Ethernet, indicator lights, button circuits, etc. The ESP32 microcontroller also supports Wi-Fi and Bluetooth, making it suitable for wireless communication applications. For the microcontroller, the main pins should include pins such as TXD and RXD for serial communication, the EN pin for enabling circuitry, and VCC and GND for power and ground, respectively. This module is responsible for the logic processing and wireless communication functions of the Bluetooth gateway. The specific pin settings of the microcontroller can be, for example, as follows: Figure 2 As shown.
[0064] A power supply circuit is electrically connected to the first power pin of the microcontroller. The power supply circuit is used to convert the first voltage provided by the second power pin of the USB interface or the second voltage provided by the power line into the third voltage required by the microcontroller.
[0065] In some embodiments, the power supply circuitry is responsible for providing a stable voltage to the entire system. The power supply circuitry converts the input voltage to the voltage required by the system, such as 3.3V. The input voltage can be derived from the second power pin of the USB interface or from a separate power line.
[0066] A reset circuit is provided, comprising a first reset switch and a second reset switch, wherein the first reset switch is electrically connected to a soft control pin of the microcontroller and the second reset switch is electrically connected to an enable pin of the microcontroller; the reset circuit is electrically connected to a power supply circuit to obtain power from the power supply circuit.
[0067] In some embodiments, the reset circuit includes two reset switches. The first reset switch is connected to the soft control pin of the ESP32, i.e., the... Figure 2 The AP pin in the microcontroller can be programmed to detect whether the first reset switch is pressed to determine whether a soft reset should be performed on the entire system. The second reset switch is connected to the enable pin (EN pin) of the ESP32. When the second reset switch is pressed, the EN pin is at a low level, and the ESP32 recognizes this and performs a hardware reset. In some preferred embodiments, the soft control pin can be defined using one of the general-purpose input / output pins of the microcontroller. In addition to performing a soft reset of the microcontroller, the soft control pin can also perform other functions. For example, a short press of the first reset switch can perform a soft reset of the microcontroller, while a long press can perform a network distribution function. The other functions of the soft control pin besides the soft reset function can be defined through the microcontroller's firmware.
[0068] An Ethernet circuit is connected with the microcontroller through a media independent interface, and the Ethernet circuit is electrically connected with the power supply circuit to obtain power supply from the power supply circuit; the Ethernet circuit is used for sending data to a cloud server through a wired network.
[0069] In some embodiments, the Ethernet circuit is responsible for wired network communication of the Bluetooth gateway.
[0070] In the technical scheme provided in the embodiment of the utility model, the microcontroller supports Bluetooth and wireless network functions simultaneously, because the Bluetooth function of the microcontroller can work continuously, therefore, when the microcontroller is connected with the Bluetooth device, the data of the Bluetooth device can be transmitted to the microcontroller in real time, the microcontroller communicates with the Ethernet circuit, the data of the Bluetooth device is uploaded to the cloud server in real time by the Ethernet circuit, so that when the terminal needs to obtain the data of the Bluetooth device, the complete data of the Bluetooth device can be obtained from the cloud server through the Bluetooth gateway.
[0071] As an optional implementation manner, as shown in Figure 3 The reset circuit comprises:
[0072] A first resistor R5, a first end of the first resistor R5 is electrically connected with an output end of the power supply circuit;
[0073] A first reset switch SW1, a first end of the first reset switch SW1 is electrically connected with a second end of the first resistor R5 and a soft control pin of the microcontroller, and a second end of the first reset switch SW1 is grounded;
[0074] A first capacitor C1, a first end of the first capacitor C1 is electrically connected with the first end of the first reset switch SW1, and a second end of the first capacitor C1 is grounded;
[0075] A second reset switch SW2, a first end of the second reset switch SW2 is electrically connected with an enable pin of the microcontroller, and a second end of the second reset switch SW2 is grounded.
[0076] In some embodiments, the reset circuit includes two reset switches, a first reset switch SW1 connected to the soft control pin of the ESP32, and whether the first reset switch SW1 is pressed can be detected by the program to determine whether to perform a soft reset on the entire system. The second reset switch SW2 is connected to the enable pin (i.e. the EN pin) of the ESP32. After the second reset switch SW2 is pressed, the EN pin is at a low level, and the ESP32 recognizes it and performs a hardware reset. For the VCC end of the reset circuit, it can be connected to the same power supply as the first power supply pin of the microcontroller, i.e. the output end of the power supply circuit.
[0077] As an optional implementation, as shown in Figure 4 The Bluetooth gateway further includes:
[0078] The indicator light circuit includes a plurality of indicator light sub-circuits, each of which includes:
[0079] A pull-up resistor, a first end of which is electrically connected to the output end of the power supply circuit;
[0080] An LED lamp bead, a first end of which is electrically connected to a second end of the pull-up resistor, and a second end of which is electrically connected to a corresponding control pin of the microcontroller.
[0081] In some embodiments, LED1-LED4 are all LED lamp beads, connected through pull-up resistors R1-R4, and indicating different states after being detected by the program respectively, such as can be set as Bluetooth, WiFi, network port, and working state indicator lights. After normal operation, all the lights are on, indicating that the Bluetooth, WiFi, and network port have been configured and connected to the corresponding target, and the system is running normally. The indicator light circuit helps to indicate the state of the device, so that the user can clearly know the running state of the Bluetooth gateway. As shown in Figure 2 The microcontroller has control pins corresponding to LED1-LED4.
[0082] As an optional implementation, as shown in Figure 5 The power supply circuit includes:
[0083] A switching switch SW3, having a first input end electrically connected to the second power supply pin of the USB interface and a second input end electrically connected to the power line interface, the switching switch SW3 being used for selecting and transmitting the voltage of the first input end and the second input end to the output end;
[0084] A voltage regulator, an input pin of which is electrically connected to the output end of the switching switch SW3, the voltage regulator being used for outputting a third voltage to the microcontroller.
[0085] As an optional implementation, continuing asFigure 5 As shown, the power supply circuit further comprises:
[0086] a first filter capacitor, a first end of the first filter capacitor being grounded, and a second end of the first filter capacitor being electrically connected with an input pin of the voltage regulator;
[0087] an enable resistor R8, a first end of the enable resistor R8 being electrically connected with the input pin of the voltage regulator, and a second end of the enable resistor R8 being electrically connected with an enable pin of the voltage regulator.
[0088] As an optional implementation, continuing as Figure 5 As shown, the power supply circuit further comprises:
[0089] a second resistor R10, a first end of the second resistor R10 being electrically connected with a mode selection pin BS of the voltage regulator;
[0090] a second capacitor C9, a first end of the second capacitor C9 being electrically connected with a second end of the second resistor R10, and a second end of the second capacitor C9 being electrically connected with a switch node pin LX of the voltage regulator;
[0091] a first inductor L3, a first end of the first inductor L3 being electrically connected with the second end of the second capacitor C9, and a second end of the first inductor L3 being electrically connected with a power supply pin of the microcontroller;
[0092] a third resistor R11, a first end of the third resistor R11 being electrically connected with a feedback pin FB of the voltage regulator, and a second end of the third resistor R11 being electrically connected with the second end of the first inductor L3;
[0093] a third capacitor C6, a first end of the third capacitor C6 being electrically connected with the feedback pin FB of the voltage regulator, and a second end of the third capacitor C6 being electrically connected with the second end of the first inductor L3;
[0094] a fourth resistor R9, a first end of the fourth resistor R9 being grounded, and a second end of the fourth resistor R9 being electrically connected with the first end of the third resistor R11 and the first end of the third capacitor C6;
[0095] a second filter capacitor, a first end of the second filter capacitor being grounded, and a second end of the second filter capacitor being electrically connected with the second end of the first inductor L3.
[0096] In some embodiments, the power supply circuit performs power switching through the switching switch SW3, wherein one power supply is the power supply pin of the USB interface, and the other power supply is the independent power line. The first filter capacitor may, for example, be formed in parallel by more than one capacitor, for example, as shown in Figure 5C3 and C4 are shown in parallel. The second filter capacitor can be formed by more than one capacitor in parallel, for example as shown in Figure 5 C5, C7 and C8 are shown in parallel.
[0097] As an optional implementation, as shown in Figure 6 The Bluetooth gateway further comprises, as shown in
[0098] The debug circuit comprises:
[0099] The data converter is electrically connected with the USB interface, and is used to receive data sent by the host computer through the USB interface and convert the data into a digital logic level. A data receiving pin of the data converter is electrically connected with a data sending pin of the microcontroller, and a data sending pin of the data converter is electrically connected with a data receiving pin of the microcontroller.
[0100] As an optional implementation, as shown in Figure 6 The debug circuit further comprises, as shown in
[0101] A fourth capacitor C2, a first end of the fourth capacitor C2 is electrically connected with an enable pin EN of the microcontroller, and a second end of the fourth capacitor C2 is grounded.
[0102] A first MOS tube Q1, a first end of the first MOS tube Q1 is electrically connected with the enable pin of the microcontroller, and a second end of the first MOS tube Q1 is electrically connected with a request to send pin RTS of the data converter.
[0103] A first biasing resistor R6, a first end of the first biasing resistor R6 is electrically connected with a gate of the first MOS tube Q1, and a second end of the first biasing resistor R6 is electrically connected with a data terminal ready pin DTR of the data converter.
[0104] A second biasing resistor R7, a first end of the second biasing resistor R7 is electrically connected with the request to send pin RTS of the data converter.
[0105] A second MOS tube Q2, a gate of the second MOS tube Q2 is electrically connected with a second end of the second biasing resistor R7, a first end of the second biasing resistor R7 is electrically connected with a general-purpose input / output pin of the microcontroller, and a second end of the second biasing resistor R7 is electrically connected with the data terminal ready pin DTR of the data converter.
[0106] In some embodiments, the data converter in the debugging circuit can be, for example, a CH340C converter, which is a USB to TTL converter for converting USB signals into serial port signals for convenient communication with a PC or other devices. The debugging circuit allows the Bluetooth gateway to be debugged and configured downloaded through the USB interface, providing a convenient debugging interface. It can be ensured that the Bluetooth gateway can realize communication control and power management functions.
[0107] As an optional implementation, as shown in Figure 7 The Ethernet circuit comprises:
[0108] an Ethernet control chip, which is electrically connected to the microcontroller through a media independent interface;
[0109] a network port transformer, the input side of which is electrically connected to the Ethernet control chip;
[0110] an information socket connector, which is electrically connected to the output side of the network port transformer.
[0111] In some embodiments, the Ethernet control chip can be, for example, a LAN8720A-CP-TR Ethernet control chip, which is responsible for the wired network communication of the Bluetooth gateway. The Ethernet control chip is connected to the ESP32 through a media independent interface (RMII) and connected to an information socket connector RJ45 interface, which contains differential signals TX+, TX-, RX+, RX- for sending and receiving data packets. The Bluetooth gateway can realize wired network connection and local area network data transmission through these.
[0112] The embodiment of the application further provides a data transmission system, as shown in Figure 8 The data transmission system comprises:
[0113] The Bluetooth gateway according to any one of the preceding embodiments, wherein the Bluetooth gateway is configured to connect to a terminal device through Bluetooth or a wireless network to send data to the terminal device; and / or the Bluetooth gateway is configured to connect to a Bluetooth device through Bluetooth to receive data sent by the Bluetooth device;
[0114] a cloud server, which is in communication connection with the Bluetooth gateway through a network, and is configured to receive and store data sent by the Bluetooth gateway;
[0115] a Bluetooth device, which is in Bluetooth connection with the Bluetooth gateway and / or the terminal device;
[0116] a terminal device, which is configured to connect to the Bluetooth device through Bluetooth, and / or the terminal device is configured to connect to the Bluetooth gateway through Bluetooth or a wireless network.
[0117] In some embodiments, the data transmission system enables the data communicated between the Bluetooth device and the phone APP in the low-power mode of the phone to be normally carried out without interruption. The Bluetooth device, the phone APP and the Bluetooth gateway can maintain normal communication within the communication distance range. When the Bluetooth of the phone APP is turned on and within the effective distance of the Bluetooth device, the phone APP can normally receive the data reported by the Bluetooth device. At the same time, when the Bluetooth gateway receives the Beacon Bluetooth data sent by the nearby Bluetooth device in the current environment, it analyzes and confirms that the data is the required data to be received and processed according to a specific data format, and then reports the data to the cloud server through the Bluetooth gateway, saves the data of the Bluetooth device on the cloud server, and transmits the Bluetooth device data reported by the Bluetooth gateway to the phone APP through the message push mode. When the user needs to see the data of the device, the phone APP client can display the latest data received by the phone and pull the latest data from the server. As an exemplary embodiment, Figure 9 A communication flowchart supported by the Bluetooth gateway is shown, and the specific communication process is as follows: after the Bluetooth gateway is started, a configuration file is read, network connection is performed according to the configuration information, the Ethernet automatically obtains the IP address allocated by the router and connects to the cloud server, and enters the communication mode with the cloud; when the Bluetooth gateway has been configured, the WiFi is connected, and when it is not configured, it waits for the configuration; the Bluetooth gateway enters the BLE Beacon listening mode, waits to receive the data sent by the Bluetooth device and reports to the cloud server, and the cloud server transmits the Bluetooth data to the user's phone APP; the Bluetooth gateway listens to the key trigger operation event, when the user operates the key to enter the AP hot spot configuration mode, the Bluetooth gateway releases the hot spot AP, and the phone or computer can connect the hot spot AP to communicate with the Bluetooth gateway, and the Bluetooth gateway is configured and the system related function setting operation is performed through the web page.
[0118] In the technical scheme of the utility model provide, at least have as follows advantage, first, terminal equipment and bluetooth device need not establish connection also can carry out real time communication, with the help BLE Beacon technical characteristic realizes bluetooth device and mobile phone APP's instant communication, BLE Beacon is a broadcast data packet, when the device needs to send data, only need to define data format according to demand, the data that need to upload is defined in the size range of data packet regulation can. Second, bluetooth gateway reports the data of bluetooth device (such as bluetooth watch, bluetooth hygrometer etc.), the cloud server stores data, and the mobile phone APP can pull the data stored in the cloud server. After bluetooth gateway receives the data packet sent by bluetooth device, the data is uploaded to the cloud server through the Internet, and the server sends the data information reported by the device to the mobile phone APP, thereby avoiding the problem that the terminal equipment cannot receive bluetooth data after entering sleep. Third, for the prior art communication device distance is farther, when bluetooth device is more, the connection and communication stability of equipment are influenced. In the application environment, more than 1 intelligent gateway can be configured to receive BLE Beacon data, when part of the gateway is disconnected, other gateways can still receive data and report within the effective communication distance, by increasing multiple intelligent gateway devices, not only can multiple communication be realized, but also the data can be guaranteed not to be lost. The number of gateway configurations can be configured according to the size of the actual application environment space. Fourth, in addition to bluetooth device and mobile phone direct communication, bluetooth device also communicates through the nearby intelligent gateway and reports to the cloud and forwards to the mobile phone, and the mobile phone processes the data again, through the existence of two communication modes, the data of bluetooth device is stably and reliably transmitted to the mobile phone of the user. Fifth, the gateway device of the utility model can be in the state of listening and receiving all the time, and the bluetooth device can send data packets at any time according to the need, avoiding the loss of bluetooth data.
[0119] Those skilled in the art can understand that all or part of the processes in the above method embodiments can be completed by a computer program instructing related hardware, and the program can be stored in a computer-readable storage medium. When the program is executed, the processes of the above embodiments can be included. The storage medium can be a magnetic disc, an optical disc, a read-only memory (ROM), a random access memory (RAM), or the like.
[0120] The above merely describes a specific implementation of the present application, but the protection scope of the present application is not limited thereto, any person skilled in the art can easily think of changes or replacements within the technical range disclosed by the present application, which should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A Bluetooth gateway, characterized in that, The application relates to a Bluetooth gateway, which comprises the following components: a microcontroller with Bluetooth communication and wireless network communication functions; a power supply circuit electrically connected with a first power supply pin of the microcontroller, the power supply circuit being used for converting a first voltage provided by a second power supply pin of a USB interface or a second voltage provided by a power line into a third voltage required by the microcontroller; a reset circuit with a first reset switch and a second reset switch, the first reset switch being electrically connected with a soft control pin of the microcontroller, and the second reset switch being electrically connected with an enable pin of the microcontroller; the reset circuit being electrically connected with the power supply circuit to obtain power supply from the power supply circuit; an Ethernet circuit in communication connection with the microcontroller through a medium independent interface, the Ethernet circuit being electrically connected with the power supply circuit to obtain power supply from the power supply circuit; the Ethernet circuit being used for transmitting data to a cloud server through a wired network.
2. The Bluetooth gateway of claim 1, wherein, The reset circuit comprises: a first resistor, a first end of the first resistor being electrically connected with an output end of the power supply circuit; a first reset switch, a first end of the first reset switch being electrically connected with a second end of the first resistor and a soft control pin of the microcontroller, and a second end of the first reset switch being grounded; a first capacitor, a first end of the first capacitor being electrically connected with the first end of the first reset switch, and a second end of the first capacitor being grounded; a second reset switch, a first end of the second reset switch being electrically connected with an enable pin of the microcontroller, and a second end of the second reset switch being grounded.
3. The Bluetooth gateway of claim 1, wherein, The Bluetooth gateway further comprises: an indicator light circuit, the indicator light circuit comprising a plurality of indicator light sub-circuits, each indicator light sub-circuit comprising: a pull-up resistor, a first end of the pull-up resistor being electrically connected with an output end of the power supply circuit; an LED lamp bead, a first end of the LED lamp bead being electrically connected with a second end of the pull-up resistor, and a second end of the LED lamp bead being electrically connected with a corresponding control pin of the microcontroller.
4. The Bluetooth gateway of claim 1, wherein, The power supply circuit comprises: a switching switch, the switching switch having a first input end electrically connected with a second power supply pin of the USB interface and a second input end electrically connected with a power line interface, the switching switch being used for selecting and transmitting the voltage of the first input end and the second input end to an output end; a voltage regulator, an input pin of the voltage regulator being electrically connected with the output end of the switching switch, the voltage regulator being used for outputting the third voltage to the microcontroller.
5. The Bluetooth gateway of claim 4, wherein, The power supply circuit further comprises: a first filter capacitor, a first end of the filter capacitor being grounded, and a second end of the filter capacitor being electrically connected with an input pin of the voltage regulator; an enable resistor, a first end of the enable resistor being electrically connected with the input pin of the voltage regulator, and a second end of the enable resistor being electrically connected with an enable pin of the voltage regulator.
6. The Bluetooth gateway of claim 4, wherein, The power supply circuit further comprises: a second resistor, a first end of the second resistor being electrically connected with a mode selection pin of the voltage regulator; A second capacitor, a first end of the second capacitor is electrically connected with a second end of the second resistor, and a second end of the second capacitor is electrically connected with a switch node pin of the voltage regulator; A first inductor, a first end of the first inductor is electrically connected with the second end of the second capacitor, and a second end of the first inductor is electrically connected with a power supply pin of the microcontroller; A third resistor, a first end of the third resistor is electrically connected with a feedback pin of the voltage regulator, and a second end of the third resistor is electrically connected with the second end of the first inductor; A third capacitor, a first end of the third capacitor is electrically connected with the feedback pin of the voltage regulator, and a second end of the third capacitor is electrically connected with the second end of the first inductor; A fourth resistor, a first end of the fourth resistor is grounded, and a second end of the fourth resistor is electrically connected with the first end of the third resistor and the first end of the third capacitor; A second filter capacitor, a first end of the second filter capacitor is grounded, and a second end of the second filter capacitor is electrically connected with the second end of the first inductor.
7. The Bluetooth gateway of claim 1, wherein, The Bluetooth gateway further comprises: A debugging circuit, the debugging circuit comprises: A data converter, the data converter is electrically connected with the USB interface, the data converter is used for receiving data sent by the host computer through the USB interface and converting the data into a digital logic level, a data receiving pin of the data converter is electrically connected with a data sending pin of the microcontroller, and a data sending pin of the data converter is electrically connected with a data receiving pin of the microcontroller.
8. The Bluetooth gateway of claim 7, wherein, The debugging circuit further comprises: A fourth capacitor, a first end of the fourth capacitor is electrically connected with an enable pin of the microcontroller, and a second end of the fourth capacitor is grounded; A first MOS tube, a first end of the first MOS tube is electrically connected with the enable pin of the microcontroller, and a second end of the first MOS tube is electrically connected with a request to send pin of the data converter; A first bias resistor, a first end of the first bias resistor is electrically connected with a gate of the first MOS tube, and a second end of the first bias resistor is electrically connected with a data terminal preparation pin of the data converter; A second bias resistor, a first end of the second bias resistor is electrically connected with the request to send pin of the data converter; A second MOS tube, a gate of the second MOS tube is electrically connected with a second end of the second bias resistor, a first end of the second bias resistor is electrically connected with a general-purpose input-output pin of the microcontroller, and a second end of the second bias resistor is electrically connected with the data terminal preparation pin of the data converter.
9. The Bluetooth gateway of claim 1, wherein, The Ethernet circuit comprises: An Ethernet control chip, the Ethernet control chip is electrically connected with the microcontroller through a media independent interface; A network port transformer, an input side of the network port transformer is electrically connected with the Ethernet control chip; An information socket connector, the information socket is electrically connected with an output side of the network port transformer.
10. A data transmission system, characterized by Comprise: The Bluetooth gateway of any one of claims 1-9, wherein the Bluetooth gateway is configured to connect with a terminal device via Bluetooth or a wireless network to transmit data to the terminal device; and / or the Bluetooth gateway is configured to connect with a Bluetooth device via Bluetooth to receive data transmitted by the Bluetooth device; a cloud server, wherein the cloud server is in communication connection with the Bluetooth gateway via a network, and the cloud server is configured to receive and store data transmitted by the Bluetooth gateway; a Bluetooth device, wherein the Bluetooth device is in Bluetooth connection with the Bluetooth gateway and / or the terminal device; a terminal device, wherein the terminal device is configured to connect with the Bluetooth device via Bluetooth, and / or the terminal device is configured to connect with the Bluetooth gateway via Bluetooth or a wireless network.