CN113596867B - Control method and device for 4g module based on FreeRTOS system - Google Patents

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

Info

Publication number
CN113596867B
CN113596867B CN202110673502.0A CN202110673502A CN113596867B CN 113596867 B CN113596867 B CN 113596867B CN 202110673502 A CN202110673502 A CN 202110673502A CN 113596867 B CN113596867 B CN 113596867B
Authority
CN
China
Prior art keywords
instruction
module
transmitting
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.)
Active
Application number
CN202110673502.0A
Other languages
Chinese (zh)
Other versions
CN113596867A (en
Inventor
刘福利
栾绍鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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/CN113596867B/en
Publication of CN113596867A publication Critical patent/CN113596867A/en
Application granted granted Critical
Publication of CN113596867B publication Critical patent/CN113596867B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Power Sources (AREA)

Abstract

The invention discloses a control method and a device for a 4g module based on FreeRTOS system, wherein the method comprises the following steps: after the 4g module is controlled to be electrified, selecting which group of instruction sending flows are executed according to the 4g function demand signals; transmitting configuration information of an instruction to be executed according to the selected instruction transmission flow to a transmission and reception processor through a scheduler; executing the instruction by the transmitting and receiving processor, if the instruction is successfully executed, transmitting a switching instruction signal to the scheduler, switching the configuration information of the next instruction to be executed by the scheduler according to the instruction transmitting flow, transmitting the configuration information to the transmitting and receiving processor, and restarting the 4g module if the instruction is abnormally executed; after the last instruction is executed, the 4g module is controlled to be powered down, the threads are crossed out, and the waiting signal state is re-entered. By the method, the control of the 4g module can be more flexible and stable.

Description

Control method and device for 4g module 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 FreeRTOS systems.
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 a certain instruction (such as inquiring the network state, connecting a tcp end and the like) sent by the MCU to the 4g module is slower.
2. To complete a task (obtain time, report information to the server, etc.), the MCU needs to send instructions in sequence, and the different task instructions are sent in different combinations.
3. The time-out waiting time required for each instruction is different, and when a time-out error occurs, the next operation to be executed needs to be flexibly determined according to the situation.
4. The power consumption is high. The power consumption can reach 40ma when in standby, and can reach 150ma when searching signals and after connection is established.
Disclosure of Invention
Aiming at the technical problems of slower feedback and higher power consumption in the control of the 4g module, the invention provides a method and a device for controlling the 4g module based on FreeRTOS systems.
In a first aspect, an embodiment of the present application provides a 4g module control method based on FreeRTOS systems, including:
a signal receiving step: after the 4g module is controlled to be electrified, selecting which group of instruction sending flows are executed according to the 4g function demand signals;
configuration information sending step: transmitting configuration information of an instruction to be executed according to the selected instruction transmission flow to a transmission and reception processor through a scheduler;
An instruction switching step: executing the instruction through the transmitting and receiving processor, if the instruction is successfully executed, transmitting a switching instruction signal to the scheduler, switching the configuration information of the next instruction to be executed according to the instruction transmitting flow by the scheduler, transmitting the configuration information to the transmitting and receiving processor, and restarting the 4g module if the instruction is abnormally executed;
4g module powering down: and after the last instruction is executed, controlling the 4g module to be powered down, and intersecting the thread to enter a waiting signal state again.
The 4g module control method further comprises the following steps:
Information presetting: 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 number and a waiting timeout time.
The 4g module control method, wherein the instruction switching step includes:
The transmission processing function performs the steps of: executing the sending processing function corresponding to the instruction, and sending the instruction;
waiting: waiting for data to return and handing out the thread;
the reception processing function performs the steps of: 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 restarting the 4g module 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.
The 4g module control method, wherein the waiting step includes: and opening a receiver and a timer, executing FreeRTOS signal queue waiting functions 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 waiting;
when the returned data is not ideal data or needs to be acquired again due to signal problems, the transmission 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 FreeRTOS systems, including:
A signal receiving unit: after the 4g module is controlled to be electrified, selecting which group of instruction sending flows are executed according to the 4g function demand signals;
configuration information transmitting unit: transmitting configuration information of an instruction to be executed according to the selected instruction transmission flow to a transmission and reception processor through a scheduler;
an instruction switching unit: executing the instruction through the transmitting and receiving processor, if the instruction is successfully executed, transmitting a switching instruction signal to the scheduler, switching the configuration information of the next instruction to be executed according to the instruction transmitting flow by the scheduler, transmitting the configuration information to the transmitting and receiving processor, and restarting the 4g module if the instruction is abnormally executed;
4g module power-down unit: and after the last instruction is executed, controlling the 4g module to be powered down, and intersecting the thread to enter a waiting signal state again.
The 4g module control device, wherein the 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 number and a waiting timeout time.
The 4g module control device, wherein the instruction switching unit includes:
the transmission processing function execution module: executing the sending processing function corresponding to the instruction, and sending the instruction;
And (3) a waiting module: waiting for data to return and handing out the thread;
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 FreeRTOS task blocking mechanism and thread priority switching mechanism, can realize that 4G task obtains main thread at any time and gives out thread to execute other task while waiting, and can realize the control of 4G module only needing very small system resource.
2. The method can flexibly edit the instruction sequence to be executed for realizing a certain function (such as acquisition time, data transmission through TCP, and the like), and the transmission and reception processing functions and parameters of each instruction.
3. When the abnormal condition occurs to the instruction, the method can flexibly adopt measures such as waiting, retry, module restarting and the like to solve the abnormal condition.
4. The system can be powered on for 4g only when needed, and the power supply is cut off after the task is completed to enable the module to enter a complete power-free state, so that the endurance time of the module can be greatly prolonged when the module is used on battery-powered equipment.
The technical effect can make the control of the 4g module more flexible and stable for the developer in practical application.
Drawings
FIG. 1 is a schematic diagram of steps of a 4g module control method based on FreeRTOS system provided by the 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 of an embodiment of a 4g module control method based on FreeRTOS systems provided by the present invention;
FIG. 4 is a flow chart of the instructions executed by the transceiver processor according to the present invention;
fig. 5 is a frame diagram of a 4g module control device based on FreeRTOS system provided by the invention.
Wherein, the reference numerals are as follows:
1. An information presetting unit; 2. a signal receiving unit; 3. a configuration information transmitting unit; 4. an instruction switching unit; 41. a transmission processing function execution module; 42. a waiting module; 43. a receiving processing function executing module; 5. 4g module power-down unit.
Detailed Description
The present application will be described and illustrated with reference to the accompanying drawings and examples in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application. All other embodiments, which can be made by a person of ordinary skill in the art based on the embodiments provided by the present application without making any inventive effort, are intended to fall within the scope of the present application.
It is apparent that the drawings in the following description are only some examples or embodiments of the present application, and it is possible for those of ordinary skill in the art to apply the present application to other similar situations according to these drawings without inventive effort. Moreover, it should be appreciated that while such a development effort might be complex and lengthy, it would nevertheless be a routine undertaking of design, fabrication, or manufacture for those of ordinary skill having the benefit of this disclosure, and thus should not be construed as having the benefit of this disclosure.
Reference in the specification to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the application. The appearances of such phrases 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. It is to be expressly and implicitly understood by those of ordinary skill in the art that the described embodiments of the application can be combined with other embodiments without conflict.
Unless defined otherwise, technical or scientific terms used herein should be given the ordinary meaning as understood by one of ordinary skill in the art to which this application belongs. The terms "a," "an," "the," and similar referents in the context of the application are not to be construed as limiting the quantity, but rather as singular or plural. The terms "comprising," "including," "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, article, or apparatus that comprises a list of steps or modules (elements) is not limited to only those steps or elements but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus. The terms "connected," "coupled," and the like in connection with the present application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The term "plurality" as used herein means two or more. "and/or" describes an association relationship of an association object, meaning that there may be three relationships, e.g., "a and/or B" may mean: a exists alone, A and B exist together, and B exists alone. The character "/" generally indicates that the context-dependent object is an "or" relationship. The terms "first," "second," "third," and the like, as used herein, are merely distinguishing between similar objects and not representing a particular ordering of objects.
The present invention will be described in detail below with reference to the embodiments shown in the drawings, but it should be understood that the embodiments are not limited to the present invention, and functional, method, or structural equivalents and alternatives according to the embodiments are within the scope of protection of the present invention by those skilled in the art.
Before explaining the various embodiments of the invention in detail, the core inventive concepts of the invention are summarized and described in detail by the following examples.
The invention provides a method for realizing the call of a sending processing function and a receiving processing function by using a sending and receiving processor through presetting an instruction flow and configuration information, and flexibly taking measures such as waiting, retrying, restarting a module and the like when an abnormal condition occurs to the instruction, thereby realizing flexible and stable control of the 4g module.
Embodiment one:
Fig. 1 is a schematic step diagram of a 4g module control method based on FreeRTOS system provided by the invention. As shown in fig. 1, this embodiment discloses a specific implementation of a 4g module control method (hereinafter referred to as "method") based on FreeRTOS systems.
Specifically, the method disclosed in this embodiment mainly includes the following steps:
Step S1: specific instruction sending flows and configuration information of instructions corresponding to the 4g function demand signals are preset, wherein the configuration information comprises a sending processing function, a receiving processing function, maximum retry times and waiting timeout time.
Specifically, before running, specific instruction sending processes of functions (such as acquisition time, sending data through TCP, etc.) and configuration information of instructions, including a sending processing function, a receiving processing function, a maximum retry number, and waiting for timeout time, must be preset. The instruction sequence 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 electrified, selecting which group of instruction sending flows are executed according to the 4g function demand signals;
Specifically, since the 4g module is located as a peripheral module and consumes a large amount of power, the module is powered down in an idle condition and the driver always belongs to a suspend waiting signal state. When the driver receives a 4g function demand signal from the system, the whole process starts to operate. The driver will control the 4g module to power up and determine which set of instruction issue flows 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 transmission flow to a transmission and reception processor through a scheduler;
Step S4: executing the instruction through the transmitting and receiving processor, if the instruction is successfully executed, transmitting a switching instruction signal to the scheduler, switching the configuration information of the next instruction to be executed according to the instruction transmitting flow by the scheduler, transmitting the configuration information to the transmitting and receiving processor, and restarting the 4g module if the instruction is abnormally executed;
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 the thread;
Specifically, the receiver and the timer are opened, a FreeRTOS signal queue waiting function is executed 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, the 4g module is restarted.
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, continuing to execute the FreeRTOS signal queue waiting function, and continuing to wait;
when the returned data is not ideal data or needs to be acquired again due to signal problems, the transmission 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 abnormal condition occurs to the instruction, measures such as waiting, retry, module restarting and the like can be flexibly adopted to handle the abnormal condition.
Step S5: and after the last instruction is executed, controlling the 4g module to be powered down, and intersecting the thread to enter a waiting signal state again.
Specifically, the 4g module is electrified and started only when the system is needed, and power supply is cut off after the task is completed, so that the 4g module enters a complete power-free state. This would greatly extend the duration of a battery-powered device.
Referring to fig. 3 to 4, the following application flow of the method is specifically described:
the main technical line flow is shown in fig. 3, and firstly, the flow is a task for controlling a 4g module in the whole FreeRTOS system, so that after the initialization of the MCU, the task needs to be created and an infinite loop is entered. The beginning of the loop is blocked by a FreeRTOS signal queue and execution can continue downward only after receiving a signal to this queue.
Before running, specific instruction sending flow of some functions and configuration of instructions, including sending processing functions, receiving processing functions, maximum retry times and waiting time-out time, must be preset.
Because the positioning of the 4g module is a peripheral module and the power consumption is larger, the module is in a power-down power-off state under the idle condition, and the drive always belongs to a suspension waiting signal state. When the driver receives a 4g function demand signal from the system, the whole process starts to operate.
The driver first powers up the control 4g module and determines which set of instruction-sending flows to execute based on the received signals. 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 main work of the processor is to execute the sending processing function, wait for data return, execute the receiving processing function, process waiting time-out and the like. The number of the processor outlets is two, one is that the instruction is smoothly sent and returned, the next instruction is directly executed, the second is that an abnormal condition occurs, and the restarting module restarts the flow.
The processing flow of the transceiver processor is shown in fig. 4, and the processing flow is used as the carrier of the sending and receiving functions of a single instruction and is used for processing abnormal situations.
When the task scheduler of the main flow switches the parameters of the instruction and runs to the transceiver, the flow starts to run.
1) Executing the sending processing function corresponding to the instruction, sending the instruction, then starting the timer of the receiver and the RTOS to wait for the return data, and placing a FreeRTOS signal queue waiting function to block the task (cross threads).
2) Waiting for data to return has two consequences, wait for timeout and receive data to return, respectively.
When waiting for timeout (the timer reaches the target value first), whether the instruction retry number exceeds the maximum retry number set in the parameter is judged first, if yes, the module operation is restarted after the instruction retry number is directly operated in the main flow, and if not, the transmission processing function is executed again.
When data is received back (data is received first), the data is passed to the return processing function, and there are three cases:
① When the returned data is not complete, then the signal queue wait function will continue to execute FreeRTOS, i.e., continue to wait;
② 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 if the number of retries reaches the maximum limit, the module is restarted;
③ When the returned data is ideal data, the operation dispatcher is informed of the switching instruction and parameters thereof, and the next operation is carried out.
Through the two steps, the whole processing flow of one instruction is finished.
Finally, when the operation runs to the last step, the function is completed satisfactorily, and the 4g module needs to be controlled to be powered down, and the threads are handed out to enter a waiting signal state again.
The framework is based on a FreeRTOS task blocking mechanism and a thread priority switching mechanism, and can realize that a 4G task can acquire a main thread at any time and can give out threads to execute other tasks when waiting. Control of the 4g module can be achieved with only a small system resource.
Embodiment two:
in combination with the method for controlling a 4g module based on 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 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 number and a waiting timeout time.
The signal receiving unit 2: after the 4g module is controlled to be electrified, selecting which group of instruction sending flows are executed according to the 4g function demand signals;
configuration information transmitting unit 3: transmitting configuration information of an instruction to be executed according to the selected instruction transmission flow to a transmission and reception processor through a scheduler;
Instruction switching unit 4: executing the instruction through the transmitting and receiving processor, if the instruction is successfully executed, transmitting a switching instruction signal to the scheduler, switching the configuration information of the next instruction to be executed according to the instruction transmitting flow by the scheduler, transmitting the configuration information to the transmitting and receiving processor, and restarting the 4g module if the instruction is abnormally executed;
4g module power-down unit 5: and after the last instruction is executed, controlling the 4g module to be powered down, and intersecting the thread to enter a waiting signal state again.
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;
a waiting module 42: waiting for data to return and handing out the thread;
The reception processing function execution module 43: and if the returned data is received, executing the receiving processing function corresponding to the instruction.
The technical scheme of the present embodiment, which is the same as the rest of the 4g module control device based on FreeRTOS system and the 4g module control method based on FreeRTOS system disclosed in embodiment one, is described in reference to embodiment one, and is not repeated here.
The technical features of the above-described embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above-described embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples illustrate only a few embodiments of the application, which are described in detail and are not to be construed as limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of protection of the present application is to be determined by the appended claims.

