Embodiment
For making the object, technical solutions and advantages of the present invention clearly, below in conjunction with accompanying drawing, embodiment of the present invention is described further in detail.
Embodiment 1
As shown in Figure 1, present embodiments provide a kind of method controlling portable router low-power consumption work, method specifically comprises:
101, the AP in portable router judges whether to meet the full terms in default dormancy condition simultaneously;
102, when AP meets the full terms in the dormancy condition preset simultaneously, AP indicate the Modem module that is connected with this AP and WIFI module to enter resting state, and AP makes the USB be connected with Modem module of this AP side enter idle pulley, the UART hang-up of this AP;
103, AP, Modem module and WIFI module enter resting state.
Present embodiments provide a kind of method controlling portable router low-power consumption work, by when the application controller AP of portable router meets dormancy condition, AP indicates the Modem module that is connected with AP and WIFI module to enter resting state, the USB be connected with Modem module of this AP side is made to enter idle pulley, the UART of this AP hangs up, AP enters resting state, complete the control of the low-power consumption work to the portable router with AP and Modem module dual chip, reach the effect of saving battery power, add the service time of the portable router with dual chip.
Embodiment 2
Present embodiments providing a kind of method controlling portable router work, is the improvement carried out on the basis of embodiment 1.
In the present embodiment, be described for the portable router shown in Fig. 2.Wherein, Figure 2 shows that the composition diagram of portable router provided by the invention, this portable router is by AP (Application processor, application controller), Modem (modulator-demodulator) module, SIM (Subscriber Identity Module, user identification module), display screen, battery (Battery), WIFI module etc., in the present embodiment, display screen concrete with OLED (OrganicFlectroluminesence Display, Organic Electricity laser display screen) be example, in actual applications, display screen can also be LCD (Liquid Crystal Display, liquid crystal display), wherein, dotted line represents increasable connection, two-wire represents that the two-way interactive of data can be carried out in two ends that this two-wire connects,
It should be noted that, in the prior art, Modem module and AP adopt same chip, use the form of single CPU double-core, in portable router provided by the invention, Modem module and AP are two chip blocks, separately there is CPU, faster relative to the data processing speed of existing router, chip residing for AP also includes router (route) module, AP and router module integration is on same chip, Modem module and AP are by COM (Component Object Model, serial line interface) and USB (Universal Serial BUS, USB) be connected, COM is used for the Signalling exchange between Modem module and AP, connect the USB of Modem module and AP for the exchanges data between Modem and AP,
SIM is connected with Modem module, for inserting SIM card, to provide 3G network service for portable router;
OLED is connected with Modem module, for showing the information of AP or Modem module output;
PMIC (Power-Management Integrated Circuit, power management integrated circuits) 1 to be connected with AP, for carrying out power management to AP, BATTERY (battery) is by MOC (Metal Oxide Semicon Ductor, metal-oxide semiconductor (MOS)) integrated circuit is connected with PMIC1, for powering to AP, Charge IC (charge integrated circuit) is connected with PMIC1 and MOC integrated circuit, for charging to BATTERY, Charge IC to be connected and by this charging USB interface power taking to carry out charging operations with charging USB interface, wherein, above-mentioned charging USB interface is also by being connected with the USB between AP, AP is by the Vbus of this charging USB interface, D+, D-obtains power supply, switch is connected with PMIC1, for the open and close of the power supply of portable router,
PMIC2 and Moedm is connected, and for carrying out power management to Modem module, wherein, the power supply used when Modem module is run is obtained from AP by the USB between AP and Modem module;
WIFI module is connected with AP, and for providing up wireless network access to user, when sending upstream data as user, AP wakes up by sending wake up order to AP by WIFI module.
Further, AP can also be connected with SD card (Secure Digital Memory Card, safe digital card), after subscriber equipment accesses portable route, can conduct interviews to SD card and operate.
Below, based on above-mentioned portable router, a kind of method controlling portable router work is specifically described:
It should be noted that, because the AP of portable router used in the present embodiment and Modem module are dual chip, therefore independent control can be carried out separately, WIFI module is controlled by AP, therefore, the method that the present embodiment provides comprises and controlling the dormancy of the Modem module of above-mentioned portable router and AP, and to reach the effect that the main composition assembly Modem module, AP or the WIFI module that make portable router save battery power, this control procedure comprises dormancy and wakeup process.
Wherein, only have when after the AP dormancy in portable router, Modem module just can dormancy.
First, as shown in Figure 3, be described the dormancy control method of AP, the method specifically comprises the steps:
A201, AP judge whether the WIFI module be connected with self enters resting state, if not, perform steps A 202, if so, perform steps A 204;
Particularly, store the first flag bit in AP, this first flag bit is for indicating whether WIFI module is in resting state.Such as, when the first mark is 1, WIFI module is in resting state, and when the first mark is 0, then WIFI module is in running order.
When before WIFI module dormancy, send the notification message of WIFI dormancy to AP, the first mark position is 1 by AP.
Correspondingly, by the first flag bit, AP judges whether WIFI module is in resting state.
A202, AP judge that the WIFI module self connected is above default time no user and connects, and if so, perform steps A 203, if not, perform steps A 204;
It should be noted that, WIFI module exceedes default time no user and connects, and is specially this WIFI module within the time of presetting without tasks carrying.
A203, AP indicate the WIFI module be connected with self to enter resting state, and are resting state by the first mark position, and perform steps A 204;
A204, AP judge that whether the external USB of AP side is not in place, if so, perform steps A 205, if not, process other events, and return steps A 201;
It should be noted that, the external USB interface of external USB concrete finger not in place and AP is not connected with equipment, such as, by SD card or memory etc. that external USB interface accesses.
Wherein, in the present embodiment, because external USB equipment and charging USB are same interface, also comprise in this step:
Judge that whether charger is in place, if in place, then keep operating state, if not in place, then perform steps A 205.
A205, AP judge whether OLED is closed condition, if so, perform steps A 206, if not, process other events, and return steps A 201;
A206, AP judge that whether present battery is higher than default electricity, if not, perform steps A 207, if so, process other events, and return steps A 201;
A207, judge that the temperature of battery is whether lower than the temperature protection value preset, and if so, performs steps A 208, if not, process other events, and return steps A 201;
It should be noted that, in the present embodiment steps A 204-A207, other events are the current pending task of AP, such as:
When the external USB of AP is connected with equipment constantly, control the operation of external USB equipment; Or,
When OLED is not closed condition, the operation of control OLED; Or
When battery is lower than default electricity, carry out prompting operation, prompting user battery is lower than default electricity; Or
When the temperature of battery is not less than default temperature protection value, the temperature of prompting user battery is too high.
A208, AP judge whether Modem module is in resting state, if so, perform steps A 211, if not, perform steps A 209;
It should be noted that, AP judges whether Modem module is in resting state and specifically comprises:
The second flag bit that AP stores according to self judges whether Modem module is in resting state, such as, second flag bit can be and arrange a fixing bit for recording the flag bit of the state of the Modem module be connected with AP in AP, and arrange when this second flag bit is 1, Modem module is resting state, when this second flag bit is 0, this Modem module is operating state.
A209, AP indicate Modem module to enter resting state, perform steps A 210;
It should be noted that, AP indicates Modem module to enter resting state, and concrete is the notification message sending AP dormancy to Modem module;
Further, Modem module, after the notification message receiving AP dormancy, when meeting the dormancy condition of self correspondence, enters resting state, and concrete grammar will describe in step M201-M204 below.
A210, the state flag bit of Modem module is set to resting state, performs steps A 211;
The USB be connected with Modem module of self side is set to free time (Idle) pattern by A211, AP, and UART hangs up, and AP enters resting state, and the dormancy completing AP controls.
It should be noted that; in the above-mentioned judgement to dormancy condition; the step judged not order restriction; sleep operation can be carried out when meeting whole dormancy condition; the present embodiment is only to provide one preferably execution mode; therefore, just above-mentioned Rule of judgment is made the change in order or deletion, still within scope.
Secondly, as shown in Figure 4, be described the dormancy control method of Modem module, the method specifically comprises the steps:
M201, Modem module judge the instruction self whether receiving the AP dormancy that AP sends, and if so, perform step M202, if not, Modem module can not carry out dormancy;
It should be noted that, in the present embodiment, when the non-dormancy of AP, Modem module can not carry out dormancy.
Whether pending whole tasks such as M202, Modem module judgement complete, and if so, perform step M204, if not, perform step M203;
M203, Modem module perform current task, and have been set to by the state flag bit of current task after current task execution terminates, and return step M202;
It should be noted that, wait pending task with the mode record of queue, can execute current task, the next task that can be switched in queue performs.
It should be noted that, the 3rd flag bit is preserved in Modem module, 3rd flag bit is the state that mark has self to execute the task, in order to record the state of the task of Modem module, such as, multiple bit can be set in order to represent the state of the task of Modem module, when first bit of the 3rd flag bit is 0, represent that the task that this bit is corresponding does not complete, when this bit is 1, represent that the task that this bit is corresponding completes, when the 3rd flag bit is all 1, then the current task of Modem module all completes.
Wherein, dormancy also can be used as the task of Modem module, but the priority of dormancy is minimum, therefore, in current whole tasks of above-mentioned Modem module, does not comprise dormancy task.
M204, Modem module make self to enter resting state, and the dormancy completing Modem module controls.
It should be noted that; in the above-mentioned judgement to dormancy condition; the step judged not order restriction; sleep operation can be carried out when meeting whole dormancy conditions; the present embodiment is only to provide one preferably execution mode; therefore, just above-mentioned Rule of judgment is made the change in order or deletion, still within scope.
Present embodiments provide a kind of method controlling portable router low-power consumption work, by when the application controller AP of portable router meets dormancy condition, AP indicates the Modem module that is connected with this AP and WIFI module to enter resting state, the USB be connected with Modem module of this AP side is made to enter idle pulley, the UART of this AP hangs up, AP enters resting state, complete the control of the low-power consumption work to the portable router with AP and Modem module dual chip, reach the effect of saving battery power, add the service time of the portable router with dual chip.
Embodiment 3
The method that the present embodiment provides is the further optimization to embodiment 2, when the dormancy completing AP and Modem module controls, after making portable router enter resting state when not working, present embodiments provide a kind of method waking portable router up, comprise and wake AP, Modem module and WIFI module up.
Below a kind of method waking portable router up is described in detail.
First, as shown in Figure 5, the first wakes the method for portable router up, specifically comprises the steps:
A301, AP judge whether to arrive the timing wake-up time of presetting, and if so, perform steps A 309, if not, perform steps A 302;
It should be noted that, AP is preset with the timing wake-up time, and when arriving the timing wake-up time of presetting, AP wakes self up, enters operating state by resting state, such as, can arrange AP and wake self up once every 5 minutes.
A302, AP judge that whether battery is lower than default electricity, if so, perform steps A 309, if not, perform steps A 303;
A303, AP judge that whether activate button is pressed, and if so, performs steps A 309, if not, perform steps A 304;
Wherein, portable router is provided with activation button, and this activation button is connected with AP, for waking portable router up.
A304, AP judge whether the instruction waking AP up receiving Modem module transmission, if so, perform steps A 309, if not, perform steps A 305;
It should be noted that, Modem module sends the instruction waking AP up to AP, and be namely that Modem module instruction AP enters operating state, following wake operation is all like this.
Particularly, Modem module sends the instruction waking AP up to AP, can comprise two kinds of methods:
One is, Modem module sends the notification message waking AP up to AP, another kind is after Modem module is waken up, and sends high/low level indicating AP wake up by GPIO (General Purpose Input Output, universal input/output) to AP.
A305, AP judge that whether the external USB of self is in place, if so, perform steps A 309, if not, perform steps A 306;
It should be noted that, in the present embodiment, namely external USB charges USB interface, and external USB USB interface of namely charging in place has equipment access.
A306, AP judge whether the instruction waking AP up receiving WIFI module transmission, if so, perform steps A 309, if not, perform steps A 307;
The instruction waking AP up that WIFI module sends, concrete is that, when WIFI module has user to connect, WIFI module sends the instruction waking AP up to AP.
A307, judge that the temperature of battery is whether higher than the temperature protection value preset, and if so, performs steps A 309, if not, perform steps A 308;
A308, judge that whether charger is in place, if so, perform steps A 309, if not, then AP keeps resting state.
Wherein, charger i.e. AP in place powers by external power supply.
A309, AP start the operation exiting dormancy, perform steps A 310;
A310, AP judge whether to be waken up by Modem module, if so, perform steps A 312, if not, perform steps A 311;
A311, AP send the instruction waking Modem module up to Modem module, perform steps A 312;
Further, Modem module receive Modem module send wake the instruction of Modem module up after, Modem module enters operating state.
The second mark position that self preserves by A312, AP is operating state, performs steps A 313;
A313, AP make the USB be connected with Modem module of self side exit Idle pattern, and URAT exits suspended state, perform steps A 314;
A314, AP send the instruction waking WIFI module up to WIFI module, the setting OLED timing shut-in time, AP and WIFI module enter operating state.
It should be noted that; above-mentioned in the judgement of wake-up condition; the step judged not order restriction; wake operation can be carried out when meeting the arbitrary condition in wake-up condition; the present embodiment is only to provide one preferably execution mode; therefore, just above-mentioned Rule of judgment is made the change in order or deletion, still within scope.
Secondly, as shown in Figure 6, the second wakes the method for portable router up, specifically comprises the steps:
M301, Modem module judge whether to receive the downlink data from its own antenna, if so, perform step M302, if not, Modem module continues to keep resting state;
Such as, when the antenna of Modem module receives the short message from base station, and when needing to send to user by portable router, then perform step M302.
The 4th flag bit that M302, Modem module are preserved according to self judges whether AP is in resting state, if so, performs step M303, if not, perform step M304;
Wherein, the 4th flag bit is the flag bit of the dormancy situation for recording AP that Modem module is preserved.
M303, Modem module send the instruction waking AP up to AP, and perform step M304;
Particularly, Modem module sends the instruction waking AP up to AP, can comprise two kinds of methods:
One is, Modem module sends the notification message waking AP up to AP, another kind is after Modem module is waken up, and sends high/low level indicating AP wake up by GPIO (General Purpose Input Output, universal input/output) to AP.
Further, Modem module to AP send wake the instruction of AP up after, this method also comprises: AP makes the USB be connected with Modem module of AP side exit from idle mode, the UART of AP exits hang-up, AP enters operating state, and indicate WIFI module to enter operating state, so that WIFI module enters operating state.
The 4th mark position that self preserves by M304, Modem module is operating state;
M305, Modem module make USB, Uart of self side exit suspended state, and Modem module enters operating state.
It should be noted that; above-mentioned in the judgement of wake-up condition; the step judged not order restriction; wake operation can be carried out when meeting the arbitrary condition in wake-up condition; the present embodiment is only to provide one preferably execution mode; therefore, just above-mentioned Rule of judgment is made the change in order or deletion, still within scope.
Again, as shown in Figure 7, the third wakes the method for portable router up, comprises the steps:
W301, WIFI module have judged whether that user connects, if there is user to connect, perform step W302, if do not have user to connect, perform W303;
W302, WIFI module instruction AP enters operating state, and performs step W303;
Further, after WIFI module instruction AP enters operating state, this method also comprises:
AP makes the USB be connected with Modem module of AP side exit from idle mode, and the UART of AP exits hang-up, and AP enters operating state, and indicates Modem module to enter operating state, so that Modem module enters operating state.
W303, WIFI module judge whether the instruction waking WIFI module up receiving AP transmission, if so, perform step W304, if not, continue to keep resting state;
W304, WIFI module enter operating state.
It should be noted that; above-mentioned in the judgement of wake-up condition; the step judged not order restriction; wake operation can be carried out when meeting the arbitrary condition in wake-up condition; the present embodiment is only to provide one preferably execution mode; therefore, just above-mentioned Rule of judgment is made the change in order or deletion, still within scope.
The embodiment of the present invention is on the basis of embodiment 2, provide the method waking portable router up, making portable router in resting state when receiving task, can carry out waking up working normally, ensure that the normal work of the portable router of dual chip.
Embodiment 4
Embodiments provide a kind of portable router, as shown in Figure 8, this device comprises: application controller AP4, modulator-demodulator Modem module 5 and WLAN (wireless local area network) WIFI module 6;
Wherein, AP4 is connected by universal serial bus USB with Modem module 5, and AP4 is connected with WIFI module 6;
As shown in Figure 9, AP4 comprises:
First judging unit 41, for judging whether AP meets the full terms in the dormancy condition preset simultaneously;
First indicating member 42, during for judging to draw the full terms met in default dormancy condition when the first judging unit 41 simultaneously, instruction Modem module and WIFI module enter resting state;
First dormancy unit 43, for making the general-purpose serial bus USB be connected with Modem module of AP side enter idle pulley, the Universal Asynchronous Receive/dispensing device UART of AP hangs up, and AP enters resting state;
Modem module 5 and WIFI module 6, after the first indicating member 42 indicates Modem module 5 and WIFI module 6 enters resting state, enter resting state.
Further, the dormancy condition preset comprises:
WIFI module 6 exceedes that default time no user connects, the external USB of AP4 side is not in place, charger is not in place, display screen is closed, the electricity of battery higher than the temperature of default electricity and battery lower than the temperature protection value preset.
Further, Modem5 module specifically comprises:
Second dormancy unit 51, for indicating after Modem module enters resting state at the first indicating member 42, and when executing pending whole task such as Modem module 5, makes Modem module 5 enter resting state.
Further, as shown in Figure 10, AP4 also comprises:
Second judging unit 44, after entering resting state in AP4, Modem module 5 and WIFI module 6, judges whether to meet any one condition in default wake-up condition;
First wakeup unit 45, during for judging whether at the second judging unit 44 to meet any one condition in default wake-up condition, the USB be connected with Modem module 5 of AP4 side is exitted from idle mode, and the UART of AP4 exits hang-up, makes AP4 enter operating state;
Second indicating member 46, is used to indicate Modem module 5 and WIFI module 6 enters operating state, enters operating state to make Modem module 5 and WIFI module 6.
Further; meet one of following condition; router can enter operating state, that is: arrive preset the timing wake-up time, AP4 side external USB in place, charger is in place, activate button be pressed, battery electric quantity lower than default electricity, battery temperature higher than preset temperature protection value.
Further, as shown in figure 11, Modem module 5 also comprises:
3rd judging unit 52, after entering resting state in Modem module 5, judges whether to receive the downlink data from the antenna be connected with Modem module 5;
Second wakeup unit 53, for when the 3rd judging unit 52 receives the downlink data from the antenna be connected with Modem module 5, make that the USB be connected with AP4 of Modem module 5 side exits from idle status, the UART of Modem module 5 exits suspended state, make Modem module enter operating state;
3rd indicating member 54, is used to indicate AP4 and enters operating state, so that AP4 indicates WIFI module 6 to enter operating state, AP4 and WIFI module 6 enter operating state.
Correspondingly, as shown in figure 12, AP4 also comprises:
3rd wakeup unit 47, for indicating at the 3rd indicating member 54 after AP4 enters operating state, making that the USB be connected with Modem module 5 of AP4 side exits from idle status, the UART of AP4 exits suspended state, making AP4 enter operating state;
4th indicating member 48, is used to indicate WIFI module 6 and enters operating state, so that WIFI module 6 enters operating state.
Further, as shown in figure 13, WIFI module 6 comprises:
4th judging unit 61, after entering resting state in WIFI module 6, has judged whether that user connects;
4th wakeup unit 62, during for judging to have shown that user connects when the 6th judging unit 61, makes WIFI module 6 enter operating state;
5th indicating member 63, is used to indicate AP4 and enters operating state, so that AP4 indicates Modem module 5 to enter operating state, AP4 and Modem module 5 enter operating state.
Correspondingly, as shown in figure 14, AP4 also comprises:
5th wakeup unit 49, for indicating at the 5th indicating member 63 after AP4 enters operating state, making that the USB be connected with Modem module 5 of AP4 side exits from idle status, the UART of AP4 exits suspended state, making AP4 enter operating state;
6th indicating member 410, is used to indicate Modem module 5 and enters operating state, so that Modem module 5 enters operating state.
Present embodiments provide a kind of portable router, the AP of this portable router and Modem module are dual chip, by when the application controller AP of portable router meets dormancy condition, AP indicates the Modem module that is connected with this AP and WIFI module to enter resting state, the USB be connected with Modem module of this AP side is made to enter idle pulley, the UART of this AP hangs up, AP enters resting state, complete the control of the low-power consumption work to the portable router with AP and Modem module dual chip, reach the effect of saving battery power, add the service time of the portable router with dual chip.
One of ordinary skill in the art will appreciate that all or part of step realizing above-described embodiment can have been come by hardware, the hardware that also can carry out instruction relevant by program completes, described program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium mentioned can be read-only memory, disk or CD etc.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.