WO2020057345A1 - Method and system for switching operating state of serial port, bluetooth tracking device, and storage medium - Google Patents

Method and system for switching operating state of serial port, bluetooth tracking device, and storage medium Download PDF

Info

Publication number
WO2020057345A1
WO2020057345A1 PCT/CN2019/103679 CN2019103679W WO2020057345A1 WO 2020057345 A1 WO2020057345 A1 WO 2020057345A1 CN 2019103679 W CN2019103679 W CN 2019103679W WO 2020057345 A1 WO2020057345 A1 WO 2020057345A1
Authority
WO
WIPO (PCT)
Prior art keywords
bluetooth
serial port
state
tracking device
processor
Prior art date
Application number
PCT/CN2019/103679
Other languages
French (fr)
Chinese (zh)
Inventor
赵晓宇
Original Assignee
西安中兴新软件有限责任公司
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 西安中兴新软件有限责任公司 filed Critical 西安中兴新软件有限责任公司
Publication of WO2020057345A1 publication Critical patent/WO2020057345A1/en

Links

Images

Classifications

    • 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
    • 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/0261Power saving arrangements in terminal devices managing power supply demand, e.g. depending on battery level
    • H04W52/0274Power saving arrangements in terminal devices managing power supply demand, e.g. depending on battery level by switching on or off the equipment or parts thereof
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/20Manipulation of established connections
    • H04W76/27Transitions between radio resource control [RRC] states
    • 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

