CN113596867A - 4g module control method and device based on FreeRTOS system - Google Patents

4g module control method and device based on FreeRTOS system Download PDF

Info

Publication number
CN113596867A
CN113596867A CN202110673502.0A CN202110673502A CN113596867A CN 113596867 A CN113596867 A CN 113596867A CN 202110673502 A CN202110673502 A CN 202110673502A CN 113596867 A CN113596867 A CN 113596867A
Authority
CN
China
Prior art keywords
instruction
sending
module
configuration information
waiting
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110673502.0A
Other languages
Chinese (zh)
Inventor
刘福利
栾绍鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qingdao Wintec System Co ltd
Original Assignee
Qingdao Wintec System Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Qingdao Wintec System Co ltd filed Critical Qingdao Wintec System Co ltd
Priority to CN202110673502.0A priority Critical patent/CN113596867A/en
Publication of CN113596867A publication Critical patent/CN113596867A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/02Arrangements for optimising operational condition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/52Program synchronisation; Mutual exclusion, e.g. by means of semaphores
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/5021Priority
    • 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

Abstract

The invention discloses a 4g module control method and a device based on a FreeRTOS system, wherein the method comprises the following steps: after the 4g module is controlled to be powered on, selecting which group of instruction sending processes to execute according to the transmitted 4g function demand signals; transmitting configuration information of an instruction to be executed according to the selected instruction transmitting flow into a transmitting and receiving processor through a scheduler; executing the instruction by the sending and receiving processor, if the instruction is successfully executed, sending a switching instruction signal to the scheduler, switching the configuration information of the next instruction to be executed by the scheduler according to an instruction sending flow and transmitting the configuration information to the sending and receiving processor, and if the instruction execution is abnormal, restarting the 4g module; and after the last instruction is executed, controlling the 4g module to power off, handing out the thread, and re-entering a signal waiting state. The method can make the control of the 4g module more flexible and stable.

Description