Claims (6)

1. A method for controlling a 4g module based on FreeRTOS systems, comprising:
A signal receiving step: when a 4g function demand signal sent by a system is received, after the 4g module is powered on, selecting which group of instruction sending flows are executed according to the 4g function demand signal;
configuration information sending step: transmitting configuration information of an instruction to be executed according to the selected instruction transmission flow to a transmission and reception processor through a scheduler;
An instruction switching step: executing the instruction through the transmitting and receiving processor, if the instruction is successfully executed, transmitting a switching instruction signal to the scheduler, switching the configuration information of the next instruction to be executed according to the instruction transmitting flow by the scheduler, transmitting the configuration information to the transmitting and receiving processor, and restarting the 4g module if the instruction is abnormally executed;
4g module powering down: after the last instruction is executed, controlling the 4g module to be powered down, and intersecting the threads to enter a waiting signal state again;
the instruction switching step comprises the following steps:
The transmission processing function performs the steps of: executing the sending processing function corresponding to the instruction, and sending the instruction;
Waiting: waiting for data to return and handing off the thread, wherein the waiting step comprises: opening a receiver and a timer and executing FreeRTOS signal queue waiting functions 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 reception processing function performs the steps of: and if the returned data is received, executing the receiving processing function corresponding to the instruction.
2. The 4g module control method of claim 1, further comprising:
Information presetting: 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 number and a waiting timeout time.
3. The 4g module control method according to claim 2, wherein the reception processing function executing step includes:
When the returned data is incomplete, continuing waiting;
when the returned data is not ideal data or needs to be acquired again due to signal problems, the transmission 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.
4. A 4g module control method according to claim 3, wherein the FreeRTOS signal queue wait function is continued when the returned data is incomplete.
5. A FreeRTOS system-based 4g module control device, comprising:
a signal receiving unit: when a 4g function demand signal sent by a system is received, after the 4g module is powered on, selecting which group of instruction sending flows are executed according to the 4g function demand signal;
configuration information transmitting unit: transmitting configuration information of an instruction to be executed according to the selected instruction transmission flow to a transmission and reception processor through a scheduler;
an instruction switching unit: executing the instruction through the transmitting and receiving processor, if the instruction is successfully executed, transmitting a switching instruction signal to the scheduler, switching the configuration information of the next instruction to be executed according to the instruction transmitting flow by the scheduler, transmitting the configuration information to the transmitting and receiving processor, and restarting the 4g module if the instruction is abnormally executed;
4g module power-down unit: after the last instruction is executed, controlling the 4g module to be powered down, and intersecting the threads to enter a waiting signal state again;
wherein the instruction switching unit includes:
the transmission processing function execution module: executing the sending processing function corresponding to the instruction, and sending the instruction;
and (3) a waiting module: waiting for data to return and handing off the thread, including: opening a receiver and a timer and executing FreeRTOS signal queue waiting functions 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 receiving processing function execution module: and if the returned data is received, executing the receiving processing function corresponding to the instruction.
6. The 4g module control device of claim 5, 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 number and a waiting timeout time.
CN202110673502.0A 2021-06-17 2021-06-17 Control method and device for 4g module based on FreeRTOS system Active CN113596867B (en)

