CN105578505A - State management method of wireless communication module and wireless communication module - Google Patents

State management method of wireless communication module and wireless communication module Download PDF

Info

Publication number
CN105578505A
CN105578505A CN201510932231.0A CN201510932231A CN105578505A CN 105578505 A CN105578505 A CN 105578505A CN 201510932231 A CN201510932231 A CN 201510932231A CN 105578505 A CN105578505 A CN 105578505A
Authority
CN
China
Prior art keywords
wireless communication
mode
communication module
state machine
message
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.)
Granted
Application number
CN201510932231.0A
Other languages
Chinese (zh)
Other versions
CN105578505B (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.)
Midea Group Co Ltd
Midea Smart Home Technology Co Ltd
Original Assignee
Midea Group 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 Midea Group Co Ltd filed Critical Midea Group Co Ltd
Priority to CN201510932231.0A priority Critical patent/CN105578505B/en
Publication of CN105578505A publication Critical patent/CN105578505A/en
Application granted granted Critical
Publication of CN105578505B publication Critical patent/CN105578505B/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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W84/00Network topologies
    • H04W84/02Hierarchically pre-organised networks, e.g. paging networks, cellular networks, WLAN [Wireless Local Area Network] or WLL [Wireless Local Loop]
    • H04W84/10Small scale networks; Flat hierarchical networks
    • H04W84/12WLAN [Wireless Local Area Networks]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention provides a state management method of a wireless communication module and the wireless communication module. The state management method of the wireless communication module comprises the steps that the wireless communication module receives an event message; the event message is distributed to corresponding state machines according to the mode property of the event message, wherein the mode property is any one of AP-Mode, STA-Mode or System; and the state of the wireless communication module is controlled to be switched according to the event message and the state switching mechanism of the corresponding state machines. With application of the state management method of the wireless communication module and the wireless communication module, cooperative operation of three state machines in the wireless communication module of household electrical appliances can be realized so that the state management effect of the wireless communication module can be effectively enhanced.

Description

