CN103945499B - The switching method and device of WIFI module mode of operation - Google Patents

The switching method and device of WIFI module mode of operation Download PDF

Info

Publication number
CN103945499B
CN103945499B CN201410156002.XA CN201410156002A CN103945499B CN 103945499 B CN103945499 B CN 103945499B CN 201410156002 A CN201410156002 A CN 201410156002A CN 103945499 B CN103945499 B CN 103945499B
Authority
CN
China
Prior art keywords
wifi module
hotspot
service platform
mode
client
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
CN201410156002.XA
Other languages
Chinese (zh)
Other versions
CN103945499A (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
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 CN201410156002.XA priority Critical patent/CN103945499B/en
Publication of CN103945499A publication Critical patent/CN103945499A/en
Application granted granted Critical
Publication of CN103945499B publication Critical patent/CN103945499B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The present invention discloses a kind of switching method and device of WIFI module mode of operation, acquiescence starts client mode after electricity in WIFI module of the embodiment of the present invention, and the working condition of information and WIFI module according to corresponding to being stored with whether terminal, the beneficial effect of intelligent switching WIFI module mode of operation is reached, avoid the troublesome operation of user's manual switching WIFI module mode of operation, the convenience that WIFI module uses is improved, reduces the complexity and difficulties that WIFI module uses.

Description

The switching method and device of WIFI module mode of operation
Technical field
The present invention relates to wireless communication technology field, more particularly to a kind of switching method and dress of WIFI module mode of operation Put.
Background technology
Popularization and WIFI with intelligent mobile terminal(Wireless Fidelity, wireless network)Focus covers wide General property, core communication technology of the increasing producer using the WIFI communication technologys as Internet of Things.Due to power consumption and cost advantage, Most of producers are using WIFI chips as WAP.And WIFI chips can only operate in hotspot pattern or client mould Formula, it is impossible to while be both hotspot pattern and client mode.And the network configuration of WIFI chips has to operate at hotspot pattern, But normal telecommunication and control then require that WIFI chips operate in client mode.And WIFI module is typically necessary user Manual switching mode of operation, while increasing user's operating procedure, also require that user selects WIFI module pair according to usage scenario The mode of operation answered, add the complexity and difficulties that WIFI module uses.
The above is only used for auxiliary and understands technical scheme, does not represent and recognizes the above as existing skill Art.
The content of the invention
It is a primary object of the present invention to provide a kind of switching method and device of WIFI module mode of operation, it is intended to reach The purpose of intelligence switching WIFI module mode of operation.
The embodiment of the invention discloses a kind of switching method of WIFI module mode of operation, comprise the following steps:
Client mode is enabled in the WIFI module of terminal after electricity, whether detection terminal is stored with the account letter of hotspot Breath;
When terminal does not store the accounts information of hotspot, WIFI module is switched into focus mould by client mode Formula;
When terminal storage has the accounts information of hotspot, it whether there is available hotspot in scanning preset range Signal;
If available hotspot signal is not present to preset range is interior in scanning, WIFI module is cut by client mode Shift to hotspot pattern;
Available hotspot signal be present if scanning into preset range, attempted using the accounts information of storage Log in hotspot corresponding to the hotspot signal;Fail log in the hotspot when, by WIFI module by Client mode switches to hotspot pattern;In hotspot described in successful log, according to the preset service platform information of storage Communicated with corresponding service platform.
Preferably, the step to be communicated according to the preset service platform information prestored with corresponding service platform Also include after rapid:
Detect WIFI module and service platform whether proper communication;
In WIFI module and service platform proper communication, continue to be led to client mode and the service platform Letter;
When WIFI module and service platform are unable to proper communication, WIFI module is switched into focus mould by client mode Formula.
Preferably, it is described when WIFI module and service platform are unable to proper communication, by WIFI module by client mode The step of switching to hotspot pattern includes:
When first time failure occurs for the communication of WIFI module and service platform, continue to attempt to communicate with service platform;
If reach predetermined threshold value more than preset duration or the number for attempting to communicate with service platform, the WIFI module Proper communication is still unable to service platform, then WIFI module is switched into hotspot pattern by client mode.
Preferably, also include after described the step of WIFI module is switched into hotspot pattern by client mode:
The switching condition triggering of mode of operation is identified, then WIFI module is switched into client mode by hotspot pattern.
Preferably, the step of handover trigger for recognizing mode of operation instructs includes:
The more new command of the account information of the hotspot of WIFI module storage is received, or detects that WIFI module is deposited There is fresh information in the account information of the hotspot of storage, then identify the switching condition triggering of mode of operation;
The more new command of the preset service platform information of WIFI module storage is received, or detects that WIFI module stores Preset service platform information fresh information be present, then identify mode of operation switching condition triggering;
When receiving the operational order of operation client mode, then the switching condition triggering of mode of operation is identified;
When detecting hot spot networks corresponding to no client access WIFI module, WIFI module is detected according to predetermined period Whether recover normal with the communications status of service platform;Recover normal in the communications status for detecting WIFI module and service platform When, then identify the switching condition triggering of mode of operation.
A kind of switching device of WIFI module mode of operation, including WIFI module is also disclosed in the embodiment of the present invention;Also include Control module and handover module;
The control module is used for, and after enabling client mode after electricity in the WIFI module of terminal, whether detection terminal It is stored with the accounts information of hotspot;
The handover module is used for, when terminal does not store the accounts information of hotspot, by WIFI module by client Pattern switching is held to hotspot pattern;
The control module is additionally operable to, and when terminal storage has the accounts information of hotspot, scanning in preset range is It is no available hotspot signal to be present;Available hotspot signal be present if scanning into preset range, using storage The accounts information attempt log in hotspot corresponding to the hotspot signal;And in hotspot described in successful log When, communicated according to the preset service platform information of storage with corresponding service platform;
The handover module is additionally operable to, will if available hotspot signal is not present to preset range is interior in scanning WIFI module switches to hotspot pattern by client mode;And exist in WIFI module scanning to preset range available wireless Focus signal, and attempt to log in hotspot corresponding to the hotspot signal and not using the accounts information of storage Described in successful log during hotspot, WIFI module can be switched into hotspot pattern by client mode.
Preferably, the control module is additionally operable to:
Detect WIFI module and service platform whether proper communication;In WIFI module and service platform proper communication, after It is continuous to be communicated with client mode with the service platform;
The handover module is additionally operable to:When WIFI module and service platform are unable to proper communication, by WIFI module by visitor Family end pattern switching is to hotspot pattern.
Preferably, the handover module is additionally operable to:
When first time failure occurs for the communication of WIFI module and service platform, WIFI module continues to attempt to and service platform Communication;If more than preset duration or attempt the number that is communicated with service platform and reach predetermined threshold value, the WIFI module and Service platform is still unable to proper communication, then WIFI module is switched into hotspot pattern by client mode.
Preferably, the handover module is additionally operable to:
The switching condition triggering of mode of operation is identified, then WIFI module is switched into client mode by hotspot pattern.
Preferably, the handover module is additionally operable to:
The more new command of the account information of the hotspot of WIFI module storage is received, or detects that WIFI module is deposited There is fresh information in the account information of the hotspot of storage, then identify the switching condition triggering of mode of operation;
The more new command of the preset service platform information of WIFI module storage is received, or detects that WIFI module stores Preset service platform information fresh information be present, then identify mode of operation switching condition triggering;
When receiving the operational order of operation client mode, then the switching condition triggering of mode of operation is identified;
When detecting hot spot networks corresponding to no client access WIFI module, WIFI module is detected according to predetermined period Whether recover normal with the communications status of service platform;Recover normal in the communications status for detecting WIFI module and service platform When, then identify the switching condition triggering of mode of operation.
Whether acquiescence starts client mode after electricity in WIFI module of the embodiment of the present invention, and be stored with correspondingly according to terminal Information and WIFI module working condition, reached the beneficial effect of intelligent switching WIFI module mode of operation, avoided use The troublesome operation of family manual switching WIFI module mode of operation, the convenience that WIFI module uses is improved, reduces WIFI moulds The complexity and difficulties that block uses.
Brief description of the drawings
Fig. 1 is the switching method first embodiment schematic flow sheet of WIFI module mode of operation of the present invention;
Fig. 2 is the switching method second embodiment schematic flow sheet of WIFI module mode of operation of the present invention;
Fig. 3 is the switching method 3rd embodiment schematic flow sheet of WIFI module mode of operation of the present invention;
Fig. 4 is the switching device first embodiment high-level schematic functional block diagram of WIFI module mode of operation of the present invention;
Fig. 5 is the switching device second embodiment high-level schematic functional block diagram of WIFI module mode of operation of the present invention.
Realization, functional characteristics and the advantage of purpose of the embodiment of the present invention will be done furtherly referring to the drawings in conjunction with the embodiments It is bright.
Embodiment
Technical scheme is further illustrated below in conjunction with Figure of description and specific embodiment.It should be appreciated that this The specific embodiment of place description is not intended to limit the present invention only to explain the present invention.
The embodiments of the invention provide a kind of switching method first embodiment of WIFI module mode of operation;As shown in figure 1, The switching method of WIFI module mode of operation of the present invention comprises the following steps:
Step S01, client mode is enabled in the WIFI module of terminal after electricity, whether detection terminal is stored with hotspot Accounts information;If it is not, then perform step S02;If so, then perform step S03;
Step S02, WIFI module is switched into hotspot pattern by client mode;
In the present embodiment, in the WIFI module in terminal after electricity, the mode of operation for giving tacit consent to entrance is client mode, and with Client mode works.While WIFI patterns are worked with client mode, in the memory of detection terminal, if prestore There is the accounts information of hotspot;The accounts information of the hotspot includes:The hotspot name of hotspot and this is wireless The connection password of focus.
When WIFI module detects that terminal does not store the accounts information of hotspot, WIFI module will switch itself Mode of operation, the mode of operation of itself is switched into hotspot pattern by client mode.
Step S03, scan in preset range and whether there is available hotspot signal;If in the absence of available wireless heat Point signal, then perform step S02;If available hotspot signal be present, step S04 is performed;
When WIFI module detects that terminal is previously stored with the accounts information of hotspot, the default model of WIFI module scanning It whether there is available hotspot signal in enclosing;Wherein, WIFI module being can be understood as in the preset range can scan The ultimate range scope of the hotspot arrived.In WIFI module scanning preset range the such as WIFI module it is recognizable near away from After interior, the hotspot signal that can be used is not scanned, i.e., is not present in WIFI module scanning preset range available Hotspot signal, then WIFI module the mode of operation of itself is switched into hotspot pattern by client mode.
Step S04, attempt to log in the hotspot signal using the accounts information of storage;If being capable of successful log Hotspot corresponding to the hotspot signal, then perform step S05;If it is unable to hotspot signal pair described in successful log The hotspot answered, then perform step S02, WIFI module is switched into hotspot pattern by client mode;
Step S05, communicated according to the preset service platform information of storage with corresponding service platform.
In WIFI module scanning preset range the such as WIFI module it is recognizable near in distance after, scanning has been arrived can be with Available hotspot signal be present in the hotspot signal used, i.e. WIFI module scanning preset range, then WIFI module Attempt to log in corresponding to the available hotspot signal scanned wirelessly using the accounts information of the hotspot prestored Focus.
WIFI module judges whether can successfully login to using accounts information corresponding to the hotspot prestored State the available hotspot scanned;If accounts information corresponding to the hotspot stored can be utilized(For example store Hotspot name and connection password)Above-mentioned available hotspot is logged in, i.e. the WIFI module can succeed what is arrived with above-mentioned scanning Available hotspot signal is attached, then WIFI module is according to the preset service platform information prestored and corresponding clothes Business platform is communicated.
In the embodiment of the present invention, the service platform can be understood as providing equipment remote management and the server of control is hard Part and the application program for realizing corresponding function, the service platform both can be linked into internet the publicly-owned service of offer it is flat Privately owned or internal services platform is provided in platform or LAN.The service platform information can be understood as:WIFI Information needed for module Connection Service platform and/or acquisition related service, such as:The domain name of service platform, IP address, port Number, login account, login password, connected mode(Such as short connection or long connection), the information such as AES and public key.It is of the invention real Example is applied to the specific included content of the service platform information without exhaustive one by one, those skilled in the art can manage Solution, the service platform information can carry out concrete configuration, the present embodiment pair according to actual use situation and concrete application scene The particular content of the service platform information does not limit.
In a preferred embodiment, carry can be set in the terminal of above-mentioned WIFI module with remote control and Display device such as indicator lamp corresponding to local control;Such as when WIFI module communicates with service platform normal, WIFI module energy When remote control is enough provided, indicator lamp corresponding to remote control is lighted;When WIFI module and service platform communication failure, WIFI moulds When block provides local control, indicator lamp corresponding to local control is lighted.
Whether acquiescence starts client mode after electricity in WIFI module of the embodiment of the present invention, and be stored with correspondingly according to terminal Information and WIFI module working condition, reached the beneficial effect of intelligent switching WIFI module mode of operation, avoided use The troublesome operation of family manual switching WIFI module mode of operation, the convenience that WIFI module uses is improved, reduces WIFI moulds The complexity and difficulties that block uses.
The embodiment of the present invention additionally provides a kind of switching method second embodiment of WIFI module mode of operation, the present embodiment Difference with embodiment described in Fig. 1 is to be led in WIFI module according to preset service platform information with corresponding service platform During letter, the mode of operation switching mode of WIFI module.
Based on the description of embodiment described in Fig. 1, as shown in Fig. 2 the switching method of WIFI module mode of operation of the present invention exists Embodiment described in Fig. 1 " step S05, is led to according to the preset service platform information prestored with corresponding service platform Also include after the step of letter ":
Step S06, detect WIFI module and service platform whether proper communication;If proper communication, then perform step S05, communicated with corresponding service platform according to the preset service platform information of storage, i.e., WIFI module continues with client Module is communicated with service platform;If can not proper communication, perform the step S02 of embodiment described in Fig. 1, by WIFI moulds Block switches to hotspot pattern by client mode.
In this example, communicated in WIFI module according to the preset service platform information prestored with service platform During, WIFI module identifies WIFI module in real time or according to prefixed time interval detection and the communications status of service platform With service platform whether in proper communication.When detecting WIFI module and service platform proper communication, WIFI module continue with Client mode is communicated with the service platform;When detecting that WIFI module is unable to proper communication with service platform, The mode of operation of itself is switched to hotspot pattern by WIFI module by client mode.
In the present embodiment, the communication failure of WIFI module and service platform mainly has following several situations:The first situation It is that WIFI module can not access hotspot network, so as to cause communication failure;Second of situation is that WIFI module to be connect The connection of the hotspot and internet that enter is broken down, so as to cause the communication failure of WIFI module;The third situation is net Network reason, such as DNS(Domain Name System, domain name system)Domain name mapping error, network interruption etc., so as to cause WIFI module can not access service platform;4th kind of situation be, delay machine, service routine of the abnormal such as server of the webserver goes out Mistake etc..Further, for the ease of system maintenance, for example user is facilitated to be carried out far using terminal corresponding to WIFI module Understand during process control and investigate failure cause, can be set in the terminal where WIFI module or WIFI module corresponding to show Showing device(Such as indicator lamp), for identifying or showing above-mentioned four kinds of common failure situations.
In a preferred embodiment, when WIFI module and service platform are unable to proper communication, by WIFI module Switching to hotspot pattern by client mode includes:
When first time failure occurs for the communication of WIFI module and service platform, WIFI module continues to attempt to and service platform Communication;If more than preset duration or attempt the number that is communicated with service platform and reach predetermined threshold value, the WIFI module and Service platform is still unable to proper communication, then WIFI module is switched into hotspot pattern by client mode.That is, similarly Reason, WIFI module is long interior between default, if the hotspot signal that can be accessed can not be searched;Or search available Hotspot signal, but continuous several times attempt can not sign in wireless network corresponding to the hotspot signal, then WIFI module just confirm with corresponding hotspot communication failure, at this time just hotspot pattern can be switched to by client mode.
WIFI module of the embodiment of the present invention detects the communication conditions with service platform, and is cut as needed by client mode Hotspot pattern is shifted to, improves the intelligent of WIFI module mode of operation switching.
The embodiment of the present invention additionally provides a kind of switching method 3rd embodiment of WIFI module mode of operation;The present embodiment Difference with embodiment described in Fig. 1, Fig. 2 is that the present embodiment describes, after WIFI module switches to hotspot pattern, how Client mode is switched to again.Other steps involved by switching method about WIFI module mode of operation of the embodiment of the present invention Suddenly, the description of corresponding embodiment is refer to, will not be repeated here.
Based on the description of embodiment described in Fig. 1 and Fig. 2, the present embodiment is retouched by taking the difference with embodiment described in Fig. 1 as an example State embodiment described in Fig. 3;As shown in figure 3, the switching method of WIFI module mode of operation of the present invention in step S02, by WIFI moulds Also include after the step of block switches to hotspot pattern by client mode:
Step S12, the switching condition triggering of mode of operation is identified, then WIFI module is switched into client by hotspot pattern End pattern.
, will when WIFI module identifies the switching condition triggering of mode of operation when WIFI module is operated in hotspot pattern The mode of operation of WIFI module switches to client mode by hotspot pattern.
In the present embodiment, WIFI module recognize mode of operation handover trigger instruction the step of include:
The more new command of the account information of the hotspot of WIFI module storage is received, or detects that WIFI module is deposited There is fresh information in the account information of the hotspot of storage, then identify the switching condition triggering of mode of operation;
The more new command of the preset service platform information of WIFI module storage is received, or detects that WIFI module stores Preset service platform information fresh information be present, then identify mode of operation switching condition triggering;
When receiving the operational order of operation client mode, then the switching condition triggering of mode of operation is identified;
When detecting hot spot networks corresponding to no client access WIFI module, WIFI module is detected according to predetermined period Whether recover normal with the communications status of service platform;Recover normal in the communications status for detecting WIFI module and service platform When, identify the switching condition triggering of mode of operation.
Certainly, can also be held during the handover trigger instruction of WIFI module identification mode of operation according to certain logical order OK, for example WIFI module is when hotspot pattern is run, if the account information of hotspot corresponding to WIFI module has renewal, Hotspot pattern is switched to client mode by WIFI module;If the account information of hotspot corresponding to WIFI module is without more Newly, then whether the service platform information detected in WIFI module has renewal, if the service platform information in WIFI module has renewal, Then hotspot pattern is switched to client mode by WIFI module;If the service platform information in WIFI module does not update, examine Survey the operational order for whether receiving operation client mode;If receive the operational order of operation client mode, WIFI Hotspot pattern is switched to client mode by module;If being not received by the operational order of operation client mode, identify Whether WIFI module currently has client access, if client accesses, WIFI module continues to work with hotspot pattern;If no Client access, then WIFI module according to prefixed time interval detection service platform communications status, if the communication of service platform State recovers normal, then hotspot pattern is switched to client mode by WIFI module, and WIFI module provides normal radio communication Function;If the communications status of service platform does not recover normal, WIFI module continues to run with hotspot pattern.
In the present embodiment, the operational order for the operation client mode that WIFI module receives, it can be sent by control terminal, It can also be triggered by terminal itself in WIFI module place.
WIFI module of the embodiment of the present invention is switched to when the handover trigger for recognizing mode of operation instructs by hotspot pattern Client mode, improve flexibility and the convenience of the switching of WIFI module mode of operation;Further, WIFI module is in focus Still communication conditions of detection service platform during pattern, preferentially ensure that the remote control function of WIFI module, farthest full The foot demand of user's remote control.
The embodiment of the present invention additionally provides a kind of embodiment of switching device one of WIFI module mode of operation;As shown in figure 4, The switching device of WIFI module mode of operation of the present invention includes WIFI module 01, control module 02 and handover module 03, wherein controlling Molding block 02 and handover module 03 are arranged on inside WIFI module 01.It is of course also possible to by control module 02 and handover module 03 The outside of WIFI module 01 is arranged on, the present embodiment is to control module 02 and handover module 03 and the logical place of WIFI module 01 Relation does not limit.
As shown in figure 4, in the switching device of the mode of operation of WIFI module 01 of the present invention, it is electric in the WIFI module 01 in terminal Afterwards, the mode of operation for giving tacit consent to entrance is client mode, and is worked with client mode.WIFI patterns are worked with client mode While, in the memory of the detection terminal of control module 02, if be previously stored with the accounts information of hotspot;It is described wireless The accounts information of focus includes:The connection password of the hotspot name of hotspot and the hotspot.
When control module 02 detects that terminal does not store the accounts information of hotspot, handover module 03 will switch The mode of operation of WIFI module 01, the mode of operation of WIFI module 01 is switched into hotspot pattern by client mode.
When control module 02 detects that terminal is previously stored with the accounts information of hotspot, control module scanning is default In the range of whether there is available hotspot signal;Wherein, control module being can be understood as in the preset range can sweep The ultimate range scope for the hotspot retouched.The such as WIFI module 01 can recognize that attached in control module scanning preset range After closely interior, control module 02 is without scanning to can be for the hotspot signal that WIFI module 01 uses, i.e. control module 02 scanning preset range in available hotspot signal is not present, then handover module 03 by the mode of operation of WIFI module 01 by Client mode switches to hotspot pattern.
Control module 02 scan such as WIFI module 01 in preset range it is recognizable near in distance after, scanning has been arrived can With the hotspot signal used, i.e., 01 available hotspot of WIFI module letter in control module scanning preset range be present Number, then control module is attempted to log in the available hotspot letter scanned using the accounts information of the hotspot prestored Hotspot corresponding to number.
Control module judges whether can successfully login to using accounts information corresponding to the hotspot prestored State the available hotspot scanned;If accounts information corresponding to the hotspot stored can be utilized(For example store Hotspot name and connection password)Above-mentioned available hotspot is logged in, i.e., WIFI module 01 can succeed sweeps with control module 02 The available hotspot signal retouched is attached, then WIFI module 01 according to the preset service platform information that prestores with Corresponding service platform is communicated.
In the embodiment of the present invention, the service platform can be understood as providing equipment remote management and the server of control is hard Part and the application program for realizing corresponding function, the service platform both can be linked into internet the publicly-owned service of offer it is flat Privately owned or internal services platform is provided in platform or LAN.The service platform information can be understood as:WIFI Information needed for the Connection Service platform of module 01 and/or acquisition related service, such as:The domain name of service platform, IP address, port Number, login account, login password, connected mode(Such as short connection or long connection), the information such as AES and public key.It is of the invention real Example is applied to the specific included content of the service platform information without exhaustive one by one, those skilled in the art can manage Solution, the service platform information can carry out concrete configuration, the present embodiment pair according to actual use situation and concrete application scene The particular content of the service platform information does not limit.
In a preferred embodiment, the switching device of the mode of operation of WIFI module 01 can be set as shown in Figure 5 There is the such as indicator lamp of display module 04 corresponding to remote control and local control;Such as when WIFI module 01 is flat with service When platform communication is normal, WIFI module 01 can provide remote control, display module 04 lights indicator lamp corresponding to remote control;When When WIFI module 01 provides local control with service platform communication failure, WIFI module 01, display module 04 lights local control Corresponding indicator lamp.
Whether acquiescence starts client mode after electricity in WIFI module of the embodiment of the present invention, and be stored with correspondingly according to terminal Information and WIFI module working condition, reached the beneficial effect of intelligent switching WIFI module mode of operation, avoided use The troublesome operation of family manual switching WIFI module mode of operation, the convenience that WIFI module uses is improved, reduces WIFI moulds The complexity and difficulties that block uses.
Referring once again to Fig. 4, Fig. 5, the description based on above example, WIFI module mode of operation of the embodiment of the present invention In switching device, the control module 02 is additionally operable to:Detect WIFI module 01 and service platform whether proper communication;In WIFI moulds When block 01 is with service platform proper communication, continue to be communicated with the service platform with client mode;
The handover module 03 is additionally operable to:When WIFI module 01 and service platform are unable to proper communication, by WIFI module 01 switches to hotspot pattern by client mode.
In this example, communicated in WIFI module 01 according to the preset service platform information prestored with service platform During, control module 02 identifies WIFI in real time or according to prefixed time interval detection and the communications status of service platform Whether module 01 is with service platform in proper communication..
When control module 02 detects WIFI module 01 with service platform proper communication, WIFI module 01 continues with client End pattern is communicated with the service platform;When control detects that WIFI module 01 is unable to proper communication with service platform, The mode of operation of WIFI module 01 is switched to hotspot pattern by handover module 03 by client mode.
In the present embodiment, WIFI module 01 and the communication failure of service platform mainly have following several situations:The first feelings Condition is that WIFI module 01 can not access hotspot network, so as to cause communication failure;Second of situation is WIFI module 01 The connection for the hotspot and internet to be accessed is broken down, so as to cause the communication failure of WIFI module 01;The third Situation is network reason, such as DNS(Domain Name System, domain name system)Domain name mapping error, network interruption etc., So as to cause WIFI module 01 can not access service platform;4th kind of situation be, the abnormal such as server of the webserver delay machine, Service routine error etc..Further, for the ease of system maintenance, for example user is facilitated using whole corresponding to WIFI module 01 Hold understanding when can not carry out remote control and investigate failure cause, can be at the end where WIFI module 01 or WIFI module 01 Display device corresponding to being set on end(Such as indicator lamp), for identifying or showing above-mentioned four kinds of common failure situations.
In a preferred embodiment, when WIFI module 01 and service platform are unable to proper communication, handover module WIFI module 01 is switched to hotspot pattern by 03 by client mode to be included:
When first time failure occurs for the communication of WIFI module 01 and service platform, WIFI module 01 is continued to attempt to and serviced Platform communication;If reach predetermined threshold value more than preset duration or the number for attempting to communicate with service platform, the WIFI moulds Block 01 is still unable to proper communication with service platform, and WIFI module 01 is switched to focus mould by handover module 03 by client mode again Formula.That is, similarly reason, in control module 02 is long between default, if can not search WIFI module 01 can connect The hotspot signal entered;Or control module 02 searches available hotspot signal, but WIFI module 01 is continuously more Secondary trial can not sign in wireless network corresponding to the hotspot signal, then handover module 03 just confirms WIFI module 01 With corresponding hotspot communication failure, at this time handover module 03 just the client mode of WIFI module 01 can be switched to heat Dot pattern.
WIFI module of the embodiment of the present invention detects the communication conditions with service platform, and is cut as needed by client mode Hotspot pattern is shifted to, improves the intelligent of WIFI module mode of operation switching.
Referring once again to Fig. 4, Fig. 5, the description based on above example, WIFI module mode of operation of the embodiment of the present invention In switching device, the handover module 03 is additionally operable to:Identify mode of operation switching condition triggering, then by WIFI module 01 by Hotspot pattern switches to client mode.
When WIFI module 01 is operated in hotspot pattern, handover module 03 identifies the switching condition triggering of mode of operation When, the mode of operation of WIFI module 01 is switched into client mode by hotspot pattern.
In the present embodiment, the handover trigger instruction that handover module 03 recognizes mode of operation includes:
The more new command of the account information of the hotspot of the storage of WIFI module 01 is received, or detects WIFI module There is fresh information in the account information of the hotspot of 01 storage, then handover module 03 identifies that the switching condition of mode of operation touches Hair;
The more new command of the preset service platform information of the storage of WIFI module 01 is received, or detects WIFI module 01 There is fresh information in the preset service platform information of storage, then handover module 03 identifies the switching condition triggering of mode of operation;
When receiving the operational order of operation client mode, then handover module 03 identifies the switching condition of mode of operation Triggering;
When detecting hot spot networks corresponding to no client access WIFI module 01, WIFI moulds are detected according to predetermined period Whether the communications status of block 01 and service platform recovers normal;Detecting that WIFI module 01 and the communications status of service platform are extensive When multiple normal, handover module 03 identifies the switching condition triggering of mode of operation.
Certainly, can also be according to certain during the handover trigger instruction of the identification of handover module 03 mode of operation of WIFI module 01 Logical order performs, for example WIFI module 01 is when hotspot pattern is run, if the account of hotspot corresponding to WIFI module 01 Number information has renewal, then WIFI module 01 is switched to client mode by handover module 03 by hotspot pattern;If WIFI module 01 The account information of corresponding hotspot does not update, then whether the service platform information detected in WIFI module 01 has renewal, If the service platform information in WIFI module 01 has renewal, WIFI module 01 is switched to visitor by handover module 03 by hotspot pattern Family end pattern;If the service platform information in WIFI module 01 does not update, detect whether to receive operation client mode Operational order;If receiving the operational order of operation client mode, handover module 03 is by WIFI module 01 by focus mould Formula switches to client mode;If being not received by the operational order of operation client mode, identification WIFI module 01 is current Whether client access is had, if client accesses, WIFI module 01 continues to work with hotspot pattern;If terminated without client Enter, then WIFI module 01 according to prefixed time interval detection service platform communications status, if the communications status of service platform is extensive Multiple normal, then WIFI module 01 is switched to client mode by handover module 03 by hotspot pattern, and WIFI module 01 provides normally Radio communication function;If the communications status of service platform does not recover normal, WIFI module 01 continues to transport with hotspot pattern OK.
In the present embodiment, the operational order for the operation client mode that WIFI module 01 receives, it can be sent out by control terminal Send, can also be triggered by terminal itself in the place of WIFI module 01.
WIFI module of the embodiment of the present invention is switched to when the handover trigger for recognizing mode of operation instructs by hotspot pattern Client mode, improve flexibility and the convenience of the switching of WIFI module mode of operation;Further, WIFI module is in focus Still communication conditions of detection service platform during pattern, preferentially ensure that the remote control function of WIFI module, farthest full The foot demand of user's remote control.
It should be noted that herein, term " comprising ", "comprising" or its any other variant are intended to non-row His property includes, so that process, method, article or device including a series of elements not only include those key elements, and And also include the other element being not expressly set out, or also include for this process, method, article or device institute inherently Key element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that including this Other identical element also be present in the process of key element, method, article or device.
The embodiments of the present invention are for illustration only, do not represent the quality of embodiment.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can add the mode of required general hardware platform to realize by software, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on such understanding, technical scheme is substantially done to prior art in other words Going out the part of contribution can be embodied in the form of software product, and the computer software product is stored in a storage medium (Such as ROM/RAM, magnetic disc, CD)In, including some instructions are causing a station terminal equipment(It can be mobile phone, computer, take Business device, or network equipment etc.)Perform the method described in each embodiment of the present invention.
The preferred embodiments of the present invention are the foregoing is only, not thereby limit its scope of the claims, it is every to utilize the present invention The equivalent structure or equivalent flow conversion that specification and accompanying drawing content are made, directly or indirectly it is used in other related technology necks Domain, it is included within the scope of the present invention.

Claims (8)

1. a kind of switching method of WIFI module mode of operation, it is characterised in that comprise the following steps:
Client mode is enabled in the WIFI module of terminal after electricity, whether detection terminal is stored with the accounts information of hotspot;
When terminal does not store the accounts information of hotspot, WIFI module is switched into hotspot pattern by client mode;
When terminal storage has the accounts information of hotspot, believe in scanning preset range with the presence or absence of available hotspot Number;
If available hotspot signal is not present to preset range is interior in scanning, WIFI module is switched to by client mode Hotspot pattern;
Available hotspot signal be present if scanning into preset range, attempt to log in using the accounts information of storage Hotspot corresponding to the hotspot signal;Fail log in the hotspot when, by WIFI module by client Pattern switching is held to hotspot pattern;In hotspot described in successful log, according to storage preset service platform information with it is right The service platform answered is communicated;
Also include after described the step of WIFI module is switched into hotspot pattern by client mode:
The switching condition triggering of mode of operation is identified, then WIFI module is switched into client mode by hotspot pattern;
The step of handover trigger for recognizing mode of operation instructs includes:
The more new command of the preset service platform information of WIFI module storage is received, or detects the pre- of WIFI module storage If service platform information has fresh information, then the switching condition triggering of mode of operation is identified;Wherein,
Performed during the handover trigger instruction of WIFI module identification mode of operation according to default logical order, the logical order For:
If the account information of hotspot corresponding to WIFI module has renewal, hotspot pattern is switched to client by WIFI module End pattern;If the account information of hotspot corresponding to WIFI module does not update, the service platform in WIFI module is detected Whether information has renewal, if the service platform information in WIFI module has renewal, hotspot pattern is switched to visitor by WIFI module Family end pattern;If the service platform information in WIFI module does not update, detect whether to receive operation client mode Operational order;If receiving the operational order of operation client mode, hotspot pattern is switched to client mould by WIFI module Formula;If being not received by the operational order of operation client mode, whether identification WIFI module currently has client access, if Client accesses, then WIFI module continues to work with hotspot pattern;If without client access, WIFI module according to it is default when Between be spaced the communications status of detection service platform, if the communications status of service platform recovers normal, WIFI module is by focus mould Formula switches to client mode, and WIFI module provides normal radio communication function;If the communications status of service platform is not extensive Multiple normal, then WIFI module continues to run with hotspot pattern.
2. the method as described in claim 1, it is characterised in that it is described according to the preset service platform information prestored with it is right Also include after the step of service platform answered is communicated:
Detect WIFI module and service platform whether proper communication;
In WIFI module and service platform proper communication, continue to be communicated with the service platform with client mode;
When WIFI module and service platform are unable to proper communication, WIFI module is switched into hotspot pattern by client mode.
3. method as claimed in claim 2, it is characterised in that described to be unable to proper communication in WIFI module and service platform When, the step of WIFI module is switched into hotspot pattern by client mode, includes:
When first time failure occurs for the communication of WIFI module and service platform, continue to attempt to communicate with service platform;
If reach predetermined threshold value more than preset duration or the number for attempting to communicate with service platform, the WIFI module and clothes Business platform is still unable to proper communication, then WIFI module is switched into hotspot pattern by client mode.
4. the method as described in claim 1, it is characterised in that the step of handover trigger for recognizing mode of operation instructs Including:
The more new command of the account information of the hotspot of WIFI module storage is received, or detects WIFI module storage There is fresh information in the account information of hotspot, then identify the switching condition triggering of mode of operation;
When receiving the operational order of operation client mode, then the switching condition triggering of mode of operation is identified;
When detecting hot spot networks corresponding to no client access WIFI module, WIFI module and clothes are detected according to predetermined period Whether the communications status of business platform recovers normal;When the communications status for detecting WIFI module and service platform recovers normal, Then identify the switching condition triggering of mode of operation.
5. a kind of switching device of WIFI module mode of operation, including WIFI module;Characterized in that, also include control module and Handover module;
The control module is used for, and after enabling client mode after electricity in the WIFI module of terminal, whether detection terminal stores There is the accounts information of hotspot;
The handover module is used for, when terminal does not store the accounts information of hotspot, by WIFI module by client mould Formula switches to hotspot pattern;
Whether the control module is additionally operable to, when terminal storage has the accounts information of hotspot, scan and deposited in preset range In available hotspot signal;Available hotspot signal be present if scanning into preset range, using the institute of storage Accounts information is stated to attempt to log in hotspot corresponding to the hotspot signal;And in hotspot described in successful log, Communicated according to the preset service platform information of storage with corresponding service platform;
The handover module is additionally operable to, if available hotspot signal is not present to preset range is interior in scanning, by WIFI moulds Block switches to hotspot pattern by client mode;And available hotspot letter in WIFI module scanning to preset range be present Number, and attempt to log in hotspot corresponding to the hotspot signal and failing using the accounts information of storage When logging in the hotspot, WIFI module is switched into hotspot pattern by client mode;
The handover module is additionally operable to:
The switching condition triggering of mode of operation is identified, then WIFI module is switched into client mode by hotspot pattern;
The handover module is additionally operable to:
The more new command of the preset service platform information of WIFI module storage is received, or detects the pre- of WIFI module storage If service platform information has fresh information, then the switching condition triggering of mode of operation is identified;Wherein,
Performed during the handover trigger instruction of WIFI module identification mode of operation according to default logical order, the logical order For:
If the account information of hotspot corresponding to WIFI module has renewal, hotspot pattern is switched to client by WIFI module End pattern;If the account information of hotspot corresponding to WIFI module does not update, the service platform in WIFI module is detected Whether information has renewal, if the service platform information in WIFI module has renewal, hotspot pattern is switched to visitor by WIFI module Family end pattern;If the service platform information in WIFI module does not update, detect whether to receive operation client mode Operational order;If receiving the operational order of operation client mode, hotspot pattern is switched to client mould by WIFI module Formula;If being not received by the operational order of operation client mode, whether identification WIFI module currently has client access, if Client accesses, then WIFI module continues to work with hotspot pattern;If without client access, WIFI module according to it is default when Between be spaced the communications status of detection service platform, if the communications status of service platform recovers normal, WIFI module is by focus mould Formula switches to client mode, and WIFI module provides normal radio communication function;If the communications status of service platform is not extensive Multiple normal, then WIFI module continues to run with hotspot pattern.
6. device as claimed in claim 5, it is characterised in that the control module is additionally operable to:
Detect WIFI module and service platform whether proper communication;In WIFI module and during service platform proper communication, continue with Client mode is communicated with the service platform;
The handover module is additionally operable to:When WIFI module and service platform are unable to proper communication, by WIFI module by client Pattern switching is to hotspot pattern.
7. device as claimed in claim 6, it is characterised in that the handover module is additionally operable to:
When first time failure occurs for the communication of WIFI module and service platform, WIFI module continues to attempt to lead to service platform Letter;If reach predetermined threshold value more than preset duration or the number for attempting to communicate with service platform, the WIFI module and clothes Business platform is still unable to proper communication, then WIFI module is switched into hotspot pattern by client mode.
8. device as claimed in claim 5, it is characterised in that the handover module is additionally operable to:
The more new command of the account information of the hotspot of WIFI module storage is received, or detects WIFI module storage There is fresh information in the account information of hotspot, then identify the switching condition triggering of mode of operation;
When receiving the operational order of operation client mode, then the switching condition triggering of mode of operation is identified;
When detecting hot spot networks corresponding to no client access WIFI module, WIFI module and clothes are detected according to predetermined period Whether the communications status of business platform recovers normal;When the communications status for detecting WIFI module and service platform recovers normal, Then identify the switching condition triggering of mode of operation.
CN201410156002.XA 2014-04-17 2014-04-17 The switching method and device of WIFI module mode of operation Active CN103945499B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410156002.XA CN103945499B (en) 2014-04-17 2014-04-17 The switching method and device of WIFI module mode of operation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410156002.XA CN103945499B (en) 2014-04-17 2014-04-17 The switching method and device of WIFI module mode of operation

Publications (2)

Publication Number Publication Date
CN103945499A CN103945499A (en) 2014-07-23
CN103945499B true CN103945499B (en) 2017-11-14

Family

ID=51192922

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410156002.XA Active CN103945499B (en) 2014-04-17 2014-04-17 The switching method and device of WIFI module mode of operation

Country Status (1)

Country Link
CN (1) CN103945499B (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104093194B (en) * 2014-07-25 2018-03-16 Tcl通讯(宁波)有限公司 A kind of mobile terminal intelligent switch WLAN method and system
AU2014407025B2 (en) * 2014-09-22 2018-05-17 Huawei Technologies Co., Ltd. Processing method and apparatus for service signal and customer premise equipment
CN104853373B (en) * 2015-05-04 2019-03-29 海信集团有限公司 A kind of Working mode switching method and device of wireless module
CN105722121B (en) * 2016-03-30 2019-03-22 中国联合网络通信集团有限公司 Gateway Working mode switching method and device, gateway, wearable device
CN106506862B (en) * 2016-12-07 2019-05-10 Oppo广东移动通信有限公司 A kind of working mode of mobile terminal switching method and mobile terminal
CN108243108A (en) * 2016-12-26 2018-07-03 南宁富桂精密工业有限公司 Working mode switching method and router
CN107171824B (en) * 2017-03-23 2020-11-13 捷开通讯(深圳)有限公司 Wifi disconnection processing method of terminal, terminal and storage device
CN107040425B (en) * 2017-06-02 2020-02-21 广东汇泰龙科技有限公司 Method for automatically identifying network environment to switch working modes and intelligent cloud lock
CN111836339B (en) * 2019-04-15 2023-04-07 杭州海康威视数字技术股份有限公司 Network equipment
CN111459372A (en) * 2020-04-01 2020-07-28 海信视像科技股份有限公司 Network list refreshing display method and display equipment
CN116016143B (en) * 2022-12-14 2023-11-21 广东保伦电子股份有限公司 Internet of things equipment debugging method and Internet of things equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103428799A (en) * 2012-05-16 2013-12-04 海尔集团公司 WIFI network module configuring method
CN103442410A (en) * 2013-08-27 2013-12-11 上海汉枫电子科技有限公司 Network breakdown re-access method based on internet of things embedded Wi-Fi module
CN103529793A (en) * 2013-10-18 2014-01-22 中山司南物联网科技有限公司 Control system and control method for Internet of things based on STA (Station) mode and AP (Access Point) mode of WIFI (Wireless Fidelity)

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101895962A (en) * 2010-08-05 2010-11-24 华为终端有限公司 Wi-Fi (wireless fidelity) access method, access point and Wi-Fi access system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103428799A (en) * 2012-05-16 2013-12-04 海尔集团公司 WIFI network module configuring method
CN103442410A (en) * 2013-08-27 2013-12-11 上海汉枫电子科技有限公司 Network breakdown re-access method based on internet of things embedded Wi-Fi module
CN103529793A (en) * 2013-10-18 2014-01-22 中山司南物联网科技有限公司 Control system and control method for Internet of things based on STA (Station) mode and AP (Access Point) mode of WIFI (Wireless Fidelity)

Also Published As

Publication number Publication date
CN103945499A (en) 2014-07-23

Similar Documents

Publication Publication Date Title
CN103945499B (en) The switching method and device of WIFI module mode of operation
CN102833813B (en) Streamed data is to the method for WLAN (wireless local area network), terminal and the network equipment
CN102045783B (en) Apparatus and method for connecting peer to peer using wlan
CN104885518B (en) Method and apparatus in radio lan for distinguishing security configuration
CN106572508B (en) A kind of method, apparatus and base station that terminal device is switched to Target cell
JP5170105B2 (en) Mobile communication system location / route registration update procedure
US10159019B2 (en) Improving overall network performance and/or overall quality of service of user equipments in a mobile communication network
CN102754480B (en) Switching controls
CN110225492A (en) A kind of implementation method and device for cloud speaker distribution
CN101959321A (en) Scene mode switching method based on mobile phone WIFI and mobile phone
EP2109276B1 (en) A self-adaptive communication system, communication terminal and communication method
KR20120078664A (en) Terminal
CN105072613A (en) Wireless network system and wireless network access method
CN103888983B (en) Terminal WIFI mode of operations automatic switching method and system
CN108770008A (en) Configuration method, device and the storage medium that household appliance networks
CN104980965A (en) Wireless system with wired fault self-restoring function and self-restoring method thereof
CN105636159A (en) Configuration method and apparatus for connection between electrical appliance and wireless router and mobile communication terminal
CN108781473A (en) A kind of method and apparatus of the shared file between different terminals
CN107613471A (en) A kind of WIFI hot spot information-pushing method, method of reseptance and device
CN104105227A (en) A WIFI module work method and device based on different application scenarios
CN107769978A (en) Management method, system, router and the server that a kind of terminal device networks
EP3114887B1 (en) Determination method and corresponding terminal, computer program product and storage medium
CN104837175A (en) Wireless router access control method and device
EP2262316B1 (en) Handover control
CN103841537A (en) Control system and method using family gateway to deploy WLAN metropolitan area network

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