Priority Applications (1)

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

Applications Claiming Priority (1)

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

Publications (2)

Publication Number Publication Date
CN113596867A CN113596867A (en) 2021-11-02
CN113596867B true CN113596867B (en) 2024-05-07

Family

ID=78243908

Family Applications (1)

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

Country Status (1)

Country Link
CN (1) CN113596867B (en)

Citations (7)

* 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
US10289785B1 (en) * 2016-09-15 2019-05-14 Xilinx, Inc. Platform architecture creation for a system-on-chip
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

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20180092787A (en) * 2017-02-10 2018-08-20 삼성전자주식회사 Method and apparatus for processing a security key when performing handover using multi-connection in wireless communication
US11190374B2 (en) * 2017-08-28 2021-11-30 Bright Data Ltd. System and method for improving content fetching by selecting tunnel devices

Patent Citations (7)

* 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
US10289785B1 (en) * 2016-09-15 2019-05-14 Xilinx, Inc. Platform architecture creation for a system-on-chip
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 (2)

* Cited by examiner, † Cited by third party
Title
FreeRTOS实时操作系统任务调度优化的研究与实现;朱迪;《中国优秀硕士学位论文库》;第2.3-4.3节 *
Implementing Security and Trust in IoT/M2M using Middleware;Sergio D. Castilho等;2020 International Conference on Information Networking (ICOIN);20200302;全文 *

Also Published As

Publication number Publication date
CN113596867A (en) 2021-11-02

Similar Documents

Publication Publication Date Title
EP1555595A2 (en) Apparatus for controlling power of processor having a plurality of cores and control method of the same
EP1495645B1 (en) Mechanism for a wireless device to relinquish its network master status based on its power reserve
RU2407053C2 (en) System and method of scheduling device control
JP4980735B2 (en) Power supply apparatus and power supply system
JP2002026812A (en) Power source control apparatus, receiving device for remote controller and optical communication apparatus
CN105992317B (en) Wireless communication module management method and wireless communication module managing device
EP2378497B1 (en) Communication system and communication device
CN110329077B (en) Robot and battery power-off control method applied to robot
JP3338818B2 (en) Power management system for wireless LAN terminals
CN113596867B (en) Control method and device for 4g module based on FreeRTOS system
CN113986000A (en) Server power-on method, system, device and medium
CN106843890A (en) Sensor network, node and its operation method based on intelligent decision
CN110868448A (en) Vehicle-mounted data updating system and method
CN108958203A (en) Applied to the control method of central control system, central control system and vehicle
CN114435280A (en) Remote control system
CN113568329A (en) Shutdown control method and system based on MCU and SOC communication
CN219382790U (en) Control system, propulsion device and water area movable equipment of water area movable equipment
CN114501599B (en) Energy-saving broken network setting method based on Internet of things, intelligent equipment and storage medium
CN112363608B (en) Optical port power supply method and system of FPGA card and related components
CN1287624C (en) Method and apparatus for prolonging time interval between discontinuous call-receiving to reduce call-sending power consumption of handset
CN102647344B (en) Message sending method in embedded and distributed system
CN114167823B (en) Robot control method, apparatus, electronic device, and storage medium
CN215769946U (en) AGV calling system
JP2000139027A (en) Device for releasing power saving function
US6715092B1 (en) Power management apparatus

Legal Events

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