The method of state management of wireless communication module and wireless communication module
Technical field
The present invention relates to communication technical field, particularly relate to a kind of method of state management and wireless communication module of wireless communication module.
Background technology
Along with the development that science and technology is maked rapid progress, the whole world has entered the Network Information epoch, and diversified wireless communication module has been applied to home network, subway, taxi trade.Wireless communication module in current household electrical appliance normally uses as receiving terminal, and namely must rely on another network generator (such as, cable network) provides network to connect to household electrical appliance.But, the scope that user may want to utilize wireless communication module to increase network signal to be contained; Or, also may think to make wireless communication module that cable network is transformed into wireless network simultaneously; Or, also may want to make wireless communication module as wireless base station (AP), electronic installation is connected to each other.
Wireless communication module in household electrical appliance in correlation technique can only provide wherein a kind of network morphology or function usually.
Summary of the invention
The present invention is intended to solve one of technical problem in correlation technique at least to a certain extent.
For this reason, one object of the present invention is the method for state management proposing a kind of wireless communication module, can realize the cooperating operation of three kinds of state machines in the wireless communication module of household electrical appliance, effectively promotes the condition managing effect of wireless communication module.
Another object of the present invention is to propose a kind of wireless communication module.
For achieving the above object, the method for state management of the wireless communication module that first aspect present invention embodiment proposes, comprising: wireless communication module receives event message; Described event message is distributed to corresponding state machine by the mode attribute according to described event message, and wherein, described mode attribute is AP-Mode, STA-Mode, or any one in System; The state controlling described wireless communication module according to the State Transferring mechanism of the state machine of described event message and described correspondence switches.
The method of state management of the wireless communication module that first aspect present invention embodiment proposes, by event message being distributed to corresponding state machine according to the mode attribute of event message, wherein, mode attribute is AP-Mode, STA-Mode, or any one in System, and switch according to the machine-processed state controlling wireless communication module of State Transferring of event message and corresponding state machine, the cooperating operation of three kinds of state machines in the wireless communication module of household electrical appliance can be realized, effectively promote the condition managing effect of wireless communication module.
For achieving the above object, the wireless communication module that second aspect present invention embodiment proposes, comprising: serial data receiving or sending thread, for communicating with described household electrical appliance; Network data receiving or sending thread, for communicating with described Cloud Server; Service logic thread, for carrying out message with described serial data receiving or sending thread, described network data receiving or sending thread, to control the message of described serial data receiving or sending thread and the transmitting-receiving of described network data receiving or sending thread; Main thread, described main thread is used for controlling described serial data receiving or sending thread, network data receiving or sending thread and service logic thread; Application affairs readjustment submodule, described main thread controls described service logic thread by described application affairs readjustment submodule; And application affairs message queue, for receiving event message, and read for described main thread, wherein, described event message comprises application affairs message and WIFI callback events message; State machine events distribution processor submodule, for described event message being distributed to corresponding state machine according to the mode attribute of described event message, wherein, described mode attribute is AP-Mode, STA-Mode, or any one in System, read the described application affairs message in described application affairs message queue and WIFI callback events message, configure the State Transferring mechanism of described wireless communication module; State machine, switches for the state controlling described wireless communication module according to described event message and State Transferring mechanism.
The wireless communication module that second aspect present invention embodiment proposes, by event message being distributed to corresponding state machine according to the mode attribute of event message, wherein, mode attribute is AP-Mode, STA-Mode, or any one in System, and switch according to the machine-processed state controlling wireless communication module of State Transferring of event message and corresponding state machine, the cooperating operation of three kinds of state machines in the wireless communication module of household electrical appliance can be realized, effectively promote the condition managing effect of wireless communication module.
The aspect that the present invention adds and advantage will part provide in the following description, and part will become obvious from the following description, or be recognized by practice of the present invention.
Accompanying drawing explanation
The present invention above-mentioned and/or additional aspect and advantage will become obvious and easy understand from the following description of the accompanying drawings of embodiments, wherein:
Fig. 1 is the schematic flow sheet of the method for state management of the wireless communication module that one embodiment of the invention proposes;
Fig. 2 is the schematic flow sheet of the method for state management of the wireless communication module that another embodiment of the present invention proposes;
Fig. 3 is that in the embodiment of the present invention, radio communication mold bulk state switches schematic diagram;
Fig. 4 is the structural representation of the wireless communication module that another embodiment of the present invention proposes.
Embodiment
Be described below in detail embodiments of the invention, the example of described embodiment is shown in the drawings, and wherein same or similar label represents same or similar element or has element that is identical or similar functions from start to finish.Being exemplary below by the embodiment be described with reference to the drawings, only for explaining the present invention, and can not limitation of the present invention being interpreted as.On the contrary, embodiments of the invention comprise fall into attached claims spirit and intension within the scope of all changes, amendment and equivalent.
Fig. 1 is the schematic flow sheet of the method for state management of the wireless communication module that one embodiment of the invention proposes, and this wireless communication module is used for household electrical appliance, and the method for state management of this wireless communication module comprises:
S101: wireless communication module receives event message.
In an embodiment of the present invention, wireless communication module is specially wireless WIFI communication module.
Wherein, wireless WIFI communication module supports Wi-Fi technology, for household electrical appliance.
Household electrical appliance are air conditioner, refrigerator such as, and water heater etc.
Such as, Asymmetrical Digital Subscriber Line (the AsymmetricDigitalSubscriberLine of user's family, ADSL), partial wideband etc., wireless communication module can be connected to realize the wireless Internet access of mobile terminal by using family expenses Wi-Fi technology.Further, user also can be interconnected with corresponding Cloud Server by household electrical appliance by use wireless communication module, to realize the resource-sharing of household electrical appliance and Cloud Server.
Wireless communication module in current household electrical appliance normally uses as receiving terminal, and namely must rely on another network generator (such as, cable network) provides network to connect to household electrical appliance.But, the scope that user may want to utilize wireless communication module to increase network signal to be contained; Or, also may think to make wireless communication module that cable network is transformed into wireless network simultaneously; Or, also may want to make wireless communication module as wireless base station (AP), electronic installation is connected to each other.Wireless communication module in household electrical appliance in correlation technique can only provide wherein a kind of network morphology or function usually.
Alternatively, event message comprises application affairs message and WIFI callback events message, and wireless communication module receives event message, comprising: application affairs message queue receives the application affairs message that service logic thread generates; WIFI event call-back submodule receives WIFI callback events message, and after receiving WIFI callback events message, WIFI callback events message is added into application affairs message queue.
Wherein, application affairs message is adjusted back submodule service control logic thread by the main thread in wireless communication module by application affairs and is generated, and WIFI callback events message is produced by application program.
Particularly, application affairs message can be the event that the upper layer application of wireless communication module initiatively produces, and such as, wireless communication module cancels ap mode, then can produce the application affairs message of AF_EVT_AP_STOP.
WIFI callback events message can be the event of the WIFI bottom feedback of wireless communication module, and such as, the ap mode of wireless communication module is opened successfully, then can produce the WIFI callback events message of AF_EVT_AP_STARTED_SUCCESS.
Alternatively, wireless communication module also comprises before receiving event message: the State Transferring mechanism of configuration wireless communication module.
S102: event message is distributed to corresponding state machine by the mode attribute according to event message, and wherein, mode attribute is AP-Mode, STA-Mode, or any one in System.
Particularly, according to the mode attribute of event message, event message is distributed to corresponding state machine by state machine events distribution processor submodule, wherein, mode attribute is AP-Mode, STA-Mode, or any one in System.
Wireless communication module supports focus (AccessPoint, AP) mode of operation AP-Mode, AP-Mode is applied in adding of WLAN (wireless local area network) member device (i.e. client), i.e. network downstream, there is provided and wirelessly set up WLAN (wireless local area network) WLAN, the central apparatus of suitable WLAN.Wireless communication module also can support performance station Mode S TA-Mode, also can be understood as a work station in certain grid and client.When the WIFI chip of a wireless communication module provides STA-Mode function, wireless communication module just can be linked in the middle of an other network.AP-Mode is supplied to the connections such as mobile terminal, and STA-Mode is for providing the data uplink service of network.In addition, the grid state of wireless communication module place system, namely wireless communication module in systems in which with the network connection state of network user, can be described by system state dependency, the corresponding handover management being undertaken between system mode by System state machine.
Wherein, state machine comprises AP-Mode state machine, STA-Mode state machine, and System state machine, the corresponding STA-Mode state machine of mode attribute AP-Mode corresponding A P-Mode state machine, mode attribute STA-Mode, and the corresponding System state machine of mode attribute System.
S103: the machine-processed state controlling wireless communication module of State Transferring according to event message and corresponding state machine switches.
Wherein, the state of wireless communication module comprise in AP-Mode state machine set up in AP, AP run in and idle three kinds of states, to connect and idle three kinds of states in the connection in STA-Mode state machine; Network in System state machine is not set up, network has been set up and initialization three kinds of states.
Alternatively, the machine-processed state controlling wireless communication module of State Transferring according to event message and corresponding state machine switches, comprise: if the mode attribute of event message is AP-Mode, then the AP-Mode state machine state that controls wireless communication module according to the State Transferring mechanism of event message and AP-Mode state machine setting up in AP, AP run in and switch between idle three kinds of states; If the mode attribute of event message is STA-Mode, then STA-Mode state machine in this connection, has connected according to the machine-processed state controlling wireless communication module of State Transferring of event message and STA-Mode state machine and has switched between idle three kinds of states; If the mode attribute of event message is System, then the state that System state machine controls wireless communication module according to the State Transferring mechanism of event message and System state machine is not set up at network, network has been set up and switched between initialization three kinds of states.
In the present embodiment, by event message being distributed to corresponding state machine according to the mode attribute of event message, wherein, mode attribute is AP-Mode, STA-Mode, or any one in System, and switch according to the machine-processed state controlling wireless communication module of State Transferring of event message and corresponding state machine, the cooperating operation of three kinds of state machines in the wireless communication module of household electrical appliance can be realized, effectively promote the condition managing effect of wireless communication module.
Fig. 2 is the schematic flow sheet of the method for state management of the wireless communication module that another embodiment of the present invention proposes, and the method for state management of this wireless communication module comprises:
S201: the State Transferring mechanism of configuration wireless communication module.
Wireless communication module is specially wireless WIFI communication module.
Wherein, wireless WIFI communication module supports Wi-Fi technology, for household electrical appliance.
Particularly, by state machine events distribution processor submodule by AP-Mode state machine, STA-Mode state machine, and the status attribute superposition of System state machine, to configure the State Transferring mechanism of wireless communication module.
Wherein, the status attribute of state machine is for identifying the state of wireless communication module.
By this step, the plug-in in wireless communication module can be made to call the status attribute configured, wireless communication module can be switched between different states, realize the cooperating operation of three kinds of state machines in wireless communication module.
S202: application affairs message queue receives the application affairs message that service logic thread generates.
Wherein, application affairs message adjusts back the generation of submodule service control logic thread by the main thread in wireless communication module by application affairs.
Particularly, application affairs message can be the event that the upper layer application of wireless communication module initiatively produces, and such as, wireless communication module cancels ap mode, then can produce the application affairs message of AF_EVT_AP_STOP.
S203:WIFI event call-back submodule receives WIFI callback events message, and after receiving WIFI callback events message, WIFI callback events message is added into application affairs message queue.
WIFI callback events message can be the event of the WIFI bottom feedback of wireless communication module, and such as, the ap mode of wireless communication module is opened successfully, then can produce the WIFI callback events message of AF_EVT_AP_STARTED_SUCCESS.
S204: read the application affairs message in application affairs message queue and WIFI callback events message.
Particularly, application affairs message in application affairs message queue and WIFI callback events message is read by the main thread in wireless communication module by state machine events distribution processor submodule.
S205: event message is distributed to corresponding state machine by the mode attribute according to event message, and wherein, mode attribute is AP-Mode, STA-Mode, or any one in System.
Particularly, according to the mode attribute of event message, event message is distributed to corresponding state machine by state machine events distribution processor submodule, wherein, mode attribute is AP-Mode, STA-Mode, or any one in System.
Wireless communication module supports focus (AccessPoint, AP) mode of operation AP-Mode, AP-Mode is applied in adding of WLAN (wireless local area network) member device (i.e. client), i.e. network downstream, there is provided and wirelessly set up WLAN (wireless local area network) WLAN, the central apparatus of suitable WLAN.Wireless communication module also can support performance station Mode S TA-Mode, also can be understood as a work station in certain grid and client.When the WIFI chip of a wireless communication module provides STA-Mode function, wireless communication module just can be linked in the middle of an other network.AP-Mode is supplied to the connections such as mobile terminal, and STA-Mode is for providing the data uplink service of network.In addition, the grid state of wireless communication module place system, namely wireless communication module in systems in which with the network connection state of network user, can be described by system state dependency, the corresponding handover management being undertaken between system mode by System state machine.
Wherein, state machine comprises AP-Mode state machine, STA-Mode state machine, and System state machine, the corresponding STA-Mode state machine of mode attribute AP-Mode corresponding A P-Mode state machine, mode attribute STA-Mode, and the corresponding System state machine of mode attribute System.
Condition managing is carried out respectively by event message being distributed to corresponding state machine, the logicality of code structure can be strengthened in WIFI router bottom hardware realizes, reduce the complexity of code development, be convenient to the Function Extension of later stage wireless communication module hardware system.
S206: the state controlling wireless communication module according to event message and State Transferring mechanism switches.
Particularly, as shown in Figure 3, for radio communication mold bulk state in the embodiment of the present invention switches schematic diagram, wherein, comprise: AP-Mode state machine 31, STA-Mode state machine 32, System state machine 33, state machine events distribution processor submodule 34, application affairs message queue 35, AP-Mode state machine state switching flow 36, STA-Mode state machine state switching flow 37, and System state machine state switching flow 38.
Can switch according to the machine-processed state controlling wireless communication module of State Transferring of the content of event message and corresponding state machine.
Such as, as shown in Figure 3, wireless communication module cancels ap mode, then can produce AF_EVT_AP_STOP application affairs message, the content of this AF_EVT_AP_STOP application affairs message is for cancelling ap mode, when wireless communication module is in the operating state of AP, and when the main thread of wireless communication module reads this AF_EVT_AP_STOP application affairs message, AP-Mode state machine controls wireless communication module and switches to idle state by the operating state of AP.
In the present embodiment, by configuring the State Transferring mechanism of wireless communication module, the plug-in in wireless communication module can be made to call the status attribute configured, wireless communication module can be switched between different states, by event message being distributed to corresponding state machine according to the mode attribute of event message, wherein, mode attribute is AP-Mode, STA-Mode, or any one in System, and switch according to the machine-processed state controlling wireless communication module of State Transferring of event message and corresponding state machine, the cooperating operation of three kinds of state machines in the wireless communication module of household electrical appliance can be realized, the condition managing effect of effective lifting wireless communication module.Condition managing is carried out respectively by event message being distributed to corresponding state machine, the logicality of code structure can be strengthened in WIFI router bottom hardware realizes, reduce the complexity of code development, be convenient to the Function Extension of later stage wireless communication module hardware system.
Fig. 4 is the structural representation of the wireless communication module 40 that another embodiment of the present invention proposes, and this wireless communication module is used for household electrical appliance, and this wireless communication module 40 comprises serial data receiving or sending thread 41, for communicating with household electrical appliance; Network data receiving or sending thread 42, for communicating with Cloud Server; Service logic thread 43, for carrying out message with serial data receiving or sending thread 41, network data receiving or sending thread 42, controls with the message of receiving and dispatching serial data receiving or sending thread 41 and network data receiving or sending thread 42; Main thread 44, main thread 44 is for controlling serial data receiving or sending thread 41, network data receiving or sending thread 42 and service logic thread 43; Application affairs readjustment submodule 45, main thread 44 is by application affairs readjustment submodule 45 service control logic thread 43; And application affairs message queue 46, for receiving event message, and read for main thread 44, wherein, event message comprises application affairs message and WIFI callback events message; State machine events distribution processor submodule 47, for event message being distributed to corresponding state machine 48 according to the mode attribute of event message, wherein, mode attribute is AP-Mode, STA-Mode, or any one in System, read the application affairs message in application affairs message queue 46 and WIFI callback events message, the State Transferring mechanism of configuration wireless communication module 40; State machine 48, switches for the state controlling wireless communication module 40 according to event message and State Transferring mechanism.
In one embodiment of the invention, this wireless communication module 40 comprises serial data receiving or sending thread 41, for communicating with household electrical appliance.
Wireless communication module is specially wireless WIFI communication module.
Wherein, wireless WIFI communication module supports Wi-Fi technology, for household electrical appliance.
Serial ports and serial line interface are the expansion interfaces adopting serial communication mode.Wherein, serial communication mode refers to that each bit data of an information is by the communication modes transmitted in order by turn.
Thread is the minimum unit that program performs stream, and the thread of a standard is by Thread Id, and current instruction pointer (PC), set of registers and storehouse form.Thread is applicable to file management in server or Control on Communication.
Such as, when wireless communication module 40 receives the message of household electrical appliance transmission, this message is processed with serial communication mode, so that the message after process is reported to Cloud Server.
In one embodiment of the invention, this wireless communication module 40 also comprises network data receiving or sending thread 42, for communicating with Cloud Server.
Such as, when wireless communication module 40 receives the message of Cloud Server transmission by network data receiving or sending thread 42, this message is processed, so that the message after process is issued to household electrical appliance.
In one embodiment of the invention, this wireless communication module 40 also comprises service logic thread 43, for carrying out message with serial data receiving or sending thread 41, network data receiving or sending thread 42, control with the message of receiving and dispatching serial data receiving or sending thread 41 and network data receiving or sending thread 42.
Wherein, the service logic thread 43 in the embodiment of the present invention is the service logic thread 43 based on M-Smart system.The service content that M-Smart open system specifically provides, M-Smart system is for using third party cloud, the built-in cloud of use U.S., the open docking form of unclouded three kinds of the Internet partners.
Particularly, service logic thread 43 carries out message by M-Smart agreement and serial data receiving or sending thread 41, network data receiving or sending thread 42.
In one embodiment of the invention, this wireless communication module 40 also comprises main thread 44, and main thread 44 is for controlling serial data receiving or sending thread 41, network data receiving or sending thread 42 and service logic thread 43.
Alternatively, main thread 44 is for managing the state machine 48 of wireless communication module 40.
In one embodiment of the invention, this wireless communication module 40 also comprises application affairs readjustment submodule 45, and main thread 44 is by application affairs readjustment submodule 45 service control logic thread 43.
Wherein, application affairs message is generated by application affairs readjustment submodule 45 service control logic thread 43 by the main thread 44 in wireless communication module 40.
Particularly, application affairs message can be the event that the upper layer application of wireless communication module 40 initiatively produces, and such as, wireless communication module 40 cancels ap mode, then can produce the application affairs message of AF_EVT_AP_STOP.
In one embodiment of the invention, this wireless communication module 40 also comprises application affairs message queue 46, and for receiving event message, and read for main thread 44, wherein, event message comprises application affairs message and WIFI callback events message.
Such as, when Cloud Server issuing message, or during household electrical appliance reporting message, service logic thread 43 generates corresponding application affairs message, application affairs message is added in application affairs message queue 46 by service logic thread 43, reads this application affairs message to make main thread 44.
In one embodiment of the invention, this wireless communication module 40 also comprises state machine events distribution processor submodule 47, for event message being distributed to corresponding state machine 48 according to the mode attribute of event message, wherein, mode attribute is AP-Mode, STA-Mode, or any one in System, reads the application affairs message in application affairs message queue 46 and WIFI callback events message, the State Transferring mechanism of configuration wireless communication module 40.
Particularly, according to the mode attribute of event message, event message is distributed to corresponding state machine 48 by state machine events distribution processor submodule 47, wherein, mode attribute is AP-Mode, STA-Mode, or any one in System.
Wireless communication module 40 supports focus (AccessPoint, AP) mode of operation AP-Mode, AP-Mode is applied in adding of WLAN (wireless local area network) member device (i.e. client), i.e. network downstream, there is provided and wirelessly set up WLAN (wireless local area network) WLAN, the central apparatus of suitable WLAN.Wireless communication module 40 also can support performance station Mode S TA-Mode, also can be understood as a work station in certain grid and client.When the WIFI chip of a wireless communication module 40 provides STA-Mode function, wireless communication module 40 just can be linked in the middle of an other network.AP-Mode is supplied to the connections such as mobile terminal, and STA-Mode is for providing the data uplink service of network.In addition, the grid state of wireless communication module 40 place system, namely wireless communication module 40 in systems in which with the network connection state of network user, can be described by system state dependency, the corresponding handover management being undertaken between system mode by System state machine.
Wherein, state machine 48 comprises AP-Mode state machine, STA-Mode state machine, and System state machine, the corresponding STA-Mode state machine of mode attribute AP-Mode corresponding A P-Mode state machine, mode attribute STA-Mode, and the corresponding System state machine of mode attribute System.
Particularly, application affairs message in application affairs message queue 46 and WIFI callback events message is read by the main thread 44 in wireless communication module 40 by state machine events distribution processor submodule 47.
Alternatively, state machine events distribution processor submodule 47 is also for by AP-Mode state machine, STA-Mode state machine, and the status attribute superposition of System state machine, to configure the State Transferring mechanism of wireless communication module 40.
Wherein, the status attribute of state machine 48 is for identifying the state of wireless communication module 40.
By this step, the plug-in in wireless communication module 40 can be made to call the status attribute configured, wireless communication module 40 can be switched between different states, realize the cooperating operation of three kinds of state machines in wireless communication module 40.
In one embodiment of the invention, this wireless communication module 40 also comprises state machine 48, switches for the state controlling wireless communication module 40 according to event message and State Transferring mechanism.
Alternatively, state machine 48 also for: if the mode attribute of event message is AP-Mode, then the AP-Mode state machine state that controls wireless communication module 40 according to the State Transferring mechanism of event message and AP-Mode state machine setting up in AP, AP run in and switch between idle three kinds of states; If the mode attribute of event message is STA-Mode, then STA-Mode state machine in this connection, has connected according to the machine-processed state controlling wireless communication module 40 of State Transferring of event message and STA-Mode state machine and has switched between idle three kinds of states; If the mode attribute of event message is System, then the state that System state machine controls wireless communication module 40 according to the State Transferring mechanism of event message and System state machine is not set up at network, network has been set up and switched between initialization three kinds of states.
Particularly, as shown in Figure 3, for wireless communication module in the embodiment of the present invention 40 state switches schematic diagram, wherein, comprise: AP-Mode state machine 31, STA-Mode state machine 32, System state machine 33, state machine events distribution processor submodule 34, application affairs message queue 35, AP-Mode state machine state switching flow 36, STA-Mode state machine state switching flow 37, and System state machine state switching flow 38.
Can switch according to the machine-processed state controlling wireless communication module 40 of State Transferring of the content of event message and corresponding state machine 48.
Such as, as shown in Figure 3, wireless communication module 40 cancels ap mode, then can produce AF_EVT_AP_STOP application affairs message, the content of this AF_EVT_AP_STOP application affairs message is for cancelling ap mode, when wireless communication module 40 is in the operating state of AP, and when the main thread of wireless communication module 40 reads this AF_EVT_AP_STOP application affairs message, AP-Mode state machine controls wireless communication module 40 and switches to idle state by the operating state of AP.
In one embodiment of the invention, this wireless communication module 40 also comprises WIFI event call-back submodule 49, for receiving WIFI callback events message, and after receiving WIFI callback events message, WIFI callback events message is added into application affairs message queue 46.
WIFI callback events message can be the event of the WIFI bottom feedback of wireless communication module 40.
Such as, the ap mode of wireless communication module 40 is opened successfully, then can produce the WIFI callback events message of AF_EVT_AP_STARTED_SUCCESS.
In the present embodiment, by event message being distributed to corresponding state machine according to the mode attribute of event message, wherein, mode attribute is AP-Mode, STA-Mode, or any one in System, and switch according to the machine-processed state controlling wireless communication module of State Transferring of event message and corresponding state machine, the cooperating operation of three kinds of state machines in the wireless communication module of household electrical appliance can be realized, effectively promote the condition managing effect of wireless communication module.
It should be noted that, in describing the invention, term " first ", " second " etc. only for describing object, and can not be interpreted as instruction or hint relative importance.In addition, in describing the invention, except as otherwise noted, the implication of " multiple " is two or more.
Describe and can be understood in flow chart or in this any process otherwise described or method, represent and comprise one or more for realizing the module of the code of the executable instruction of the step of specific logical function or process, fragment or part, and the scope of the preferred embodiment of the present invention comprises other realization, wherein can not according to order that is shown or that discuss, comprise according to involved function by the mode while of basic or by contrary order, carry out n-back test, this should understand by embodiments of the invention person of ordinary skill in the field.
Should be appreciated that each several part of the present invention can realize with hardware, software, firmware or their combination.In the above-described embodiment, multiple step or method can with to store in memory and the software performed by suitable instruction execution system or firmware realize.Such as, if realized with hardware, the same in another embodiment, can realize by any one in following technology well known in the art or their combination: the discrete logic with the logic gates for realizing logic function to data-signal, there is the application-specific integrated circuit (ASIC) of suitable combinational logic gate circuit, programmable gate array (PGA), field programmable gate array (FPGA) etc.
Those skilled in the art are appreciated that realizing all or part of step that above-described embodiment method carries is that the hardware that can carry out instruction relevant by program completes, described program can be stored in a kind of computer-readable recording medium, this program perform time, step comprising embodiment of the method one or a combination set of.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing module, also can be that the independent physics of unit exists, also can be integrated in a module by two or more unit.Above-mentioned integrated module both can adopt the form of hardware to realize, and the form of software function module also can be adopted to realize.If described integrated module using the form of software function module realize and as independently production marketing or use time, also can be stored in a computer read/write memory medium.
The above-mentioned storage medium mentioned can be read-only memory, disk or CD etc.
In the description of this specification, specific features, structure, material or feature that the description of reference term " embodiment ", " some embodiments ", " example ", " concrete example " or " some examples " etc. means to describe in conjunction with this embodiment or example are contained at least one embodiment of the present invention or example.In this manual, identical embodiment or example are not necessarily referred to the schematic representation of above-mentioned term.And the specific features of description, structure, material or feature can combine in an appropriate manner in any one or more embodiment or example.
Although illustrate and describe embodiments of the invention above, be understandable that, above-described embodiment is exemplary, can not be interpreted as limitation of the present invention, and those of ordinary skill in the art can change above-described embodiment within the scope of the invention, revises, replace and modification.

Claims (17)

1. a method of state management for wireless communication module, described wireless communication module is used for household electrical appliance, it is characterized in that, comprises the following steps:
Wireless communication module receives event message;
Described event message is distributed to corresponding state machine by the mode attribute according to described event message, and wherein, described mode attribute is AP-Mode, STA-Mode, or any one in System;
The state controlling described wireless communication module according to the State Transferring mechanism of the state machine of described event message and described correspondence switches.
2. the method for state management of wireless communication module as claimed in claim 1, is characterized in that, described wireless communication module also comprises before receiving event message:
Configure the State Transferring mechanism of described wireless communication module.
3. the method for state management of wireless communication module as claimed in claim 2, it is characterized in that, described state machine comprises AP-Mode state machine, STA-Mode state machine, and System state machine, the corresponding STA-Mode state machine of described mode attribute AP-Mode corresponding A P-Mode state machine, described mode attribute STA-Mode, and the corresponding System state machine of described mode attribute System.
4. the method for state management of wireless communication module as claimed in claim 2, is characterized in that, the State Transferring mechanism of the described wireless communication module of described configuration, comprising:
By described AP-Mode state machine, described STA-Mode state machine, and the status attribute superposition of described System state machine, to configure the State Transferring mechanism of described wireless communication module.
5. the method for state management of wireless communication module as claimed in claim 1, it is characterized in that, the state of described wireless communication module comprise in AP-Mode state machine set up in AP, AP run in and idle three kinds of states, to connect and idle three kinds of states in the connection in STA-Mode state machine; Network in System state machine is not set up, network has been set up and initialization three kinds of states.
6. the method for state management of wireless communication module as claimed in claim 5, is characterized in that, the state that the State Transferring mechanism of the described state machine according to described event message and described correspondence controls described wireless communication module switches, and comprising:
If the mode attribute of described event message is AP-Mode, then the AP-Mode state machine state that controls described wireless communication module according to the State Transferring mechanism of described event message and described AP-Mode state machine setting up in AP, AP run in and switch between idle three kinds of states;
If the mode attribute of described event message is STA-Mode, then STA-Mode state machine in this connection, has connected according to the machine-processed state controlling described wireless communication module of State Transferring of described event message and described STA-Mode state machine and has switched between idle three kinds of states;
If the mode attribute of described event message is System, then the state that System state machine controls described wireless communication module according to the State Transferring mechanism of described event message and described System state machine is not set up at network, network has been set up and switched between initialization three kinds of states.
7. the method for state management of wireless communication module as claimed in claim 1, it is characterized in that, described event message comprises application affairs message and WIFI callback events message, and described wireless communication module receives event message, comprising:
Application affairs message queue receives the application affairs message that service logic thread generates;
WIFI event call-back submodule receives WIFI callback events message, and after receiving described WIFI callback events message, described WIFI callback events message is added into described application affairs message queue.
8. the method for state management of wireless communication module as claimed in claim 7, is characterized in that, also comprise:
Read the described application affairs message in described application affairs message queue and described WIFI callback events message.
9. the method for state management of wireless communication module as claimed in claim 7, it is characterized in that, described WIFI callback events message is produced by application program.
10. a wireless communication module, described wireless communication module is used for household electrical appliance, it is characterized in that, comprising:
Serial data receiving or sending thread, for communicating with described household electrical appliance;
Network data receiving or sending thread, for communicating with described Cloud Server;
Service logic thread, for carrying out message with described serial data receiving or sending thread, described network data receiving or sending thread, to control the message of described serial data receiving or sending thread and the transmitting-receiving of described network data receiving or sending thread;
Main thread, described main thread is used for controlling described serial data receiving or sending thread, network data receiving or sending thread and service logic thread;
Application affairs readjustment submodule, described main thread controls described service logic thread by described application affairs readjustment submodule; And
Application affairs message queue, for receiving event message, and read for described main thread, wherein, described event message comprises application affairs message and WIFI callback events message;
State machine events distribution processor submodule, for described event message being distributed to corresponding state machine according to the mode attribute of described event message, wherein, described mode attribute is AP-Mode, STA-Mode, or any one in System, read the described application affairs message in described application affairs message queue and WIFI callback events message, configure the State Transferring mechanism of described wireless communication module;
State machine, switches for the state controlling described wireless communication module according to described event message and State Transferring mechanism.
11. wireless communication modules as claimed in claim 10, it is characterized in that, described state machine comprises AP-Mode state machine, STA-Mode state machine, and System state machine, the corresponding STA-Mode state machine of described mode attribute AP-Mode corresponding A P-Mode state machine, described mode attribute STA-Mode, and the corresponding System state machine of described mode attribute System.
12. wireless communication modules as claimed in claim 11, is characterized in that, described state machine events distribution processor submodule also for:
By described AP-Mode state machine, described STA-Mode state machine, and the status attribute superposition of described System state machine, to configure the State Transferring mechanism of described wireless communication module.
13. wireless communication modules as claimed in claim 10, it is characterized in that, the state of described wireless communication module comprise in AP-Mode state machine set up in AP, AP run in and idle three kinds of states, to connect and idle three kinds of states in the connection in STA-Mode state machine; Network in System state machine is not set up, network has been set up and initialization three kinds of states.
14. wireless communication modules as claimed in claim 13, is characterized in that, described state machine also for:
If the mode attribute of described event message is AP-Mode, then the AP-Mode state machine state that controls described wireless communication module according to the State Transferring mechanism of described event message and described AP-Mode state machine setting up in AP, AP run in and switch between idle three kinds of states;
If the mode attribute of described event message is STA-Mode, then STA-Mode state machine in this connection, has connected according to the machine-processed state controlling described wireless communication module of State Transferring of described event message and described STA-Mode state machine and has switched between idle three kinds of states;
If the mode attribute of described event message is System, then the state that System state machine controls described wireless communication module according to the State Transferring mechanism of described event message and described System state machine is not set up at network, network has been set up and switched between initialization three kinds of states.
15. wireless communication modules as claimed in claim 10, is characterized in that, also comprise:
WIFI event call-back submodule, for receiving WIFI callback events message, and after receiving described WIFI callback events message, is added into described application affairs message queue by described WIFI callback events message.
16. wireless communication modules as claimed in claim 14, it is characterized in that, described reception event message, comprising:
Application affairs message queue receives the application affairs message that service logic thread generates; And
Receive the described WIFI callback events message that described WIFI event call-back submodule adds.
17. wireless communication modules as described in any one of claim 10,15,16, it is characterized in that, described WIFI callback events message is produced by application program.
CN201510932231.0A 2015-12-14 2015-12-14 State management method of wireless communication module and wireless communication module Active CN105578505B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510932231.0A CN105578505B (en) 2015-12-14 2015-12-14 State management method of wireless communication module and wireless communication module

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510932231.0A CN105578505B (en) 2015-12-14 2015-12-14 State management method of wireless communication module and wireless communication module

Publications (2)

Publication Number Publication Date
CN105578505A true CN105578505A (en) 2016-05-11
CN105578505B CN105578505B (en) 2017-04-12

Family

ID=55888054

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510932231.0A Active CN105578505B (en) 2015-12-14 2015-12-14 State management method of wireless communication module and wireless communication module

Country Status (1)

Country Link
CN (1) CN105578505B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106341806A (en) * 2016-08-23 2017-01-18 冯村 Adaptive communication method, adaptive communication device and adaptive communication system of communication terminal based on cascaded state machines
CN106658186A (en) * 2016-10-27 2017-05-10 四川长虹电器股份有限公司 UI operation synchronizing method for network switching of intelligent TV set
CN108334384A (en) * 2018-02-10 2018-07-27 郑州天迈科技股份有限公司 4G module management methods based on state machine
CN110888693A (en) * 2019-11-22 2020-03-17 烽火通信科技股份有限公司 Method and device for supporting AP and STA coexistence in Android system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104202308A (en) * 2014-08-18 2014-12-10 乐鑫信息科技(上海)有限公司 Implementation method of safe batch configuration of Wi-Fi Internet of Things system
CN104469981A (en) * 2014-11-21 2015-03-25 广东瑞德智能科技股份有限公司 Method and system for connecting intelligent household appliance into router
CN104768150A (en) * 2015-03-31 2015-07-08 深圳市江波龙电子有限公司 Method and system for connecting WiFi equipment with wireless hot spot
JP2015162763A (en) * 2014-02-26 2015-09-07 キヤノン株式会社 communication device, control method, and program

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015162763A (en) * 2014-02-26 2015-09-07 キヤノン株式会社 communication device, control method, and program
CN104202308A (en) * 2014-08-18 2014-12-10 乐鑫信息科技(上海)有限公司 Implementation method of safe batch configuration of Wi-Fi Internet of Things system
CN104469981A (en) * 2014-11-21 2015-03-25 广东瑞德智能科技股份有限公司 Method and system for connecting intelligent household appliance into router
CN104768150A (en) * 2015-03-31 2015-07-08 深圳市江波龙电子有限公司 Method and system for connecting WiFi equipment with wireless hot spot

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106341806A (en) * 2016-08-23 2017-01-18 冯村 Adaptive communication method, adaptive communication device and adaptive communication system of communication terminal based on cascaded state machines
CN106658186A (en) * 2016-10-27 2017-05-10 四川长虹电器股份有限公司 UI operation synchronizing method for network switching of intelligent TV set
CN106658186B (en) * 2016-10-27 2019-08-13 四川长虹电器股份有限公司 The method for realizing the synchronous UI operation of smart television network switching
CN108334384A (en) * 2018-02-10 2018-07-27 郑州天迈科技股份有限公司 4G module management methods based on state machine
CN108334384B (en) * 2018-02-10 2023-07-21 郑州天迈科技股份有限公司 4G module management method based on state machine
CN110888693A (en) * 2019-11-22 2020-03-17 烽火通信科技股份有限公司 Method and device for supporting AP and STA coexistence in Android system

Also Published As

Publication number Publication date
CN105578505B (en) 2017-04-12

Similar Documents

Publication Publication Date Title
CN101883355B (en) Collocation method and system of terminal parameter and terminal management device
CN105578505A (en) State management method of wireless communication module and wireless communication module
CN105871992B (en) Cloud access system and method based on wireless communication module
Alnoman et al. Computing-aware base station sleeping mechanism in H-CRAN-cloud-edge networks
CN110275680B (en) Double-control double-active storage system
CN107395473B (en) Networking method and device of household appliance and terminal equipment
EP2852113B1 (en) Load sharing method and device, and single board
US11778453B2 (en) Radio access network (RAN) data exposure in a wireless communication network
US11910205B2 (en) Messaging in a wireless communication network
CN107347202B (en) initial access method and device of terminal under network slice architecture
US20200351155A1 (en) Base station configuration method and apparatus
CN105871993B (en) Cloud access method and system based on wireless communication module
CN105871991B (en) Cloud access system and method based on wireless communication module
CN105681207A (en) Router and home appliance control system
CN105262604A (en) Virtual machine migration method and equipment
CN105791377B (en) Cloud access system and method based on wireless communication module
CN102299938B (en) Method and device for realizing multicore and multisystem unified platform
CN103716907A (en) Electronic equipment control method and electronic equipment
CN114697210B (en) Network performance guarantee method and device
WO2012065452A1 (en) Home automation system, control method thereof, and information processing center device
CN102820992A (en) Processing method and device of data packets
CN204334626U (en) Household electrical appliance and communication system thereof
CN113625586A (en) Method and system for controlling smart home based on gateway
CN103026759B (en) A kind of method of switching and relevant apparatus and communication system
CN113890883B (en) Universal man-machine flexible access system and method for dispatching emergency system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20170320

Address after: 528311 Guangdong, Foshan, Beijiao, the United States, the United States and the United States on the avenue of the United States, the headquarters of the United States building B floor, District, 26-28

Applicant after: Midea Group Co., Ltd.

Applicant after: Midea Smart Home Technology Co., Ltd.

Address before: 528311 Guangdong, Foshan, Beijiao, the United States, the United States and the United States on the avenue of the United States, the headquarters of the United States building B floor, District, 26-28

Applicant before: Midea Group Co., Ltd.