4g module control method and device based on FreeRTOS system
Technical Field
The invention relates to the technical field of communication, in particular to a 4g module control method and device based on a FreeRTOS system.
Background
The control of the current 4g module has the following characteristics:
1. because the 4g module needs a certain time to inquire the connection network, the speed of receiving feedback data by some instructions (such as inquiring the network state, connecting a tcp end and the like) sent by the MCU to the 4g module is slow.
2. If a task (acquiring time, reporting information to a server, etc.) needs to be completed, the MCU needs to send instructions in sequence, and the sending combinations of different task instructions are different.
3. The timeout waiting time required by each instruction is different, and when a timeout error occurs, the operation to be executed next step needs to be flexibly determined according to the situation.
4. The power consumption is high. It can reach 40ma power consumption when standby and can reach 150ma power consumption when searching for signals and after establishing connection.
Disclosure of Invention
The invention provides a method and a device for controlling a 4g module based on a FreeRTOS system, aiming at the technical problems of slow feedback and high power consumption of the control of the 4g module.
In a first aspect, an embodiment of the present application provides a 4g module control method based on a FreeRTOS system, including:
a signal receiving step: after the 4g module is controlled to be powered on, selecting which group of instruction sending processes to execute according to the transmitted 4g function demand signals;
a configuration information sending step: transmitting configuration information of an instruction to be executed according to the selected instruction transmitting flow into a transmitting and receiving processor through a scheduler;
an instruction switching step: executing the instruction through the sending and receiving processor, if the instruction is executed successfully, sending a switching instruction signal to the scheduler, switching the configuration information of the next instruction to be executed according to the instruction sending flow by the scheduler and transmitting the configuration information to the sending and receiving processor, and if the instruction execution is abnormal, restarting the 4g module;
and 4g, powering off the module: and after the last instruction is executed, controlling the 4g module to be powered off, handing out the thread, and re-entering a signal waiting state.
The 4g module control method further includes:
information presetting step: and presetting specific instruction sending flows and configuration information of the instructions, which correspond to the 4g function demand signals respectively, wherein the configuration information comprises a sending processing function, a receiving processing function, a maximum retry time and a waiting timeout time.
The 4g module control method, wherein the instruction switching step includes:
the sending processing function executing step: executing the sending processing function corresponding to the instruction, and sending the instruction;
a waiting step: waiting for data to return and handing out threads;
the receiving processing function executing step: and if the returned data is received, executing the receiving processing function corresponding to the instruction.
The 4g module control method, wherein the waiting step includes: and if the waiting time exceeds the waiting overtime corresponding to the instruction and the retry number exceeds the maximum retry number corresponding to the instruction, restarting the 4g module.
The 4g module control method, wherein the waiting step includes: and opening a receiver and a timer and executing a FreeRTOS signal queue waiting function to wait for data to return, and restarting the 4g module if the timer reaches a target value and the retry number exceeds the maximum retry number corresponding to the instruction.
The 4g module control method, wherein the receiving processing function executing step includes:
when the returned data is incomplete, continuing to wait;
when the returned data is not ideal data or needs to be acquired again due to signal problems, the sending processing function is executed again, and the 4g module is restarted after the retry number reaches the maximum retry number;
and when the returned data is ideal data, sending the switching instruction signal to a scheduler.
The 4g module control method, wherein when the returned data is incomplete, the FreeRTOS signal queue waiting function is continuously executed.
In a second aspect, an embodiment of the present application provides a 4g module control device based on a FreeRTOS system, including:
a signal receiving unit: after the 4g module is controlled to be powered on, selecting which group of instruction sending processes to execute according to the transmitted 4g function demand signals;
a configuration information transmitting unit: transmitting configuration information of an instruction to be executed according to the selected instruction transmitting flow into a transmitting and receiving processor through a scheduler;
an instruction switching unit: executing the instruction through the sending and receiving processor, if the instruction is executed successfully, sending a switching instruction signal to the scheduler, switching the configuration information of the next instruction to be executed according to the instruction sending flow by the scheduler and transmitting the configuration information to the sending and receiving processor, and if the instruction execution is abnormal, restarting the 4g module;
4g module power down unit: and after the last instruction is executed, controlling the 4g module to be powered off, handing out the thread, and re-entering a signal waiting state.
The 4g module control device further comprises:
an information presetting unit: and presetting specific instruction sending flows and configuration information of the instructions, which correspond to the 4g function demand signals respectively, wherein the configuration information comprises a sending processing function, a receiving processing function, a maximum retry time and a waiting timeout time.
The 4g module control device, wherein the command switching unit includes:
the sending processing function execution module: executing the sending processing function corresponding to the instruction, and sending the instruction;
a waiting module: waiting for data to return and handing out threads;
the receiving processing function execution module: and if the returned data is received, executing the receiving processing function corresponding to the instruction.
Compared with the prior art, the invention has the advantages and positive effects that:
1. the invention is based on a task blocking mechanism and a thread priority switching mechanism of the FreeRTOS, can realize that the 4G task acquires the main thread at any time and hands over the thread to execute other tasks in waiting, and can realize the control of the 4G module only by needing very small system resources.
2. The order of the instructions to be executed for realizing a certain function (such as acquiring time, transmitting data through TCP, etc.) and the transmitting and receiving processing functions and parameters of each instruction can be flexibly edited.
3. When the command has an abnormal condition, the invention can flexibly adopt measures of waiting, retrying, module restarting and the like to solve the abnormal condition.
4. The 4g power-on and power-on are carried out only when the system needs, the power supply is cut off after the task is completed, so that the module enters a completely power-free state, and the endurance time of the module can be greatly prolonged when the module is used on equipment powered by a battery.
The technical effects can make the control of the 4g module more flexible and stable for the development personnel in practical application.
Drawings
FIG. 1 is a schematic diagram illustrating steps of a 4g module control method based on a FreeRTOS system according to the present invention;
FIG. 2 is a flowchart based on step S4 in FIG. 1 according to the present invention;
FIG. 3 is a schematic flow chart illustrating an embodiment of a 4g module control method based on a FreeRTOS system according to the present invention;
FIG. 4 is a flow chart of instructions executed by a transceiver processor according to the present invention;
FIG. 5 is a block diagram of a 4g module control device based on a FreeRTOS system according to the present invention.
Wherein the reference numerals are:
1. an information presetting unit; 2. a signal receiving unit; 3. a configuration information transmitting unit; 4. an instruction switching unit; 41. a sending processing function execution module; 42. a waiting module; 43. a receiving processing function execution module; 5. 4g module power down unit.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be described and illustrated below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments provided in the present application without any inventive step are within the scope of protection of the present application.
It is obvious that the drawings in the following description are only examples or embodiments of the present application, and that it is also possible for a person skilled in the art to apply the present application to other similar contexts on the basis of these drawings without inventive effort. Moreover, it should be appreciated that in the development of any such actual implementation, as in any engineering or design project, numerous implementation-specific decisions must be made to achieve the developers' specific goals, such as compliance with system-related and business-related constraints, which may vary from one implementation to another.
Reference in the specification to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the specification. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of ordinary skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments without conflict.
Unless defined otherwise, technical or scientific terms referred to herein shall have the ordinary meaning as understood by those of ordinary skill in the art to which this application belongs. Reference to "a," "an," "the," and similar words throughout this application are not to be construed as limiting in number, and may refer to the singular or the plural. The present application is directed to the use of the terms "including," "comprising," "having," and any variations thereof, which are intended to cover non-exclusive inclusions; for example, a process, method, system, article, or apparatus that comprises a list of steps or modules (elements) is not limited to the listed steps or elements, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus. Reference to "connected," "coupled," and the like in this application is not intended to be limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The term "plurality" as referred to herein means two or more. "and/or" describes an association relationship of associated objects, meaning that three relationships may exist, for example, "A and/or B" may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. Reference herein to the terms "first," "second," "third," and the like, are merely to distinguish similar objects and do not denote a particular ordering for the objects.
The present invention is described in detail with reference to the embodiments shown in the drawings, but it should be understood that these embodiments are not intended to limit the present invention, and those skilled in the art should understand that functional, methodological, or structural equivalents or substitutions made by these embodiments are within the scope of the present invention.
Before describing in detail the various embodiments of the present invention, the core inventive concepts of the present invention are summarized and described in detail by the following several embodiments.
The invention proposes to use the sending and receiving processor to realize the calling of the sending processing function and the receiving processing function by presetting the instruction flow and the configuration information, and flexibly adopt measures such as waiting, retrying, module restarting and the like when the instruction has an abnormal condition, thereby realizing the flexible and stable control of the 4g module.
The first embodiment is as follows:
fig. 1 is a schematic step diagram of a 4g module control method based on a FreeRTOS system according to the present invention. As shown in fig. 1, the embodiment discloses a specific implementation of a 4g module control method (hereinafter referred to as "method") based on a FreeRTOS system.
Specifically, the method disclosed in this embodiment mainly includes the following steps:
step S1: specific instruction sending processes and configuration information of the instructions, which correspond to the 4g function demand signals respectively, are preset, wherein the configuration information comprises sending processing functions, receiving processing functions, maximum retry times and waiting timeout time.
Specifically, before running, the specific instruction sending flow of some functions (such as obtaining time, sending data through TCP, etc.) and the configuration information of the instructions, which includes sending processing function, receiving processing function, maximum retry number, waiting timeout time, must be preset. The order of the instructions to be executed for realizing a certain function and the sending and receiving processing functions and parameters of each instruction can be flexibly edited.
Step S2: after the 4g module is controlled to be powered on, selecting which group of instruction sending processes to execute according to the transmitted 4g function demand signals;
specifically, since the 4g module is located as a peripheral module and has high power consumption, the module is powered off in an idle state, and the driver always belongs to a suspend wait signal state. When the driver receives a 4g function demand signal sent by the system, the whole process starts to operate. The driver will control the 4g module to power up and determine which set of instruction transmission flow to execute based on the received 4g function demand signal.
Step S3: transmitting configuration information of an instruction to be executed according to the selected instruction transmitting flow into a transmitting and receiving processor through a scheduler;
step S4: executing the instruction through the sending and receiving processor, if the instruction is executed successfully, sending a switching instruction signal to the scheduler, switching the configuration information of the next instruction to be executed according to the instruction sending flow by the scheduler and transmitting the configuration information to the sending and receiving processor, and if the instruction execution is abnormal, restarting the 4g module;
specifically, as shown in fig. 2, step S4 includes:
step S41: executing the sending processing function corresponding to the instruction, and sending the instruction;
step S42: waiting for data to return and handing out threads;
specifically, the 4g module is restarted by opening a receiver and a timer, executing a FreeRTOS signal queue waiting function to wait for data to return, and if the waiting time exceeds the waiting timeout time corresponding to the instruction and the retry number exceeds the maximum retry number corresponding to the instruction.
Step S43: and if the returned data is received, executing the receiving processing function corresponding to the instruction.
Specifically, when the returned data is incomplete, the FreeRTOS signal queue waiting function is continuously executed, and waiting is continuously performed;
when the returned data is not ideal data or needs to be acquired again due to signal problems, the sending processing function is executed again, and the 4g module is restarted after the retry number reaches the maximum retry number;
and when the returned data is ideal data, sending the switching instruction signal to a scheduler.
Therefore, when the instruction has an abnormal condition, measures such as waiting, retrying, module restarting and the like can be flexibly adopted to process the abnormal condition.
Step S5: and after the last instruction is executed, controlling the 4g module to be powered off, handing out the thread, and re-entering a signal waiting state.
Specifically, the 4g module is powered on and started up only when the system is needed, and power supply is cut off after a task is completed, so that the 4g module enters a completely power-free state. This would greatly extend its endurance for battery powered devices.
Referring to fig. 3 to 4, the following describes the application process of the method specifically as follows:
the main flow of the present technology is shown in fig. 3, and first, the flow is a task for controlling a 4g module in the whole FreeRTOS system, so that after the MCU is initialized, the task needs to be created and enters an infinite loop. The beginning of the loop is blocked by a FreeRTOS queue of signals, and can only continue to execute down after receiving a signal addressed to this queue.
Before running, the specific instruction sending flow of some functions and the configuration of the instructions must be preset, and the configuration includes sending processing function, receiving processing function, maximum retry number and waiting timeout time.
Because the 4g module is positioned as a peripheral module and has larger power consumption, the module is in a power-off shutdown state under the condition of idle, and the drive always belongs to a suspension waiting signal state. When the driver receives a 4g function demand signal sent by the system, the whole process starts to operate.
The driver first powers up the 4g module and determines which set of command transmission flow to execute based on the received signal. Then the program enters a loop, the scheduler switches the configuration information of the instruction to be executed according to the flow, and the information is transmitted to the sending and receiving processor, and the processor mainly works to execute a sending processing function, wait for data to return, execute a receiving processing function, process a waiting timeout and the like. The number of the processor outlets is two, one is that the instruction is sent and returned smoothly, the next instruction is directly executed, and the second is that an abnormal condition occurs, and the restarting module restarts the flow.
The process flow of the transceiver processor is shown in fig. 4, and is used for executing the carrier and handling the abnormal situation as the transmitting and receiving functions of a single instruction.
When the task scheduler of the main flow switches the parameters of the instruction and runs to the sender-receiver, the flow starts to run.
1) And executing a sending processing function corresponding to the instruction, sending the instruction, opening timers of the receiver and the RTOS to wait for returning data, placing a FreeRTOS signal queue waiting function, and blocking the task (handing out the thread).
2) Waiting for data to return has two consequences, waiting for a timeout and receiving a data return.
When waiting for time out (the timer reaches the target value first), it will be judged first whether the instruction retry number exceeds the maximum retry number set in the parameter, if it exceeds, it will run directly to the main flow to restart the module operation, if it does not exceed, the sending processing function will be executed again.
When a data return is received (data is received first), the data is passed to a return processing function, and there are three cases:
firstly, when the returned data is not complete, the FreeRTOS signal queue waiting function is continuously executed, namely the FreeRTOS signal queue waiting function is continuously executed;
when the returned data is not ideal data or the signal is not good and needs to be re-acquired, the instruction is retried, and the module is restarted if the retry frequency reaches the maximum limit;
and thirdly, when the returned data is ideal data, the operation scheduler is informed to switch the instruction and the parameters thereof, and the next operation is carried out.
Through the above two steps, the whole processing flow of one instruction is finished.
And finally, when the operation is operated to the last step and the function is fully completed, controlling the 4g module to be powered off, handing out the thread and reentering a signal waiting state.
The framework is based on a task blocking mechanism and a thread priority switching mechanism of the FreeRTOS, and can realize that a 4G task acquires a main thread at any time and hands over the main thread to execute other tasks when waiting. The control of the 4g module can be realized only by small system resources.
Example two:
in combination with the method for controlling a 4g module based on a FreeRTOS system disclosed in the first embodiment, this embodiment discloses a specific implementation example of a 4g module control device (hereinafter referred to as "device") based on a FreeRTOS system.
Referring to fig. 5, the apparatus includes:
information presetting unit 1: and presetting specific instruction sending flows and configuration information of the instructions, which correspond to the 4g function demand signals respectively, wherein the configuration information comprises a sending processing function, a receiving processing function, a maximum retry time and a waiting timeout time.
Signal receiving section 2: after the 4g module is controlled to be powered on, selecting which group of instruction sending processes to execute according to the transmitted 4g function demand signals;
configuration information transmitting unit 3: transmitting configuration information of an instruction to be executed according to the selected instruction transmitting flow into a transmitting and receiving processor through a scheduler;
the instruction switching unit 4: executing the instruction through the sending and receiving processor, if the instruction is executed successfully, sending a switching instruction signal to the scheduler, switching the configuration information of the next instruction to be executed according to the instruction sending flow by the scheduler and transmitting the configuration information to the sending and receiving processor, and if the instruction execution is abnormal, restarting the 4g module;
4g module power-down unit 5: and after the last instruction is executed, controlling the 4g module to be powered off, handing out the thread, and re-entering a signal waiting state.
Specifically, the instruction switching unit 4 includes:
the transmission processing function execution module 41: executing the sending processing function corresponding to the instruction, and sending the instruction;
the wait module 42: waiting for data to return and handing out threads;
the reception processing function execution module 43: and if the returned data is received, executing the receiving processing function corresponding to the instruction.
Please refer to the description of the first embodiment, and details thereof are not repeated herein.
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A4 g module control method based on a FreeRTOS system is characterized by comprising the following steps:
a signal receiving step: after the 4g module is controlled to be powered on, selecting which group of instruction sending processes to execute according to the transmitted 4g function demand signals;
a configuration information sending step: transmitting configuration information of an instruction to be executed according to the selected instruction transmitting flow into a transmitting and receiving processor through a scheduler;
an instruction switching step: executing the instruction through the sending and receiving processor, if the instruction is executed successfully, sending a switching instruction signal to the scheduler, switching the configuration information of the next instruction to be executed according to the instruction sending flow by the scheduler and transmitting the configuration information to the sending and receiving processor, and if the instruction execution is abnormal, restarting the 4g module;
and 4g, powering off the module: and after the last instruction is executed, controlling the 4g module to be powered off, handing out the thread, and re-entering a signal waiting state.
2. The 4g module control method according to claim 1, further comprising:
information presetting step: and presetting specific instruction sending flows and configuration information of the instructions, which correspond to the 4g function demand signals respectively, wherein the configuration information comprises a sending processing function, a receiving processing function, a maximum retry time and a waiting timeout time.
3. The 4g module control method according to claim 2, wherein the instruction switching step comprises:
the sending processing function executing step: executing the sending processing function corresponding to the instruction, and sending the instruction;
a waiting step: waiting for data to return and handing out threads;
the receiving processing function executing step: and if the returned data is received, executing the receiving processing function corresponding to the instruction.
4. A 4g module control method according to claim 3, wherein said waiting step comprises: and if the waiting time exceeds the waiting overtime corresponding to the instruction and the retry number exceeds the maximum retry number corresponding to the instruction, restarting the 4g module.
5. The 4g module control method according to claim 4, wherein the waiting step comprises: and opening a receiver and a timer and executing a FreeRTOS signal queue waiting function to wait for data to return, and restarting the 4g module if the timer reaches a target value and the retry number exceeds the maximum retry number corresponding to the instruction.
6. A 4g module control method according to claim 3, wherein said receiving processing function executing step comprises:
when the returned data is incomplete, continuing to wait;
when the returned data is not ideal data or needs to be acquired again due to signal problems, the sending processing function is executed again, and the 4g module is restarted after the retry number reaches the maximum retry number;
and when the returned data is ideal data, sending the switching instruction signal to a scheduler.
7. The method of claim 6, wherein the FreeRTOS signal queue wait function continues to be executed when the returned data is incomplete.
8. A 4g module control device based on a FreeRTOS system, comprising:
a signal receiving unit: after the 4g module is controlled to be powered on, selecting which group of instruction sending processes to execute according to the transmitted 4g function demand signals;
a configuration information transmitting unit: transmitting configuration information of an instruction to be executed according to the selected instruction transmitting flow into a transmitting and receiving processor through a scheduler;
an instruction switching unit: executing the instruction through the sending and receiving processor, if the instruction is executed successfully, sending a switching instruction signal to the scheduler, switching the configuration information of the next instruction to be executed according to the instruction sending flow by the scheduler and transmitting the configuration information to the sending and receiving processor, and if the instruction execution is abnormal, restarting the 4g module;
4g module power down unit: and after the last instruction is executed, controlling the 4g module to be powered off, handing out the thread, and re-entering a signal waiting state.
9. The 4g modular control device of claim 8, further comprising:
an information presetting unit: and presetting specific instruction sending flows and configuration information of the instructions, which correspond to the 4g function demand signals respectively, wherein the configuration information comprises a sending processing function, a receiving processing function, a maximum retry time and a waiting timeout time.
10. The 4g module control device according to claim 9, wherein the command switching unit comprises:
the sending processing function execution module: executing the sending processing function corresponding to the instruction, and sending the instruction;
a waiting module: waiting for data to return and handing out threads;
the receiving processing function execution module: and if the returned data is received, executing the receiving processing function corresponding to the instruction.
CN202110673502.0A 2021-06-17 2021-06-17 4g module control method and device based on FreeRTOS system Pending CN113596867A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110673502.0A CN113596867A (en) 2021-06-17 2021-06-17 4g module control method and device based on FreeRTOS system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110673502.0A CN113596867A (en) 2021-06-17 2021-06-17 4g module control method and device based on FreeRTOS system