Definitions

  • the present invention relates to the field of communication technologies, and in particular, to a method, a system, a Bluetooth tracking device, and a storage medium for switching working states of a serial port.
  • Bluetooth trackers based on wireless communication technology are applied to the safety of these important items, people or pets.
  • the Bluetooth tracker generally consists of two parts: a Microcontroller Unit (MCU) and a Modem based on Bluetooth low power.
  • the MCU is a Bluetooth low power chip running a real-time operating system (RTOS).
  • RTOS real-time operating system
  • the MCU and Modem are connected through serial communication.
  • BLE Bluetooth Low Energy
  • the Bluetooth tracker and the smart terminal carried by the user are in a Bluetooth connection state.
  • the Bluetooth tracker communicates with the smart terminal through a Bluetooth connection, the serial port between the Modem and the MCU is turned off, and the product is at a low power consumption level.
  • the other is the Long Term Evolution (LTE) mode.
  • LTE Long Term Evolution
  • the Bluetooth connection between the Bluetooth tracker and the smart terminal carried by the user is disconnected.
  • the MCU needs to communicate with the smart terminal through the modem. Therefore, the serial port between the MCU and the modem is always on, and the overall power consumption of the product is high.
  • the Bluetooth broadcast mode of the MCU in the Bluetooth tracker is periodic, that is, after the MCU performs a Bluetooth broadcast, it will wait for a period of time and then perform the next broadcast. It is not a continuous Bluetooth broadcast, so In the LTE mode, if the serial port between the MCU and the modem is always on, unnecessary power consumption will be wasted.
  • an object of the embodiments of the present invention is to provide a method, a system, a Bluetooth tracking device, and a storage medium for switching the working state of a serial port, so as to solve the above-mentioned LTE mode, if the serial port between the MCU and the modem is always open , Will cause unnecessary waste of power.
  • a method for switching the working state of a serial port is provided, which is applied to a Bluetooth tracking device.
  • the Bluetooth tracking device includes a processor and a modem, and the processor and the modem are connected through serial communication. Methods include:
  • the Bluetooth operation status of the processor is monitored in real time, and the Bluetooth operation status includes a Bluetooth broadcast status and a Bluetooth idle status;
  • the serial port When the Bluetooth operating state is a Bluetooth broadcast state, the serial port is loaded; when the Bluetooth operating state is a Bluetooth idle state, the serial port is unloaded.
  • a system for switching the working state of a serial port which is applied to a Bluetooth tracking device.
  • the Bluetooth tracking device includes a processor and a modem, and the processor and the modem are connected through serial communication.
  • the system includes:
  • a monitoring unit configured to monitor the Bluetooth running state of the processor in real time when the Bluetooth tracking device is in the LTE mode, the Bluetooth running state includes a Bluetooth broadcast state and a Bluetooth idle state;
  • a first control unit is configured to load the serial port when the Bluetooth running state is a Bluetooth broadcast state; and unload the serial port when the Bluetooth running state is a Bluetooth idle state.
  • a Bluetooth tracking device which includes a processor and a modem.
  • the processor is in serial communication connection with the modem shown.
  • the Bluetooth tracking device further includes a memory and is stored on the memory.
  • a computer program that can be run on the processor. When the computer program is executed by the processor, the steps of the method for switching the working state of a serial port are implemented.
  • a storage medium stores a computer program, and when the computer program is executed by a processor, implements the steps of the foregoing method for switching a working state of a serial port.
  • the Bluetooth running state of the processor since the Bluetooth running state of the processor is monitored in real time when the Bluetooth tracking device is in the LTE mode, the Bluetooth running state includes Bluetooth broadcast state and Bluetooth idle state; loading the serial port when the Bluetooth operating state is the Bluetooth broadcast state; unloading the serial port when the Bluetooth operating state is the Bluetooth idle state, thereby achieving low power consumption of the serial port, Reduce the power consumption of Bluetooth tracking devices in LTE mode.
  • FIG. 1 is a block diagram of a basic structure of a Bluetooth tracking device according to an embodiment of the present invention
  • FIG. 2 is a schematic flowchart of an implementation method of a method for switching a working state of a serial port provided by Embodiment 1 of the present invention
  • FIG. 3 is a schematic diagram of a ratio between a Bluetooth broadcast state time and a Bluetooth idle state time in a Bluetooth broadcast cycle in the method for switching a working state of a serial port provided by Embodiment 1 of the present invention
  • FIG. 4 is a schematic flowchart of a method for switching a working state of a serial port provided by Embodiment 2 of the present invention
  • FIG. 5 is a schematic structural diagram of a system for switching a working state of a serial port according to a third embodiment of the present invention.
  • FIG. 6 is a detailed structure diagram of a Bluetooth tracking device according to a fourth embodiment of the present invention.
  • FIG. 1 is a block diagram of a basic structure of a Bluetooth tracking device according to an embodiment of the present invention. For convenience of explanation, only the parts related to the embodiment of the present invention are shown.
  • the Bluetooth tracking device 1 in the embodiment of the present invention includes a processor 11 and a modem 12, and the processor 11 and the modem 12 are connected through a serial communication.
  • the processor is a Bluetooth low energy processor, and an RTOS operating system runs on the processor 11.
  • the operating modes of the RTOS operating system in a running state include a BLE mode and an LTE mode.
  • the Bluetooth tracking device 1 in the BLE mode, establishes a Bluetooth connection with the smart terminal carried by the user, and the two are connected through Bluetooth communication.
  • the processor 11 in the Bluetooth tracking device 1 is in a Bluetooth low-power broadcast mode. The broadcast message needs to be transmitted to the modem 12 through the serial port, and the modem 12 sends the message to the modem via wireless communication. Smart terminal carried by the user.
  • FIG. 2 is a schematic flowchart of a method for switching a working state of a serial port provided by Embodiment 1 of the present invention. The method is executed by the processor 11 in the Bluetooth tracking device 1 shown in FIG. 1. As shown in FIG. 2, the method for switching the working state of a serial port provided in this embodiment includes the following steps:
  • step S201 when the Bluetooth tracking device 1 is in the LTE mode, the Bluetooth running state of the processor 11 is monitored in real time, and the Bluetooth running state includes a Bluetooth broadcast state and a Bluetooth idle state.
  • the Bluetooth tracking device 1 There are two ways for the Bluetooth tracking device 1 to enter the LTE mode: one is that after the Bluetooth tracking device 1 is turned on and the Bluetooth tracking application on the smart terminal carried by the user performs a registration binding operation, the Bluetooth tracking device 1 It will be in LTE mode; the other is that when the Bluetooth tracking device 1 and the smart terminal are in a Bluetooth connection state, the Bluetooth tracking device 1 is in a BLE mode, and when the Bluetooth connection is disconnected, the Bluetooth tracking Device 1 will automatically switch to LTE mode.
  • the processor 11 in the Bluetooth tracking device 1 is in a Bluetooth low energy broadcast mode.
  • step S202 the serial port is loaded when the Bluetooth running state is a Bluetooth broadcast state; when the Bluetooth running state is a Bluetooth idle state, the serial port is unloaded.
  • the serial port driver when the Bluetooth running state of the processor 11 is a Bluetooth broadcast state, the serial port driver is synchronously loaded and the serial port initialization action is performed, so that the serial port task in the processor 11 is also in a working state; when the processor 11 ’s The Bluetooth running state is idle. When no broadcast packet is sent, the serial port driver is unloaded and the serial port is closed. Since the Bluetooth tracking device 1 is in the LTE mode, each Bluetooth broadcast cycle is only 1% of the time in the Bluetooth broadcast state. Therefore, after synchronizing the Bluetooth broadcast state and the serial port working state, the low power consumption of the serial port task can be achieved, thereby reducing Bluetooth tracks the power consumption of device 1.
  • the method further includes:
  • the serial port and Bluetooth synchronous loading and unloading functions of the Bluetooth tracking device 1 are disabled.
  • the processor 11 of the Bluetooth tracking device 1 when the serial port of the Bluetooth tracking device 1 and the Bluetooth synchronous loading and unloading function are started, the processor 11 of the Bluetooth tracking device 1 is triggered to monitor its own Bluetooth running state in real time and enter the state of switching the serial port working state. Process flow. Because the serial port and the Bluetooth synchronous loading and unloading function are enabled only when the Bluetooth tracking device 1 is in the LTE mode, when the Bluetooth tracking device 1 exits the LTE mode, the serial port and Bluetooth synchronous loading and unloading function are turned off, which can further save The power consumption of the Bluetooth tracking device 1 is described.
  • the method for switching the working status of a serial port monitors the Bluetooth running status of the processor 11 in real time when the Bluetooth tracking device 1 is in the LTE mode; when the Bluetooth running status is a Bluetooth broadcast status The serial port is loaded; when the Bluetooth running state is the Bluetooth idle state, the serial port is unloaded, so that the serial port and the Bluetooth working state can be synchronized, the low power consumption of the serial port task is reduced, and the whole device of the Bluetooth tracking device 1 is reduced Power consumption.
  • FIG. 4 is a schematic flowchart of a method for switching a working state of a serial port provided by Embodiment 2 of the present invention. The method is executed by the processor 11 in the Bluetooth tracking device 1 shown in FIG. 1. As shown in FIG. 3, the method for switching the working status of a serial port provided in this embodiment includes the following steps:
  • step S401 when the Bluetooth tracking device 1 is in the LTE mode, the Bluetooth running state of the processor 11 is monitored in real time, and the Bluetooth running state includes a Bluetooth broadcast state and a Bluetooth idle state;
  • step S402 when the Bluetooth operating state is a Bluetooth broadcast state, the serial port is loaded; when the Bluetooth operating state is a Bluetooth idle state, the serial port is unloaded.
  • steps S301 to S302 in this embodiment are completely the same as the implementation methods of steps S201 to S202 in the previous embodiment, details are not described herein again.
  • Step S403 When receiving a control instruction for serial communication received by the user, determine whether the Bluetooth running state of the processor 11 is in the Bluetooth idle state. If so, go to step S404; if not, go to step S404. Step S407.
  • Step S404 loading the serial port.
  • buttons on the side of the processor 11 there are buttons on the side of the processor 11, and the user can perform operations through the buttons, such as: single-click, double-click, and triple-click, corresponding to a sequence of keys with different meanings.
  • the serial port is sent to the modem 12 side, and the modem 12 implements different functions according to different key values. Each key sequence corresponds to a control instruction.
  • the processor 11 when the processor 11 receives a control instruction input by a user through a key, determines that the Bluetooth motion state is in the Bluetooth idle state, loads and initializes the serial port, and switches the serial port from the off state to the on state.
  • the processor 11 can be caused to send the control instruction to the Modem through the serial port, and the Modem completes the corresponding control function according to the control instruction.
  • Step S405 After the control instruction is sent to the modem 12 through the serial port, determine whether the Bluetooth running state of the processor 11 is still in the Bluetooth idle state. If the Bluetooth running state is still in the Bluetooth idle state, then Go to step S406; if the Bluetooth running state is switched to the Bluetooth broadcast state, go to step S407.
  • Step S406 uninstall the serial port.
  • Step S407 keeping the working state of the serial port unchanged.
  • the user's key press action and the corresponding Bluetooth tracking device 1 response function are as follows:
  • the GPS required by the Bluetooth tracking device 1 for positioning and the microphone required for recording are set on the Modem side. After the user presses the key, only the key sequence needs to be sent to the Modem side through the serial port, and the rest The function Modem can be completed by itself, no longer relying on the processor 11 and the serial port. Therefore, in this embodiment, after detecting that the control instruction is sent, if the Bluetooth running state of the processor 11 is still in the Bluetooth idle state, uninstall the serial port driver and close the serial port. This can save power consumption of the serial port and reduce Bluetooth The whole power consumption of the tracking device 1 extends the standby time of the Bluetooth tracking device 1 in an emergency state.
  • the method for switching the working state of the serial port is that when the control command for serial communication is received by the user, it is detected that the Bluetooth running state of the processor 11 is idle. In the state, the serial port is loaded, so that the processor 11 can send the control instruction to the Modem through the serial port, so that the Bluetooth tracking device 1 can implement the corresponding control function; since the Bluetooth operation status of the processor 11 is detected after the control instruction is transmitted, When still in the idle state, uninstalling the serial port can save power consumption of the serial port, thereby reducing the overall power consumption of the Bluetooth tracking device 1, and extending the standby time of the Bluetooth tracking device 1 in the emergency state.
  • FIG. 5 is a schematic structural diagram of a system for switching a working state of a serial port according to a third embodiment of the present invention.
  • the system is deployed in the processor 11 in the Bluetooth tracking device 1 shown in FIG. 1.
  • the Bluetooth tracking device 1 shown in FIG. 1.
  • FIG. 5 For convenience of explanation, only parts related to this embodiment are shown.
  • the system for switching the working state of a serial port includes:
  • a monitoring unit configured to monitor the Bluetooth running state of the processor 11 in real time when the Bluetooth tracking device 1 is in the LTE mode, the Bluetooth running state includes a Bluetooth broadcast state and a Bluetooth idle state;
  • a first control unit is configured to load the serial port when the Bluetooth running state is a Bluetooth broadcast state; and unload the serial port when the Bluetooth running state is a Bluetooth idle state.
  • the system further includes:
  • a first determining unit configured to determine whether a Bluetooth running state of the processor 11 is in a Bluetooth idle state when a control instruction for serial communication is received by a user;
  • a second control unit is configured to load the serial port if the Bluetooth operating state is in a Bluetooth idle state.
  • the system further includes:
  • a second determining unit configured to determine whether the Bluetooth running state of the processor 11 is still in a Bluetooth idle state after the control instruction is sent to the modem 12 through the serial port;
  • a third control unit is configured to uninstall the serial port if the Bluetooth running state is still in the Bluetooth idle state; if the Bluetooth running state is switched to the Bluetooth broadcast state, keep the working state of the serial port unchanged.
  • the system further includes a synchronization function configuration unit for:
  • the serial port and Bluetooth synchronous loading and unloading functions of the Bluetooth tracking device 1 are disabled.
  • the system for switching the working state of the serial port in the embodiment of the present invention belongs to the same concept as the method for switching the working state of the serial port in the first embodiment or the second embodiment.
  • the detailed implementation process see the corresponding method embodiment, and the technology in the method embodiment.
  • the features are correspondingly applicable in this embodiment of the device, and are not repeated here.
  • FIG. 6 is a detailed structure diagram of a Bluetooth tracking device according to a fourth embodiment of the present invention. For convenience of explanation, only the parts related to this embodiment are shown.
  • the Bluetooth tracking device 1 provided in this embodiment includes a processor 11 and a modem 12.
  • the processor 11 and the modem 12 are connected through serial communication.
  • the Bluetooth tracking device 1 further includes a memory 13 and A computer program 14 stored in the memory 13 and executable on the processor. When the computer program 14 is executed by the processor 11, the computer program 14 implements the switching serial port work provided in the first embodiment or the second embodiment. Steps in the method of status.
  • FIG. 5 is only an example of the Bluetooth tracking device 1, and does not constitute a limitation on the Bluetooth tracking device 1.
  • the Bluetooth tracking device 1 may include more or less than the illustration Components, or a combination of certain components, or different components.
  • the Bluetooth tracking device 1 belongs to the same concept as the method for switching the working state of the serial port in the first embodiment or the second embodiment.
  • the specific implementation process is described in detail in the method embodiment, and the technical features in the method embodiment are in the device.
  • the embodiments are applicable correspondingly, and are not repeated here.
  • An embodiment of the present invention provides a storage medium, where a computer program is stored on the storage medium, and when the computer program is executed by a processor, implements the steps of the method for switching a working state of a serial port as provided in the foregoing Embodiment 1 or Embodiment 2.
  • the storage medium of the embodiment of the present invention belongs to the same concept as the method of Embodiment 1 or Embodiment 2.
  • the specific implementation process is detailed in the corresponding method embodiment, and the technical features in the method embodiment are implemented in the computer-readable storage medium.
  • the examples are applicable correspondingly, and will not be repeated here.
  • the division between functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be composed of several physical The components execute cooperatively.
  • Some or all physical components can be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit .
  • Such software may be distributed on computer-readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media).
  • computer storage medium includes volatile and non-volatile implemented in any method or technology used to store information such as computer-readable instructions, data structures, program modules or other data.
  • Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or may Any other medium used to store desired information and which can be accessed by a computer.
  • a communication medium typically contains computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transmission mechanism, and may include any information delivery medium .

Abstract

Embodiments of the present invention relate to the technical filed of communications. Disclosed are a method and system for switching an operating state of a serial port, a Bluetooth tracking device, and a storage medium. The method comprises: when the Bluetooth tracking device is in an LTE mode, monitoring a Bluetooth operating state of a processor in real time, the Bluetooth operating state comprising a Bluetooth broadcast state and a Bluetooth idle state; when the Bluetooth operating state is the Bluetooth broadcast state, loading the serial port; when the Bluetooth operating state is the Bluetooth idle state, unloading the serial port. According to the embodiments of the present invention, low power consumption of the serial port can be achieved, and the power consumption of the Bluetooth tracking device in the LTE mode is reduced.

Description

切换串口工作状态的方法、系统、蓝牙追踪设备及存储介质Method, system, Bluetooth tracking device and storage medium for switching working status of serial port
本申请要求享有2018年09月18日提交的名称为“切换串口工作状态的方法、系统、蓝牙追踪设备及存储介质”的中国专利申请CN201811087044.7的优先权,其全部内容通过引用并入本文中。This application claims priority from Chinese patent application CN201811087044.7 entitled "Method, System, Bluetooth Tracking Device, and Storage Medium for Switching Serial Port Working Status" filed on September 18, 2018, the entire contents of which are incorporated herein by reference. in.
技术领域Technical field
本发明涉及通信技术领域,特别涉及一种切换串口工作状态的方法、系统、蓝牙追踪设备及存储介质。The present invention relates to the field of communication technologies, and in particular, to a method, a system, a Bluetooth tracking device, and a storage medium for switching working states of a serial port.
背景技术Background technique
在日常生活中,有些重要物品丢失会导致很多不便,比如手机、钱包、钥匙、重要文件等。另外,在一些情况下,小孩或宠物在注人不注意的时候也很容易走丢。为减少此类情况的发生,基于无线通信技术的蓝牙追踪器被应用到这些重要物品、人或宠物安全保护的问题上。In daily life, the loss of some important items can cause a lot of inconvenience, such as mobile phones, wallets, keys, important documents, etc. In addition, in some cases, children or pets are easily lost when they are not noticed. To reduce this situation, Bluetooth trackers based on wireless communication technology are applied to the safety of these important items, people or pets.
蓝牙追踪器一般由基于蓝牙低功耗的微控制单元(Microcontroller Unit,MCU)和Modem两部分组成,其中MCU为运行有实时操作系统(Real-time operating system,RTOS)的蓝牙低功耗芯片,MCU与Modem之间通过串口通信连接。蓝牙追踪器在开机后一般包括两种工作模式:一种是,蓝牙低功耗(Bluetooth Low Energy,BLE)模式,在BLE模式下,蓝牙追踪器和用户携带的智能终端处于蓝牙连接状态,此时蓝牙追踪器通过蓝牙连接与智能终端进行通信连接,Modem与MCU之间的串口处于关闭状态,产品处于较低功耗水平;另一种是,长期演进(Long Term Evolution,LTE)模式,在LTE模式下蓝牙追踪器与用户携带的智能终端的蓝牙连接断开,MCU需要通过Modem与智能终端进行通信,因此MCU与Modem之间的串口一直处于开启状态,产品整体功耗较高。然而,由于蓝牙追踪器内MCU的蓝牙广播模式是周期性的,即在MCU在进行一次蓝牙广播后,会间隔一段时间,再进行下一次广播,其并非是持续不断的进行蓝牙广播的,因此在LTE模式下,若MCU与Modem之间的串口一直处于开启状态,会导致不必要的功耗浪费。The Bluetooth tracker generally consists of two parts: a Microcontroller Unit (MCU) and a Modem based on Bluetooth low power. The MCU is a Bluetooth low power chip running a real-time operating system (RTOS). The MCU and Modem are connected through serial communication. After the Bluetooth tracker is turned on, it generally includes two working modes: one is the Bluetooth Low Energy (BLE) mode. In the BLE mode, the Bluetooth tracker and the smart terminal carried by the user are in a Bluetooth connection state. When the Bluetooth tracker communicates with the smart terminal through a Bluetooth connection, the serial port between the Modem and the MCU is turned off, and the product is at a low power consumption level. The other is the Long Term Evolution (LTE) mode. In the LTE mode, the Bluetooth connection between the Bluetooth tracker and the smart terminal carried by the user is disconnected. The MCU needs to communicate with the smart terminal through the modem. Therefore, the serial port between the MCU and the modem is always on, and the overall power consumption of the product is high. However, because the Bluetooth broadcast mode of the MCU in the Bluetooth tracker is periodic, that is, after the MCU performs a Bluetooth broadcast, it will wait for a period of time and then perform the next broadcast. It is not a continuous Bluetooth broadcast, so In the LTE mode, if the serial port between the MCU and the modem is always on, unnecessary power consumption will be wasted.
发明内容Summary of the Invention
有鉴于此,本发明实施例的目的在于提供一种切换串口工作状态的方法、系统、蓝牙追踪设备及存储介质,以解决上述在LTE模式下,若MCU与Modem之间的串口一直处于开启状态,会导致不必要的功耗浪费问题。In view of this, an object of the embodiments of the present invention is to provide a method, a system, a Bluetooth tracking device, and a storage medium for switching the working state of a serial port, so as to solve the above-mentioned LTE mode, if the serial port between the MCU and the modem is always open , Will cause unnecessary waste of power.
本发明解决上述技术问题所采用的技术方案如下:The technical solutions adopted by the present invention to solve the above technical problems are as follows:
根据本发明实施例的一个方面,提供一种切换串口工作状态的方法,应用于蓝牙追踪设备,所述蓝牙追踪设备包括处理器和调制解调器,所述处理器和所述调制解调器通过串口通信连接,该方法包括:According to an aspect of the embodiment of the present invention, a method for switching the working state of a serial port is provided, which is applied to a Bluetooth tracking device. The Bluetooth tracking device includes a processor and a modem, and the processor and the modem are connected through serial communication. Methods include:
当蓝牙追踪设备处于LTE模式时,实时监测所述处理器的蓝牙运行状态,所述蓝牙运行状态包括蓝牙广播状态和蓝牙空闲状态;When the Bluetooth tracking device is in the LTE mode, the Bluetooth operation status of the processor is monitored in real time, and the Bluetooth operation status includes a Bluetooth broadcast status and a Bluetooth idle status;
当所述蓝牙运行状态为蓝牙广播状态时,加载所述串口;当所述蓝牙运行状态为蓝牙空闲状态时,卸载所述串口。When the Bluetooth operating state is a Bluetooth broadcast state, the serial port is loaded; when the Bluetooth operating state is a Bluetooth idle state, the serial port is unloaded.
根据本发明实施例的另一个方面,提供一种切换串口工作状态的系统,应用于蓝牙追踪设备,所述蓝牙追踪设备包括处理器和调制解调器,所述处理器和所述调制解调器通过串口通信连接,该系统包括:According to another aspect of the embodiments of the present invention, there is provided a system for switching the working state of a serial port, which is applied to a Bluetooth tracking device. The Bluetooth tracking device includes a processor and a modem, and the processor and the modem are connected through serial communication. The system includes:
监测单元,用于当蓝牙追踪设备处于LTE模式时,实时监测所述处理器的蓝牙运行状态,所述蓝牙运行状态包括蓝牙广播状态和蓝牙空闲状态;A monitoring unit, configured to monitor the Bluetooth running state of the processor in real time when the Bluetooth tracking device is in the LTE mode, the Bluetooth running state includes a Bluetooth broadcast state and a Bluetooth idle state;
第一控制单元,用于当所述蓝牙运行状态为蓝牙广播状态时,加载所述串口;当所述蓝牙运行状态为蓝牙空闲状态时,卸载所述串口。A first control unit is configured to load the serial port when the Bluetooth running state is a Bluetooth broadcast state; and unload the serial port when the Bluetooth running state is a Bluetooth idle state.
根据本发明实施例的又一个方面,提供一种蓝牙追踪设备,包括处理器和调制解调器,所述处理器和所示调制解调器串口通信连接,所述蓝牙追踪设备还包括存储器及存储在所述存储器上并可在所述处理器上运行的计算机程序,该所述计算机程序被所述处理器执行时,实现上述切换串口工作状态的方法的步骤。According to yet another aspect of the embodiments of the present invention, a Bluetooth tracking device is provided, which includes a processor and a modem. The processor is in serial communication connection with the modem shown. The Bluetooth tracking device further includes a memory and is stored on the memory. A computer program that can be run on the processor. When the computer program is executed by the processor, the steps of the method for switching the working state of a serial port are implemented.
根据本发明实施例的再一个方面,提供一种存储介质,所述存储介质上存储有计算机程序,所述计算机程序被处理器执行时,实现上述切换串口工作状态的方法的步骤。According to still another aspect of the embodiments of the present invention, a storage medium is provided. The storage medium stores a computer program, and when the computer program is executed by a processor, implements the steps of the foregoing method for switching a working state of a serial port.
本发明实施例提供的切换串口工作状态的方法、系统、蓝牙追踪设备及存储介质中,由于在蓝牙追踪设备处于LTE模式时,实时监测所述处理器的蓝牙运行状态,所述蓝牙运行状态包括蓝牙广播状态和蓝牙空闲状态;当所述蓝牙运行状态为蓝牙广播状态时,加载所述串口;当所述蓝牙运行状态为蓝牙空闲状态时,卸载所述串口,从而可以 实现串口低功耗,降低蓝牙追踪设备在LTE模式下的功耗。In the method, system, Bluetooth tracking device, and storage medium provided by the embodiments of the present invention, since the Bluetooth running state of the processor is monitored in real time when the Bluetooth tracking device is in the LTE mode, the Bluetooth running state includes Bluetooth broadcast state and Bluetooth idle state; loading the serial port when the Bluetooth operating state is the Bluetooth broadcast state; unloading the serial port when the Bluetooth operating state is the Bluetooth idle state, thereby achieving low power consumption of the serial port, Reduce the power consumption of Bluetooth tracking devices in LTE mode.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only the present invention. For some embodiments, for those of ordinary skill in the art, other drawings can be obtained according to these drawings without paying creative labor.
图1是本发明实施例中蓝牙追踪设备的基本结构框图;1 is a block diagram of a basic structure of a Bluetooth tracking device according to an embodiment of the present invention;
图2是本发明实施例一提供的切换串口工作状态的方法的实现流程示意图;2 is a schematic flowchart of an implementation method of a method for switching a working state of a serial port provided by Embodiment 1 of the present invention;
图3是本发明实施例一提供的切换串口工作状态的方法中一个蓝牙广播周期内蓝牙广播状态时间和蓝牙空闲状态时间的比例示意图;FIG. 3 is a schematic diagram of a ratio between a Bluetooth broadcast state time and a Bluetooth idle state time in a Bluetooth broadcast cycle in the method for switching a working state of a serial port provided by Embodiment 1 of the present invention; FIG.
图4是本发明实施例二提供的切换串口工作状态的方法的实现流程示意图;4 is a schematic flowchart of a method for switching a working state of a serial port provided by Embodiment 2 of the present invention;
图5是本发明实施例三提供的切换串口工作状态的系统的结构示意图;5 is a schematic structural diagram of a system for switching a working state of a serial port according to a third embodiment of the present invention;
图6是本发明实施例四提供的蓝牙追踪设备的详细结构示意图。FIG. 6 is a detailed structure diagram of a Bluetooth tracking device according to a fourth embodiment of the present invention.
具体实施方式detailed description
为了使本发明所要解决的技术问题、技术方案及有益效果更加清楚、明白,以下结合附图和实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅以解释本发明,并不用于限定本发明。In order to make the technical problems, technical solutions and beneficial effects to be more clearly understood by the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not intended to limit the present invention.
图1是本发明实施例中蓝牙追踪设备的基本结构框图。为了便于说明仅仅示出了与本发明实施例相关的部分。FIG. 1 is a block diagram of a basic structure of a Bluetooth tracking device according to an embodiment of the present invention. For convenience of explanation, only the parts related to the embodiment of the present invention are shown.
参见图1所示,本发明实施例中的蓝牙追踪设备1包括处理器11和调制解调器12,所述处理器11和所述调制解调器12通过串口通信连接。其中,所述处理器为蓝牙低功耗处理器,且所述处理器11上运行有RTOS操作系统。所述RTOS操作系统在运行状态下的工作模式包括BLE模式和LTE模式。其中,在BLE模式下,所述蓝牙追踪设备1与用户携带的智能终端建立有蓝牙连接,两者之间通过蓝牙通信连接。在LTE模式下,所述蓝牙追踪设备1内的处理器11处于蓝牙低功耗广播模式,其广播的报文需要通过串口传输至调制解调器12,由调制解调器12通过无线通信将所述报文发送至用户携带的智能终端。As shown in FIG. 1, the Bluetooth tracking device 1 in the embodiment of the present invention includes a processor 11 and a modem 12, and the processor 11 and the modem 12 are connected through a serial communication. The processor is a Bluetooth low energy processor, and an RTOS operating system runs on the processor 11. The operating modes of the RTOS operating system in a running state include a BLE mode and an LTE mode. Wherein, in the BLE mode, the Bluetooth tracking device 1 establishes a Bluetooth connection with the smart terminal carried by the user, and the two are connected through Bluetooth communication. In the LTE mode, the processor 11 in the Bluetooth tracking device 1 is in a Bluetooth low-power broadcast mode. The broadcast message needs to be transmitted to the modem 12 through the serial port, and the modem 12 sends the message to the modem via wireless communication. Smart terminal carried by the user.
基于上述蓝牙追踪设备1的基本结构框图,提出本发明的以下实施例。Based on the basic structural block diagram of the Bluetooth tracking device 1 described above, the following embodiments of the present invention are proposed.
实施例一Example one
图2是本发明实施例一提供的切换串口工作状态的方法的实现流程示意图。该方法的执行主体为图1所示蓝牙追踪设备1内的处理器11。参见图2所示,本实施例提供的切换串口工作状态的方法包括以下步骤:FIG. 2 is a schematic flowchart of a method for switching a working state of a serial port provided by Embodiment 1 of the present invention. The method is executed by the processor 11 in the Bluetooth tracking device 1 shown in FIG. 1. As shown in FIG. 2, the method for switching the working state of a serial port provided in this embodiment includes the following steps:
步骤S201,当蓝牙追踪设备1处于LTE模式时,实时监测所述处理器11的蓝牙运行状态,所述蓝牙运行状态包括蓝牙广播状态和蓝牙空闲状态。In step S201, when the Bluetooth tracking device 1 is in the LTE mode, the Bluetooth running state of the processor 11 is monitored in real time, and the Bluetooth running state includes a Bluetooth broadcast state and a Bluetooth idle state.
所述蓝牙追踪设备1进入LTE模式有两个途径:一种是,蓝牙追踪设备1开机后和用户携带的智能终端上的蓝牙追踪应用程序进行注册绑定操作完成后,所述蓝牙追踪设备1就会处于LTE模式;另一种是,当所述蓝牙追踪设备1和所述智能终端处于蓝牙连接状态时,所述蓝牙追踪设备1处于BLE模式,当蓝牙连接断开时,所述蓝牙追踪设备1会自动切换到LTE模式。There are two ways for the Bluetooth tracking device 1 to enter the LTE mode: one is that after the Bluetooth tracking device 1 is turned on and the Bluetooth tracking application on the smart terminal carried by the user performs a registration binding operation, the Bluetooth tracking device 1 It will be in LTE mode; the other is that when the Bluetooth tracking device 1 and the smart terminal are in a Bluetooth connection state, the Bluetooth tracking device 1 is in a BLE mode, and when the Bluetooth connection is disconnected, the Bluetooth tracking Device 1 will automatically switch to LTE mode.
在LTE模式下,所述蓝牙追踪设备1内的处理器11处于蓝牙低功耗广播模式。在蓝牙低功耗广播模式下,蓝牙低功耗追踪设备广播态是周期性的发送数据包,扫描周围的可连接智能设备的,假设一个广播周期总时长为T,处理器11在T1时间内发送广播数据包,在T2时间内处于空闲状态,T=T1+T2。那么,在T1时间内,处理器11的蓝牙运行状态处于蓝牙广播状态;在T2时间内,蓝牙低功耗的蓝牙运行状态处于蓝牙空闲状态。参见图3所示,一般情况下一个广播周期时间内T2约占99%的时间。In the LTE mode, the processor 11 in the Bluetooth tracking device 1 is in a Bluetooth low energy broadcast mode. In the Bluetooth low energy broadcast mode, the Bluetooth low energy tracking device broadcasts data packets periodically and scans the surrounding smart devices. Assume that the total duration of a broadcast cycle is T, and the processor 11 is within T1 time. Send a broadcast data packet, which is in idle state within T2 time, T = T1 + T2. Then, in the time T1, the Bluetooth running state of the processor 11 is in the Bluetooth broadcast state; in the time T2, the Bluetooth low-power Bluetooth running state is in the Bluetooth idle state. Referring to FIG. 3, in general, T2 occupies about 99% of the time in a broadcast cycle time.
步骤S202,当所述蓝牙运行状态为蓝牙广播状态时,加载所述串口;当所述蓝牙运行状态为蓝牙空闲状态时,卸载所述串口。In step S202, the serial port is loaded when the Bluetooth running state is a Bluetooth broadcast state; when the Bluetooth running state is a Bluetooth idle state, the serial port is unloaded.
在本实施例中,当所述处理器11的蓝牙运行状态为蓝牙广播状态时,同步加载串口驱动并进行串口初始化动作,使得处理器11内的串口任务也处于工作状态;当处理器11的蓝牙运行状态为空闲状态,未发送广播数据包时,同步把卸载串口驱动,关闭串口。由于蓝牙追踪设备1在LTE模式下,每个蓝牙广播周期仅有1%的时间处于蓝牙广播状态,因此,在同步蓝牙广播状态和串口工作状态后,可以实现串口任务的低功耗,进而降低蓝牙追踪设备1的功耗。In this embodiment, when the Bluetooth running state of the processor 11 is a Bluetooth broadcast state, the serial port driver is synchronously loaded and the serial port initialization action is performed, so that the serial port task in the processor 11 is also in a working state; when the processor 11 ’s The Bluetooth running state is idle. When no broadcast packet is sent, the serial port driver is unloaded and the serial port is closed. Since the Bluetooth tracking device 1 is in the LTE mode, each Bluetooth broadcast cycle is only 1% of the time in the Bluetooth broadcast state. Therefore, after synchronizing the Bluetooth broadcast state and the serial port working state, the low power consumption of the serial port task can be achieved, thereby reducing Bluetooth tracks the power consumption of device 1.
在本实施例中,所述方法还包括:In this embodiment, the method further includes:
当所述蓝牙追踪设备1处于LTE模式时,启动所述蓝牙追踪设备1的串口和蓝牙同 步加载卸载功能;When the Bluetooth tracking device 1 is in the LTE mode, starting the serial port and Bluetooth synchronous loading and unloading function of the Bluetooth tracking device 1;
当所述蓝牙追踪设备1退出LTE模式时,关闭所述蓝牙追踪设备1的串口和蓝牙同步加载卸载功能。When the Bluetooth tracking device 1 exits the LTE mode, the serial port and Bluetooth synchronous loading and unloading functions of the Bluetooth tracking device 1 are disabled.
在本实施例中,在启动所述蓝牙追踪设备1的串口和蓝牙同步加载卸载功能时,才触发所述蓝牙追踪设备1的处理器11实时监测自身的蓝牙运行状态,进入切换串口工作状态的处理流程。由于仅在蓝牙追踪设备1处于LTE模式时,开启所述串口和蓝牙同步加载卸载功能,在蓝牙追踪设备1退出LTE模式时,关闭所述串口和蓝牙同步加载卸载功能,这样可以进一步的节省所述蓝牙追踪设备1的功耗。In this embodiment, when the serial port of the Bluetooth tracking device 1 and the Bluetooth synchronous loading and unloading function are started, the processor 11 of the Bluetooth tracking device 1 is triggered to monitor its own Bluetooth running state in real time and enter the state of switching the serial port working state. Process flow. Because the serial port and the Bluetooth synchronous loading and unloading function are enabled only when the Bluetooth tracking device 1 is in the LTE mode, when the Bluetooth tracking device 1 exits the LTE mode, the serial port and Bluetooth synchronous loading and unloading function are turned off, which can further save The power consumption of the Bluetooth tracking device 1 is described.
以上可以看出,本实施例提供的切换串口工作状态的方法,由于在蓝牙追踪设备1处于LTE模式时,实时监测所述处理器11的蓝牙运行状态;当所述蓝牙运行状态为蓝牙广播状态时,加载所述串口;当所述蓝牙运行状态为蓝牙空闲状态时,卸载所述串口,从而可以同步串口和蓝牙的工作状态,实现串口任务的低功耗,降低蓝牙追踪设备1的整机功耗。It can be seen from the foregoing that the method for switching the working status of a serial port provided in this embodiment monitors the Bluetooth running status of the processor 11 in real time when the Bluetooth tracking device 1 is in the LTE mode; when the Bluetooth running status is a Bluetooth broadcast status The serial port is loaded; when the Bluetooth running state is the Bluetooth idle state, the serial port is unloaded, so that the serial port and the Bluetooth working state can be synchronized, the low power consumption of the serial port task is reduced, and the whole device of the Bluetooth tracking device 1 is reduced Power consumption.
实施例二Example two
图4是本发明实施例二提供的切换串口工作状态的方法的实现流程示意图。该方法的执行主体为图1所示蓝牙追踪设备1内的处理器11。参见图3所示,本实施例提供的切换串口工作状态的方法包括以下步骤:FIG. 4 is a schematic flowchart of a method for switching a working state of a serial port provided by Embodiment 2 of the present invention. The method is executed by the processor 11 in the Bluetooth tracking device 1 shown in FIG. 1. As shown in FIG. 3, the method for switching the working status of a serial port provided in this embodiment includes the following steps:
步骤S401,当蓝牙追踪设备1处于LTE模式时,实时监测所述处理器11的蓝牙运行状态,所述蓝牙运行状态包括蓝牙广播状态和蓝牙空闲状态;In step S401, when the Bluetooth tracking device 1 is in the LTE mode, the Bluetooth running state of the processor 11 is monitored in real time, and the Bluetooth running state includes a Bluetooth broadcast state and a Bluetooth idle state;
步骤S402,当所述蓝牙运行状态为蓝牙广播状态时,加载所述串口;当所述蓝牙运行状态为蓝牙空闲状态时,卸载所述串口。In step S402, when the Bluetooth operating state is a Bluetooth broadcast state, the serial port is loaded; when the Bluetooth operating state is a Bluetooth idle state, the serial port is unloaded.
需要说明的是,本实施例中的步骤S301~步骤S302由于与上一实施例中的步骤S201~步骤S202的实现方式完全相同,因此在此不再赘述。It should be noted that, since steps S301 to S302 in this embodiment are completely the same as the implementation methods of steps S201 to S202 in the previous embodiment, details are not described herein again.
步骤S403,当接收到用户输入的要求进行串口通信的控制指令时,判断所述处理器11的蓝牙运行状态是否处于蓝牙空闲状态,若是,则进入到步骤S404中;若否,则跳转到步骤S407。Step S403: When receiving a control instruction for serial communication received by the user, determine whether the Bluetooth running state of the processor 11 is in the Bluetooth idle state. If so, go to step S404; if not, go to step S404. Step S407.
步骤S404,加载所述串口。Step S404, loading the serial port.
在本实施例中,所述处理器11的侧边设有按键,用户可通过按键操作,例如:单 击、双击、三击,对应产生不同含义的按键序列,从所述处理器11需要通过串口发送到调制解调器12侧,由调制解调器12根据不同的键值,实现不同的功能。其中,每种按键序列对应一种控制指令。In this embodiment, there are buttons on the side of the processor 11, and the user can perform operations through the buttons, such as: single-click, double-click, and triple-click, corresponding to a sequence of keys with different meanings. The serial port is sent to the modem 12 side, and the modem 12 implements different functions according to different key values. Each key sequence corresponds to a control instruction.
本实施例中,所述处理器11在接收到用户通过按键输入的控制指令时,判断所述蓝牙运动状态处于蓝牙空闲状态时,加载并初始化串口,使串口从关闭状态切换到开启状态,这样可以使得处理器11将控制指令通过串口发送至Modem,由Modem根据控制指令完成相应的控制功能。In this embodiment, when the processor 11 receives a control instruction input by a user through a key, determines that the Bluetooth motion state is in the Bluetooth idle state, loads and initializes the serial port, and switches the serial port from the off state to the on state. The processor 11 can be caused to send the control instruction to the Modem through the serial port, and the Modem completes the corresponding control function according to the control instruction.
步骤S405,在所述控制指令经所述串口发送至所述调制解调器12后,判断所述处理器11的蓝牙运行状态是否仍然处于蓝牙空闲状态,若所述蓝牙运行状态仍然处于蓝牙空闲状态,则进入到步骤S406中;若所述蓝牙运行状态切换为蓝牙广播状态,则进入到步骤S407中。Step S405: After the control instruction is sent to the modem 12 through the serial port, determine whether the Bluetooth running state of the processor 11 is still in the Bluetooth idle state. If the Bluetooth running state is still in the Bluetooth idle state, then Go to step S406; if the Bluetooth running state is switched to the Bluetooth broadcast state, go to step S407.
步骤S406,卸载所述串口。Step S406: uninstall the serial port.
步骤S407,保持所述串口的工作状态不变。Step S407, keeping the working state of the serial port unchanged.
在一具体实现示例中,用户按键动作和对应的蓝牙追踪设备1响应功能如下:In a specific implementation example, the user's key press action and the corresponding Bluetooth tracking device 1 response function are as follows:
Figure PCTCN2019103679-appb-000001
Figure PCTCN2019103679-appb-000001
在本实施例中,所述蓝牙追踪设备1定位所需的GPS和录音所需的麦克风都设置在Modem侧,用户按键动作完成后,仅需要将按键序列通过串口发送到Modem侧,剩下的功能Modem可自行完成,不再依赖处理器11和串口。因此,本实施例中在,检测到控制指令发送完毕后,若所述处理器11的蓝牙运行状态仍然处于蓝牙空闲状态,则卸载串口驱动,关闭串口,这样可以节省串口功耗,进而降低蓝牙追踪设备1的整机功耗,延长蓝牙追踪设备1在紧急状态下的待机时长。In this embodiment, the GPS required by the Bluetooth tracking device 1 for positioning and the microphone required for recording are set on the Modem side. After the user presses the key, only the key sequence needs to be sent to the Modem side through the serial port, and the rest The function Modem can be completed by itself, no longer relying on the processor 11 and the serial port. Therefore, in this embodiment, after detecting that the control instruction is sent, if the Bluetooth running state of the processor 11 is still in the Bluetooth idle state, uninstall the serial port driver and close the serial port. This can save power consumption of the serial port and reduce Bluetooth The whole power consumption of the tracking device 1 extends the standby time of the Bluetooth tracking device 1 in an emergency state.
以上可以看出,相对于上一实施例,本实施例提供的切换串口工作状态的方法由于在接收到用户输入的要求进行串口通信的控制指令时,检测到处理器11的蓝牙运行状态 处于空闲状态时,加载串口,从而可以使得处理器11通过串口将控制指令发送至Modem,使得蓝牙追踪设备1可以实现相应的控制功能;由于在控制指令发送完成后,检测到处理器11的蓝牙运行状态仍然处于空闲状态时,卸载串口,从而可以节省串口功耗,进而降低蓝牙追踪设备1的整机功耗,延长蓝牙追踪设备1在紧急状态下的待机时长。It can be seen from the foregoing that, compared with the previous embodiment, the method for switching the working state of the serial port provided in this embodiment is that when the control command for serial communication is received by the user, it is detected that the Bluetooth running state of the processor 11 is idle. In the state, the serial port is loaded, so that the processor 11 can send the control instruction to the Modem through the serial port, so that the Bluetooth tracking device 1 can implement the corresponding control function; since the Bluetooth operation status of the processor 11 is detected after the control instruction is transmitted, When still in the idle state, uninstalling the serial port can save power consumption of the serial port, thereby reducing the overall power consumption of the Bluetooth tracking device 1, and extending the standby time of the Bluetooth tracking device 1 in the emergency state.
实施例三Example three
图5是本发明实施例三提供的切换串口工作状态的系统的结构示意图。该系统部署于图1所示蓝牙追踪设备1中的处理器11内。为了便于说明仅仅示出了与本实施例相关的部分。FIG. 5 is a schematic structural diagram of a system for switching a working state of a serial port according to a third embodiment of the present invention. The system is deployed in the processor 11 in the Bluetooth tracking device 1 shown in FIG. 1. For convenience of explanation, only parts related to this embodiment are shown.
参见图5所示,本实施例提供的切换串口工作状态的系统,包括:As shown in FIG. 5, the system for switching the working state of a serial port provided in this embodiment includes:
监测单元,用于当蓝牙追踪设备1处于LTE模式时,实时监测所述处理器11的蓝牙运行状态,所述蓝牙运行状态包括蓝牙广播状态和蓝牙空闲状态;A monitoring unit, configured to monitor the Bluetooth running state of the processor 11 in real time when the Bluetooth tracking device 1 is in the LTE mode, the Bluetooth running state includes a Bluetooth broadcast state and a Bluetooth idle state;
第一控制单元,用于当所述蓝牙运行状态为蓝牙广播状态时,加载所述串口;当所述蓝牙运行状态为蓝牙空闲状态时,卸载所述串口。A first control unit is configured to load the serial port when the Bluetooth running state is a Bluetooth broadcast state; and unload the serial port when the Bluetooth running state is a Bluetooth idle state.
所述系统还包括:The system further includes:
第一判断单元,用于当接收到用户输入的要求进行串口通信的控制指令时,判断所述处理器11的蓝牙运行状态是否处于蓝牙空闲状态;A first determining unit, configured to determine whether a Bluetooth running state of the processor 11 is in a Bluetooth idle state when a control instruction for serial communication is received by a user;
第二控制单元,用于若所述蓝牙运行状态处于蓝牙空闲状态,则加载所述串口。A second control unit is configured to load the serial port if the Bluetooth operating state is in a Bluetooth idle state.
所述系统还包括:The system further includes:
第二判断单元,用于在所述控制指令经所述串口发送至所述调制解调器12后,判断所述处理器11的蓝牙运行状态是否仍然处于蓝牙空闲状态;A second determining unit, configured to determine whether the Bluetooth running state of the processor 11 is still in a Bluetooth idle state after the control instruction is sent to the modem 12 through the serial port;
第三控制单元,用于若所述蓝牙运行状态仍然处于蓝牙空闲状态,则卸载所述串口;若所述蓝牙运行状态切换为蓝牙广播状态,则保持所述串口的工作状态不变。A third control unit is configured to uninstall the serial port if the Bluetooth running state is still in the Bluetooth idle state; if the Bluetooth running state is switched to the Bluetooth broadcast state, keep the working state of the serial port unchanged.
所述系统还包括同步功能配置单元,用于:The system further includes a synchronization function configuration unit for:
当所述蓝牙追踪设备1处于LTE模式时,启动所述蓝牙追踪设备1的串口和蓝牙同步加载卸载功能;When the Bluetooth tracking device 1 is in the LTE mode, start the serial port and Bluetooth synchronous loading and unloading functions of the Bluetooth tracking device 1;
当所述蓝牙追踪设备1退出LTE模式时,关闭所述蓝牙追踪设备1的串口和蓝牙同步加载卸载功能。When the Bluetooth tracking device 1 exits the LTE mode, the serial port and Bluetooth synchronous loading and unloading functions of the Bluetooth tracking device 1 are disabled.
本发明实施例的切换串口工作状态的系统与上述实施例一或实施例二的切换串口工作状态的方法属于同一构思,其具体实现过程详细见对应的方法实施例,且方法实施例中的技术特征在本设备实施例中均对应适用,这里不再赘述。The system for switching the working state of the serial port in the embodiment of the present invention belongs to the same concept as the method for switching the working state of the serial port in the first embodiment or the second embodiment. For the detailed implementation process, see the corresponding method embodiment, and the technology in the method embodiment. The features are correspondingly applicable in this embodiment of the device, and are not repeated here.
本领域普通技术人员可以理解,本实施例所公开方法中的全部或某些步骤、可以被实施为软件、固件、硬件及其适当的组合。Those of ordinary skill in the art can understand that all or some steps in the method disclosed in this embodiment can be implemented as software, firmware, hardware, and appropriate combinations thereof.
实施例四Embodiment 4
图6是本发明实施例四提供的蓝牙追踪设备的详细结构示意图。为了便于说明,仅仅示出了与本实施例相关的部分。FIG. 6 is a detailed structure diagram of a Bluetooth tracking device according to a fourth embodiment of the present invention. For convenience of explanation, only the parts related to this embodiment are shown.
参见图6所示,本实施例提供的蓝牙追踪设备1,包括处理器11和调制解调器12,所述处理器11和所示调制解调器12通过串口通信连接,所述蓝牙追踪设备1还包括存储器13及存储在所述存储器13上并可在所述处理器上运行的计算机程序14,该所述计算机程序14被所述处理器11执行时,实现上述实施例一或实施例二提供的切换串口工作状态的方法的步骤。As shown in FIG. 6, the Bluetooth tracking device 1 provided in this embodiment includes a processor 11 and a modem 12. The processor 11 and the modem 12 are connected through serial communication. The Bluetooth tracking device 1 further includes a memory 13 and A computer program 14 stored in the memory 13 and executable on the processor. When the computer program 14 is executed by the processor 11, the computer program 14 implements the switching serial port work provided in the first embodiment or the second embodiment. Steps in the method of status.
本领域普通技术人员可以理解,图5仅仅是蓝牙追踪设备1的示例,并不构成对蓝牙追踪设备1的限定,在实际应用中所述蓝牙追踪设备1可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件。Those skilled in the art can understand that FIG. 5 is only an example of the Bluetooth tracking device 1, and does not constitute a limitation on the Bluetooth tracking device 1. In actual applications, the Bluetooth tracking device 1 may include more or less than the illustration Components, or a combination of certain components, or different components.
本发明实施例的蓝牙追踪设备1与上述实施例一或实施例二的切换串口工作状态的方法属于同一构思,其具体实现过程详细见方法实施例,且方法实施例中的技术特征在本设备实施例中均对应适用,这里不再赘述。The Bluetooth tracking device 1 according to the embodiment of the present invention belongs to the same concept as the method for switching the working state of the serial port in the first embodiment or the second embodiment. The specific implementation process is described in detail in the method embodiment, and the technical features in the method embodiment are in the device. The embodiments are applicable correspondingly, and are not repeated here.
本领域普通技术人员可以理解,本实施例所公开方法中的全部或某些步骤、可以被实施为软件、固件、硬件及其适当的组合。Those of ordinary skill in the art can understand that all or some steps in the method disclosed in this embodiment can be implemented as software, firmware, hardware, and appropriate combinations thereof.
实施例六Example Six
本发明实施例提供了一种存储介质,所述存储介质上存储有计算机程序,计算机程序被处理器执行时,实现如上述实施例一或实施例二提供的切换串口工作状态的方法的 步骤。An embodiment of the present invention provides a storage medium, where a computer program is stored on the storage medium, and when the computer program is executed by a processor, implements the steps of the method for switching a working state of a serial port as provided in the foregoing Embodiment 1 or Embodiment 2.
本发明实施例的存储介质与上述实施例一或实施例二的方法属于同一构思,其具体实现过程详细见对应的方法实施例,且方法实施例中的技术特征在本计算机可读存储介质实施例中均对应适用,这里不再赘述。The storage medium of the embodiment of the present invention belongs to the same concept as the method of Embodiment 1 or Embodiment 2. The specific implementation process is detailed in the corresponding method embodiment, and the technical features in the method embodiment are implemented in the computer-readable storage medium. The examples are applicable correspondingly, and will not be repeated here.
本领域普通技术人员可以理解,上文中所公开方法中的全部或某些步骤、系统、装置中的功能模块/单元可以被实施为软件、固件、硬件及其适当的组合。Those of ordinary skill in the art can understand that all or some of the steps, systems, and functional modules / units in the devices disclosed in the methods above can be implemented as software, firmware, hardware, and appropriate combinations thereof.
在硬件实施方式中,在以上描述中提及的功能模块/单元之间的划分不一定对应于物理组件的划分;例如,一个物理组件可以具有多个功能,或者一个功能或步骤可以由若干物理组件合作执行。某些物理组件或所有物理组件可以被实施为由处理器,如中央处理器、数字信号处理器或微处理器执行的软件,或者被实施为硬件,或者被实施为集成电路,如专用集成电路。这样的软件可以分布在计算机可读介质上,计算机可读介质可以包括计算机存储介质(或非暂时性介质)和通信介质(或暂时性介质)。如本领域普通技术人员公知的,术语计算机存储介质包括在用于存储信息(诸如计算机可读指令、数据结构、程序模块或其他数据)的任何方法或技术中实施的易失性和非易失性、可移除和不可移除介质。计算机存储介质包括但不限于RAM、ROM、EEPROM、闪存或其他存储器技术、CD-ROM、数字多功能盘(DVD)或其他光盘存储、磁盒、磁带、磁盘存储或其他磁存储装置、或者可以用于存储期望的信息并且可以被计算机访问的任何其他的介质。此外,本领域普通技术人员公知的是,通信介质通常包含计算机可读指令、数据结构、程序模块或者诸如载波或其他传输机制之类的调制数据信号中的其他数据,并且可包括任何信息递送介质。In a hardware implementation, the division between functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be composed of several physical The components execute cooperatively. Some or all physical components can be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit . Such software may be distributed on computer-readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). As is known to those of ordinary skill in the art, the term computer storage medium includes volatile and non-volatile implemented in any method or technology used to store information such as computer-readable instructions, data structures, program modules or other data. Removable, removable and non-removable media. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or may Any other medium used to store desired information and which can be accessed by a computer. In addition, it is well known to those of ordinary skill in the art that a communication medium typically contains computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transmission mechanism, and may include any information delivery medium .
以上参照附图说明了本发明的优选实施例,并非因此局限本发明的权利范围。本领域技术人员不脱离本发明的范围和实质内所作的任何修改、等同替换和改进,均应在本发明的权利范围之内。The preferred embodiments of the present invention have been described above with reference to the accompanying drawings, without thereby limiting the scope of rights of the present invention. Any modification, equivalent replacement, and improvement made by those skilled in the art without departing from the scope and substance of the present invention shall fall within the scope of the rights of the present invention.

Claims (10)

  1. 一种切换串口工作状态的方法,应用于蓝牙追踪设备,所述蓝牙追踪设备包括处理器和调制解调器,所述处理器和所述调制解调器通过串口通信连接,其中,所述方法包括:A method for switching the working state of a serial port is applied to a Bluetooth tracking device. The Bluetooth tracking device includes a processor and a modem, and the processor and the modem are connected through serial communication. The method includes:
    当蓝牙追踪设备处于LTE模式时,实时监测所述处理器的蓝牙运行状态,所述蓝牙运行状态包括蓝牙广播状态和蓝牙空闲状态;When the Bluetooth tracking device is in the LTE mode, the Bluetooth operation status of the processor is monitored in real time, and the Bluetooth operation status includes a Bluetooth broadcast status and a Bluetooth idle status;
    当所述蓝牙运行状态为蓝牙广播状态时,加载所述串口;当所述蓝牙运行状态为蓝牙空闲状态时,卸载所述串口。When the Bluetooth operating state is a Bluetooth broadcast state, the serial port is loaded; when the Bluetooth operating state is a Bluetooth idle state, the serial port is unloaded.
  2. 如权利要求1所述的切换串口工作状态的方法,其中,所述方法还包括:The method according to claim 1, wherein the method further comprises:
    当接收到用户输入的要求进行串口通信的控制指令时,判断所述处理器的蓝牙运行状态是否处于蓝牙空闲状态;When receiving a control instruction input by a user for serial communication, determining whether the Bluetooth running state of the processor is in a Bluetooth idle state;
    若所述蓝牙运行状态处于蓝牙空闲状态,则加载所述串口。If the Bluetooth running state is a Bluetooth idle state, load the serial port.
  3. 如权利要求2所述的切换串口工作状态的方法,其中,所述若接收到用户输入的要求进行串口通信的控制指令时,所述蓝牙运行状态处于蓝牙空闲状态,则加载所述串口之后还包括:The method for switching the working state of a serial port according to claim 2, wherein, if the Bluetooth operating state is in a Bluetooth idle state when a control instruction for serial communication is received by a user, the serial port is loaded after the serial port is loaded. include:
    在所述控制指令经所述串口发送至所述调制解调器后,判断所述处理器的蓝牙运行状态是否仍然处于蓝牙空闲状态;After the control instruction is sent to the modem via the serial port, determining whether the Bluetooth running state of the processor is still in the Bluetooth idle state;
    若所述蓝牙运行状态仍然处于蓝牙空闲状态,则卸载所述串口;若所述蓝牙运行状态切换为蓝牙广播状态,则保持所述串口的工作状态不变。If the Bluetooth operating state is still in the Bluetooth idle state, the serial port is uninstalled; if the Bluetooth operating state is switched to the Bluetooth broadcast state, the working state of the serial port is maintained.
  4. 如权利要求1所述的切换串口工作状态的方法,其中,所述方法还包括:The method according to claim 1, wherein the method further comprises:
    当所述蓝牙追踪设备处于LTE模式时,启动所述蓝牙追踪设备的串口和蓝牙同步加载卸载功能;When the Bluetooth tracking device is in the LTE mode, start the serial port of the Bluetooth tracking device and the Bluetooth synchronous loading and unloading function;
    当所述蓝牙追踪设备退出LTE模式时,关闭所述蓝牙追踪设备的串口和蓝牙同步加载卸载功能。When the Bluetooth tracking device exits the LTE mode, the serial port of the Bluetooth tracking device and the Bluetooth synchronous loading and unloading function are closed.
  5. 一种切换串口工作状态的系统,应用于蓝牙追踪设备,所述蓝牙追踪设备包括处理器和调制解调器,所述处理器和所述调制解调器通过串口通信连接,其中,所述系统包括:A system for switching the working state of a serial port is applied to a Bluetooth tracking device. The Bluetooth tracking device includes a processor and a modem, and the processor and the modem are connected through serial communication. The system includes:
    监测单元,用于当蓝牙追踪设备处于LTE模式时,实时监测所述处理器的蓝牙运行状态,所述蓝牙运行状态包括蓝牙广播状态和蓝牙空闲状态;A monitoring unit, configured to monitor the Bluetooth running state of the processor in real time when the Bluetooth tracking device is in the LTE mode, the Bluetooth running state includes a Bluetooth broadcast state and a Bluetooth idle state;
    第一控制单元,用于当所述蓝牙运行状态为蓝牙广播状态时,加载所述串口;当所述蓝牙运行状态为蓝牙空闲状态时,卸载所述串口。A first control unit is configured to load the serial port when the Bluetooth running state is a Bluetooth broadcast state; and unload the serial port when the Bluetooth running state is a Bluetooth idle state.
  6. 如权利要求5所述的切换串口工作状态的系统,其中,所述系统还包括:The system of claim 5, wherein the system further comprises:
    第一判断单元,用于当接收到用户输入的要求进行串口通信的控制指令时,判断所述处理器的蓝牙运行状态是否处于蓝牙空闲状态;A first determining unit, configured to determine whether a Bluetooth running state of the processor is in a Bluetooth idle state when a control instruction for serial communication is received by a user;
    第二控制单元,用于若所述蓝牙运行状态处于蓝牙空闲状态,则加载所述串口。A second control unit is configured to load the serial port if the Bluetooth operating state is in a Bluetooth idle state.
  7. 如权利要求6所述的切换串口工作状态的系统,其中,还包括:The system of claim 6, further comprising:
    第二判断单元,用于在所述控制指令经所述串口发送至所述调制解调器后,判断所述处理器的蓝牙运行状态是否仍然处于蓝牙空闲状态;A second determining unit, configured to determine whether the Bluetooth running state of the processor is still in a Bluetooth idle state after the control instruction is sent to the modem through the serial port;
    第三控制单元,用于若所述蓝牙运行状态仍然处于蓝牙空闲状态,则卸载所述串口;若所述蓝牙运行状态切换为蓝牙广播状态,则保持所述串口的工作状态不变。A third control unit is configured to uninstall the serial port if the Bluetooth running state is still in the Bluetooth idle state; if the Bluetooth running state is switched to the Bluetooth broadcast state, keep the working state of the serial port unchanged.
  8. 如权利要求5所述的切换串口工作状态的系统,其中,所述系统还包括同步功能配置单元,用于:The system of claim 5, wherein the system further comprises a synchronization function configuration unit configured to:
    当所述蓝牙追踪设备处于LTE模式时,启动所述蓝牙追踪设备的串口和蓝牙同步加载卸载功能;When the Bluetooth tracking device is in the LTE mode, start the serial port of the Bluetooth tracking device and the Bluetooth synchronous loading and unloading function;
    当所述蓝牙追踪设备退出LTE模式时,关闭所述蓝牙追踪设备的串口和蓝牙同步加载卸载功能。When the Bluetooth tracking device exits the LTE mode, the serial port of the Bluetooth tracking device and the Bluetooth synchronous loading and unloading function are closed.
  9. 一种蓝牙追踪设备,包括处理器和调制解调器,所述处理器和所示调制解调器串口通信连接,其中,所述蓝牙追踪设备还包括存储器及存储在所述存储器上并可在所述处理器上运行的计算机程序,该所述计算机程序被所述处理器执行时,实现如权利要求1至4中任一项所述的切换串口工作状态的方法的步骤。A Bluetooth tracking device includes a processor and a modem, and the processor is communicatively connected to the serial port of the modem, wherein the Bluetooth tracking device further includes a memory and is stored on the memory and can run on the processor. A computer program that, when executed by the processor, implements the steps of the method for switching the working state of a serial port according to any one of claims 1 to 4.
  10. 一种存储介质,其中,所述存储介质上存储有计算机程序,所述计算机程序被处理器执行时,实现如权利要求1至4中任一项所述切换串口工作状态的方法的步骤。A storage medium, wherein a computer program is stored on the storage medium, and when the computer program is executed by a processor, the steps of the method for switching the working state of a serial port according to any one of claims 1 to 4 are implemented.
PCT/CN2019/103679 2018-09-18 2019-08-30 Method and system for switching operating state of serial port, bluetooth tracking device, and storage medium WO2020057345A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811087044.7 2018-09-18
CN201811087044.7A CN110913377B (en) 2018-09-18 2018-09-18 Method and system for switching working state of serial port, Bluetooth tracking device and storage medium

Publications (1)

Publication Number Publication Date
WO2020057345A1 true WO2020057345A1 (en) 2020-03-26

Family

ID=69813503

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/103679 WO2020057345A1 (en) 2018-09-18 2019-08-30 Method and system for switching operating state of serial port, bluetooth tracking device, and storage medium

Country Status (2)

Country Link
CN (1) CN110913377B (en)
WO (1) WO2020057345A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006126062A2 (en) * 2005-05-27 2006-11-30 Nokia Corporation Mobile node, method and computer program product for handing off from one type of network to another type of network
CN101471796A (en) * 2007-12-24 2009-07-01 Lg电子株式会社 Terminal provided with networking module and method for receiving and transmitting data using the same
CN101754458A (en) * 2008-12-01 2010-06-23 联想(北京)有限公司 Working mode switching method of communication system and mobile terminal
CN101873679A (en) * 2009-04-23 2010-10-27 瑞昱半导体股份有限公司 Methods and apparatuses of network system with power saving functions
CN101873385A (en) * 2010-06-04 2010-10-27 北京播思软件技术有限公司 Device and method for entering power-saving mode of hand-held terminal rapidly

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103455455A (en) * 2012-05-30 2013-12-18 鸿富锦精密工业(深圳)有限公司 Serial switching system, server and serial switching method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006126062A2 (en) * 2005-05-27 2006-11-30 Nokia Corporation Mobile node, method and computer program product for handing off from one type of network to another type of network
CN101471796A (en) * 2007-12-24 2009-07-01 Lg电子株式会社 Terminal provided with networking module and method for receiving and transmitting data using the same
CN101754458A (en) * 2008-12-01 2010-06-23 联想(北京)有限公司 Working mode switching method of communication system and mobile terminal
CN101873679A (en) * 2009-04-23 2010-10-27 瑞昱半导体股份有限公司 Methods and apparatuses of network system with power saving functions
CN101873385A (en) * 2010-06-04 2010-10-27 北京播思软件技术有限公司 Device and method for entering power-saving mode of hand-held terminal rapidly

Also Published As

Publication number Publication date
CN110913377B (en) 2021-04-06
CN110913377A (en) 2020-03-24

Similar Documents

Publication Publication Date Title
US10627893B2 (en) HSIC communication system and method
JP4892734B2 (en) Portable electronic device, program
WO2020211022A1 (en) Terminal device sleep state control method and apparatus, and computer-readable storage medium
EP2912535B1 (en) Apparatus and method for controlling operation mode in a wireless terminal
US20160378512A1 (en) Circuit, method, and device for waking up master mcu
CN107295166B (en) Starting method of dual-system mobile terminal and mobile terminal
US9128891B2 (en) Method, mobile terminal and computer program product for sharing storage device
US10542199B2 (en) Image capture apparatus comprising image transmission function
CN106412845B (en) Dormancy method and device of wireless fidelity Wi-Fi equipment
KR20160132422A (en) System and method for providing dynamic clock and voltage scaling (dcvs) aware interprocessor communication
WO2015062415A1 (en) Method for controlling power supply and wireless terminal
US20230305856A1 (en) System switching method and apparatus, electronic device, and computer-readable storage medium
US9971608B1 (en) Quick boot from halt by hall sensor smart cover
US20230324974A1 (en) Method for system switching, wearable device, and storage medium
US9247372B2 (en) Wireless mobile device network application proxy with exchange sequence generator
JP6785332B2 (en) Bluetooth speaker Data processing method, device and bluetooth speaker
US8453002B2 (en) Apparatus and method for controlling power state transitions based on timer events
CN105282327A (en) Control method, electronic device and external device
WO2020057345A1 (en) Method and system for switching operating state of serial port, bluetooth tracking device, and storage medium
WO2014176893A1 (en) Method and device for powering off mobile terminal
CN115529654A (en) Method, apparatus, storage medium, and relay device for standby communication
GB2514158A (en) Remotely awakening an electronic device
JP2012070403A (en) Portable electronic device, and program
CN116745768B (en) Data processing method and electronic equipment
CN114519929B (en) Startup control method, equipment control system, terminal equipment and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19862660

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19862660

Country of ref document: EP

Kind code of ref document: A1