Publications (1)

Publication Number Publication Date
CN113596867A true CN113596867A (en) 2021-11-02

Family

ID=78243908

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110673502.0A Pending CN113596867A (en) 2021-06-17 2021-06-17 4g module control method and device based on FreeRTOS system

Country Status (1)

Country Link
CN (1) CN113596867A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101924667A (en) * 2010-08-17 2010-12-22 福建师范大学 Modem anomaly detecting and power-off restarting control method based on serial port
CN108279927A (en) * 2017-12-26 2018-07-13 芯原微电子(上海)有限公司 The multichannel command control method and system, controller of adjustable instruction priority
CN110213177A (en) * 2019-06-06 2019-09-06 上海华测导航技术股份有限公司 Timesharing sending method based on 4g module
CN111258247A (en) * 2019-12-31 2020-06-09 苏州阿德文斯电子科技有限公司 Embedded management and control platform of intelligent turn-off control switch of 5G communication base station
CN112148326A (en) * 2020-08-31 2020-12-29 山东省科学院自动化研究所 Remote updating method, device and system for Internet of things equipment firmware
CN112947194A (en) * 2021-02-20 2021-06-11 大连理工大学 Real-time operation control system of tennis robot embedded based on FreeRTOS

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101924667A (en) * 2010-08-17 2010-12-22 福建师范大学 Modem anomaly detecting and power-off restarting control method based on serial port
CN108279927A (en) * 2017-12-26 2018-07-13 芯原微电子(上海)有限公司 The multichannel command control method and system, controller of adjustable instruction priority
CN110213177A (en) * 2019-06-06 2019-09-06 上海华测导航技术股份有限公司 Timesharing sending method based on 4g module
CN111258247A (en) * 2019-12-31 2020-06-09 苏州阿德文斯电子科技有限公司 Embedded management and control platform of intelligent turn-off control switch of 5G communication base station
CN112148326A (en) * 2020-08-31 2020-12-29 山东省科学院自动化研究所 Remote updating method, device and system for Internet of things equipment firmware
CN112947194A (en) * 2021-02-20 2021-06-11 大连理工大学 Real-time operation control system of tennis robot embedded based on FreeRTOS

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
朱迪: "FreeRTOS实时操作系统任务调度优化的研究与实现", 《中国优秀硕士学位论文库》, pages 3 - 4 *

Similar Documents

Publication Publication Date Title
US7467312B2 (en) Arrangement and method for controlling communication of data between processors
CN100541393C (en) The apparatus and method of power supply in the managing computer system
EP1877918B1 (en) System and method for scheduling device management
CN106792185B (en) Starting method, starting device and Android intelligent device
US9007187B2 (en) Communication system and communication device
JP2008129846A (en) Data processor, data processing method, and program
JP3338818B2 (en) Power management system for wireless LAN terminals
US8150459B2 (en) Information apparatus and controlling method thereof
US20180020061A1 (en) Method for maintaining transmission control protocol connection and computer system using the method
CN113179227A (en) AT instruction control method based on queue
CN108081265B (en) Robot, robot control system, control method, control device, and medium
CN113596867A (en) 4g module control method and device based on FreeRTOS system
CN113986000A (en) Server power-on method, system, device and medium
CN104883613A (en) Method for awakening television through network terminal equipment
JP7030979B2 (en) How to handle partial bandwidth inactive timers, devices, terminals and devices
CN103345170A (en) Imaging device and power supply control method thereof, power supply awaking device and control system
CN113905075A (en) Control system and method for clouding robot in 5G environment
CN112929441A (en) Control method and system of Internet of things equipment
CN219382790U (en) Control system, propulsion device and water area movable equipment of water area movable equipment
CN111163505A (en) Power consumption control method, system, device and medium for WiFi device
US20180103170A1 (en) Device and information processing method
CN101495940A (en) Demodulator device and method of operating the same
JPH11212662A (en) Clock control method and its controller
CN111917620B (en) MCU service processing method, device, electronic equipment and storage medium
CN116847440A (en) Equipment dormancy control method, terminal equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination