The content of the invention
A kind of method that the embodiment of the present invention provides wireless router and its switch communication mode, need not enter every time
Configuration interface goes to configure, and is automatically switched according to user demand, improves communication pattern switching efficiency.
In a first aspect, the embodiment of the present invention provides a kind of method of wireless router switch communication mode, including:
Receive switching command;
It is non-encrypted switching command or encryption switching command to judge the switching command;
When the switching command is non-encrypted switching command, then judge that current communication mode is encrypted state or non-encrypted
State:If encrypted state, then current communication mode is switched to non-encrypted state;
When the switching command is encryption switching command, then it is encrypted state or non-encrypted shape to judge current communication mode
State if non-encrypted state, then obtains Crypted password, and according to the Crypted password of acquisition, current communication mode is switched to and is added
Close state.
With reference to first aspect, the first possible embodiment, this method further include:
When receiving the Crypted password of non-empty and password modification instruction, it is close to update encryption using the Crypted password for receiving non-empty
Code;
It is close using the empty Crypted password update encryption received when receiving empty Crypted password and password modification instruction
Code alternatively, instruction needs to input Crypted password, when receiving the Crypted password of non-empty, utilizes the Crypted password of the non-empty received
Update the Crypted password.
With reference to first aspect, using the Crypted password of acquisition, current communication mode is cut for second of possible embodiment
Encrypted state is changed to, including:
When getting empty Crypted password, current communication mode is switched to the encryption shape that need not input Crypted password
State;Or
When getting empty Crypted password, instruction needs to re-enter Crypted password, when receiving the Crypted password of non-empty,
The Crypted password of non-empty is preserved, and using the Crypted password of non-empty, current communication mode is switched to encrypted state.
With reference to first aspect, the third possible embodiment by status indicator, determines current communication mode for encryption
State is non-encrypted state;
Wherein, the Crypted password is initially non-empty, and initial communication pattern is encrypted state, and initial status indicator is
The mark of encrypted state, alternatively, the Crypted password is initially empty, initial communication module is non-encrypted state, initial shape
State is identified as the mark of non-encrypted state;
Wherein, after each switch communication mode, status indicator is updated according to the communication pattern after switching.
With reference to first aspect, the 4th kind of possible embodiment, this method further include:
It opens the first indicator light and closes the second indicator light, instruction current communication mode is non-encrypted state, opens second
Indicator light and the first indicator light of closing, instruction current communication mode are encrypted state;Or
By two different conditions of an indicator light, instruction current communication mode is non-encrypted state or encrypted state;
Or
By showing that different conditions identify on software interface, instruction current communication mode is non-encrypted state or encryption shape
State.
Second aspect, the embodiment of the present invention provide a kind of wireless router, including:
Order receiving unit, for receiving switching command;
Judging unit, for judging that the switching command is non-encrypted switching command or encryption switching command;
First switch unit is non-encrypted switching command for working as the switching command, and it is to add to judge current communication mode
Current communication mode if encrypted state, is then switched to non-encrypted state by close state or non-encrypted state;
Second switch unit is encryption switching command for working as the switching command, and it is encryption to judge current communication mode
State or non-encrypted state if non-encrypted state, then obtain Crypted password, and using the Crypted password obtained, it will be current
Communication pattern is switched to encrypted state.
With reference to second aspect, the first possible embodiment further includes:
First password updating block, during for receiving the Crypted password of non-empty and password modification instruction, using receiving non-empty
Crypted password update the Crypted password;
Second password update unit, during for receiving empty Crypted password and password modification instruction, utilize receive it is empty
Crypted password updates the Crypted password, alternatively, instruction needs to re-enter Crypted password, when the Crypted password for receiving non-empty
When, update the Crypted password using the Crypted password of the non-empty received.
With reference to second aspect, second of possible embodiment, the second switch unit, ought using the Crypted password obtained
Preceding communication pattern is switched to encrypted state, including:
When getting empty Crypted password, current communication mode is switched to the encryption shape that need not input Crypted password
State;Or
When getting empty Crypted password, instruction needs to re-enter Crypted password, when receiving the Crypted password of non-empty,
The Crypted password of non-empty is preserved, and using the Crypted password of non-empty, current communication mode is switched to encrypted state.
With reference to second aspect, the third possible embodiment, the switch unit of the first switch unit/second passes through state
Mark, it is encrypted state/non-encrypted state to determine current communication mode;
Wherein, the Crypted password is initially non-empty, and initial communication pattern is encrypted state, and initial status indicator is
The mark of encrypted state, alternatively, the Crypted password is initially empty, initial communication module is non-encrypted state, initial shape
State is identified as the mark of non-encrypted state;
Wherein, after each switch communication mode, status indicator is updated according to the communication pattern after switching.
With reference to second aspect, the 4th kind of possible embodiment further includes:
State indication unit, for opening the first indicator light and closing the second indicator light, instruction current communication mode is non-
Encrypted state opens the second indicator light and closes the first indicator light, and instruction current communication mode is encrypted state;Or pass through one
Two different conditions of a indicator light, instruction current communication mode are non-encrypted state or encrypted state;Or by software
Show that different conditions identify on interface, instruction current communication mode is non-encrypted state or encrypted state.
Using the method for wireless router provided by the invention and its switch communication mode, have the advantages that:With
Family under different scenes, can be chosen at random according to actual conditions network be encryption or do not encrypt, need not every time into
Enter configuration interface to go to configure;Never encrypted state is switched to encrypted state, it is no longer necessary to be manually entered, can arrive designated position automatically
Available password is transferred, therefore improves the communication pattern switching efficiency of wireless router.
When it is implemented, the Crypted password of designated position is either one or more, if one, then every time
Using the password during encryption, if multiple, can be chosen by setting rule one of as using password, equally, user
It, can be by the way that instruction be instructed to change the Crypted password specified during modification.In general, a Crypted password can meet the need of user
It asks.
Wireless router of the embodiment of the present invention provides cryptographic state on software and preserves function and available password preservation work(
Can, wherein:
1) cryptographic state preserves function
Wireless router preserve it is above-mentioned be used for indicating the status indicator that is currently encrypted state or non-encrypted state, can be with
Judge to use when facilitating instruction user's current communication mode and switching.
If specific bit is equipped with the Crypted password of non-empty when router dispatches from the factory, i.e. the initial encryption password of designated position is non-
Sky, then initial communication pattern is encrypted state, and initial status indicator is the mark of encrypted state.
If the Crypted password of designated position is sky when router dispatches from the factory, i.e., the initial encryption password of designated position is sky,
Initial communication pattern is non-encrypted state, and initial status indicator is the mark of non-encrypted state.
After each switch communication mode, status indicator is updated to the status indicator after switching by wireless router.
Optionally, wireless router of the embodiment of the present invention determines to be currently encrypted state or non-encrypted by status indicator
State.
2) function can be preserved with password
Wireless router the designated position of storage preserve Crypted password, the password by router to network encryption when make
Password, so as to be used when conveniently automatically switching into encrypted state and change Crypted password according to user demand.
Specific bit is equipped with the initial encryption password of the Crypted password of non-empty, i.e. designated position when if wireless router dispatches from the factory
For non-empty.
If the Crypted password of designated position is sky when wireless router dispatches from the factory, i.e. the initial encryption password of designated position is
It is empty.
When wireless router receives Crypted password and password input by user modification instruction, the encryption that is newly inputted using user
The Crypted password of password update designated position.
The software interface or hardware button of " cipher mode quickly selects ", wireless routing are provided the user in the present embodiment
Device receives the mode of non-encrypted switching command/encryption switching command of user, can be, but not limited in the following way:
1) wireless router receives encryption switching command/non-encrypted switching command that user is inputted by software interface
2) wireless router receives encryption switching command/non-encrypted switching command that user is inputted by hardware button.
User chooses at random " encryption " and " not encrypting " by hardware button, need not enter any software interface.Hardware
The realization method of button can pass through the various Combination Designs such as button, indicator light, silk-screen.
Equally, wireless router of the embodiment of the present invention can be current logical by software interface and/or the instruction of hardware indicator light
Letter pattern, therefore either software interface or hardware, user not only can be seen that current communication mode, but also can trigger other one
A cryptographic state works.
Optionally, when wireless router indicates current communication mode by hardware indicator light, by opening an indicator light A
Another indicator light B is closed, the instruction currently running communication pattern of wireless router is non-encrypted communication modes, passes through open instruction
Lamp B closes indicator light A, and the instruction currently running communication pattern of wireless router is encrypted communication modes;Alternatively, pass through a finger
Show two different conditions of lamp, it is non-encrypted communication modes and encryption to indicate respectively the currently running communication pattern of wireless router
Communication pattern;Alternatively, showing different status indicators on software interface, the currently running communication of wireless router is indicated respectively
Pattern is non-encrypted communication modes or encrypted communication modes.
Optionally, wireless router receives encryption switching command/non-encrypted switching life that user is inputted by hardware button
When making, it may be employed but be not limited to following set-up mode:
One is stirred button+software interface instruction communication pattern:Button is toggled it to while for " encryption ", toggles it to other one
Side is " not encrypting ", and wireless router, with different status indicators, indicates current communication mode on software interface;
+ two status indicator lamps of one button:It clicks button and switches a communication pattern, an indicator light corresponds to instruction
One communication pattern, the indicator light of corresponding communication pattern brighten;
+ one status indicator lamp of one button:It clicks button and switches a state, different communication modes pass through indicator light
Different colours show, such as:Green is represented and not encrypted, and red represents encryption.It is of course also possible to it by the bright of instruction and implies
Show different communication patterns.
If current password of embodiment of the present invention state is " encryption ", either by software interface or hardware button,
As long as triggering " not encrypting " is ordered successfully, then wireless router cancels network cipher automatically, while cryptographic state is revised as " no
Encryption ".But the password in " can use password " remains unchanged.
If wireless router current state is " not encrypting ", either by software interface or hardware button, as long as
Triggering " encryption " is ordered successfully, then wireless router calls automatically can use the password in password to network encryption.Without user's hand
Dynamic input.Simultaneously cryptographic state is revised as " encrypting ".
The software interface mentioned in the present embodiment, the software interface including all software forms, such as WEB UI webpages version,
WEB UI mobile phones version, App application interfaces etc..
Below for the Crypted password of designated position two kinds of optional embodiments are provided for empty situation.
Mode one, it is empty situation to allow in Crypted password, and non-encrypted state is switched to encrypted state
That is encrypted state display encryption, but password is actual for sky.
When wireless router gets the Crypted password of sky to designated position, current communication mode is switched to need not be defeated
Enter the encrypted communication modes of Crypted password.
When wireless router receives the Crypted password of sky/non-empty and password modification instruction, adding for the sky/non-empty received is utilized
The Crypted password of close password update designated position.
Mode two does not allow, in the case where Crypted password is sky, non-encrypted state to be switched to encrypted state
When i.e. available password is empty, communication pattern cannot be encryption.
Optionally, when wireless router receives the Crypted password of non-empty and password modification instruction, the non-empty received is utilized
Crypted password updates the Crypted password of designated position;
When wireless router receives empty Crypted password and password modification instruction, instruction needs to re-enter Crypted password,
When receiving the Crypted password of non-empty, the Crypted password of the Crypted password update designated position of the non-empty received is utilized.
Optionally, wireless router to designated position get empty Crypted password when, further comprise:
Instruction needs to re-enter Crypted password;
When receiving the Crypted password of non-empty, the Crypted password of non-empty is saved in designated position, and adding using non-empty
Current communication mode is switched to encrypted state by password
On software is realized, wireless router can prompt user's " encryption " that order is invalid, and so only give " can be with close by user
Code " assigns the value of a non-empty, which can just come into force.Specific prompting mode is unlimited, such as:Encryption is clicked on, prompts to use
The currently available password in family is sky, please input password.
I.e. if the password of non-empty is revised as B by A, if B is sky, it cannot be sky to prompt user password, further,
If wanting stateful indicator light on fuselage, no matter how user goes triggering encryption key.Then status indicator lamp is shown as not always
Encrypted state.
The method preferred embodiment of wireless router switch communication mode of the present invention is given below.
During wireless router product export, the non-empty initial password of acquiescence is equipped in specific bit, can be first with password at this moment
Beginning password, communication pattern are encryption.
User triggers non-encrypted state switch command, then network cipher comes into force (for example, restarting) for empty instruction.It is close
Code state is then shown as not encrypting.
User triggers encryption order again, then wireless router calls the value that can be used in password automatically, close as network
Code comes into force, while cryptographic state is shown as encrypting.
If user has modified network cipher and is non-null value.New password so can be automatically updated into password.
If allowing the refined net in a state that available password is sky, if the encryption that wireless router receives sky is close
When code and password modification instruction, the Crypted password of the empty Crypted password update designated position received is utilized.
When wireless router gets the Crypted password of sky to designated position, current communication mode is switched to need not be defeated
Enter the communication pattern of Crypted password.
If not allowing to encrypt in a state that available password is sky, wireless router to designated position gets empty add
During password, instruction needs to re-enter Crypted password;When receiving the Crypted password of non-empty, the Crypted password of non-empty is preserved
To designated position, and using the Crypted password of non-empty, current communication mode is switched to encrypted state.Receive empty Crypted password
And during password modification instruction, instruction needs to re-enter Crypted password, non-using what is received when receiving the Crypted password of non-empty
The Crypted password of empty Crypted password update designated position.
Initial password without acquiescence when wireless router product appears on the scene can be empty with password, cryptographic state is not when initial
Encryption.
1) when available password is empty, when cryptographic state cannot be encryption, then:
When can be sky with password, software triggering encryption command expiration, first prompting can be empty with password, and user has to input
Non- null password, the triggering encrypted instruction of software can just come into force.Communication pattern is updated to encrypt.
When can be sky with password, hardware trigger encryption command expiration shows Product Status not encrypt, until system always
It can just come into force in the case of detecting available password non-empty.Communication pattern is updated to encrypt.
2) when under encrypted state, when password can be empty.Then:
When can be sky with password, triggering encryption order, wireless router directly cuts communication pattern without using Crypted password
Encrypted state is changed to, cryptographic state is updated to encrypt.
When wireless router receives the Crypted password of sky/non-empty and password modification instruction, adding for the sky/non-empty received is utilized
The Crypted password of close password update designated position.
When can be non-empty with password, triggering encryption order, system calls the value that can be used in password, as network cipher
It comes into force, cryptographic state is updated to encrypt.
For user under different scenes, it is " encryption " or " not encrypting " that network can be chosen at random according to actual conditions,
It need not go to configure into configuration interface every time.
Method provided in the present embodiment is suitable for any satisfaction " offer wireless network " and " network can lead to
Cross password access " all-network product.
A kind of wireless router provided in an embodiment of the present invention, as shown in Fig. 2, including:
Order receiving unit 201, for receiving switching command;
Judging unit 202, for judging that the switching command is non-encrypted switching command or encryption switching command;
First switch unit 203 is non-encrypted switching command for working as the switching command, judges that current communication mode is
Current communication mode if encrypted state, is then switched to non-encrypted state by encrypted state or non-encrypted state;
Second switch unit 204 is encryption switching command for working as the switching command, and it is to add to judge current communication mode
Close state or non-encrypted state if non-encrypted state, then obtain Crypted password, and using the Crypted password obtained, it ought
Preceding communication pattern is switched to encrypted state.
Optionally, which further includes:
First password updating block, during for receiving the Crypted password of non-empty and password modification instruction, using receiving non-empty
Crypted password update the Crypted password;
Second password update unit, during for receiving empty Crypted password and password modification instruction, utilize receive it is empty
Crypted password updates the Crypted password, alternatively, instruction needs to re-enter Crypted password, when the Crypted password for receiving non-empty
When, update the Crypted password using the Crypted password of the non-empty received.
Optionally, current communication mode is switched to encrypted state, is wrapped by the second switch unit using the Crypted password obtained
It includes:
When getting empty Crypted password, current communication mode is switched to the encryption shape that need not input Crypted password
State;Or
When getting empty Crypted password, instruction needs to re-enter Crypted password, when receiving the Crypted password of non-empty,
The Crypted password of non-empty is preserved, and using the Crypted password of non-empty, current communication mode is switched to encrypted state.
Optionally, the switch unit of the first switch unit/second by status indicator, determines current communication mode for encryption
State/non-encrypted state;
Wherein, the Crypted password is initially non-empty, and initial communication pattern is encrypted state, and initial status indicator is
The mark of encrypted state, alternatively, the Crypted password is initially empty, initial communication module is non-encrypted state, initial shape
State is identified as the mark of non-encrypted state;
Wherein, after each switch communication mode, status indicator is updated according to the communication pattern after switching.
Optionally, further include:
State indication unit, for opening the first indicator light and closing the second indicator light, instruction current communication mode is non-
Encrypted state opens the second indicator light and closes the first indicator light, and instruction current communication mode is encrypted state;Or pass through one
Two different conditions of a indicator light, instruction current communication mode are non-encrypted state or encrypted state;Or by software
Show that different conditions identify on interface, instruction current communication mode is non-encrypted state or encrypted state.
The embodiment of the present invention also provides a kind of wireless router, as shown in figure 3, including:
Processor 300, for receiving switching command;It is that non-encrypted switching command or encryption are cut to judge the switching command
Change order;When the switching command is non-encrypted switching command, then judge that current communication mode is encrypted state or non-encrypted
State:If encrypted state, then current communication mode is switched to non-encrypted state;When the switching command is encryption switching life
Order, then it is encrypted state or non-encrypted state to judge current communication mode, if non-encrypted state, then obtain Crypted password,
And according to the Crypted password of acquisition, current communication mode is switched to encrypted state;
Transceiver 310, for transceiving data under the control of a processor.
Optionally, it is non-using receiving when the processor is additionally operable to receive the Crypted password of non-empty and password modification instruction
Empty Crypted password update Crypted password;When receiving empty Crypted password and password modification instruction, the empty encryption received is utilized
Crypted password described in password update alternatively, instruction needs to input Crypted password, when receiving the Crypted password of non-empty, utilizes receipts
The Crypted password of the non-empty arrived updates the Crypted password.
Optionally, when the processor is specifically used for getting empty Crypted password, current communication mode is switched to not
Need the encrypted state of input Crypted password;Or
When getting empty Crypted password, instruction needs to re-enter Crypted password, when receiving the Crypted password of non-empty,
The Crypted password of non-empty is preserved, and using the Crypted password of non-empty, current communication mode is switched to encrypted state.
Optionally, by status indicator, determine that current communication mode is encrypted state or is non-encrypted state;Wherein, institute
It states Crypted password and is initially non-empty, initial communication pattern is encrypted state, and initial status indicator is the mark of encrypted state,
Alternatively, the Crypted password is initially empty, initial communication module is non-encrypted state, and initial status indicator is non-encrypted shape
The mark of state;Wherein, after each switch communication mode, status indicator is updated according to the communication pattern after switching.
Optional, the processor is additionally operable to open the first indicator light and closes the second indicator light, indicates current communication mode
For non-encrypted state, open the second indicator light and close the first indicator light, instruction current communication mode is encrypted state;It is or logical
Two different conditions of an indicator light are crossed, instruction current communication mode is non-encrypted state or encrypted state;Or by
Show that different conditions identify on software interface, instruction current communication mode is non-encrypted state or encrypted state.
Wherein, in figure 3, bus architecture can include the bus and bridge of any number of interconnection, specifically by processor 300
The various circuits for the memory that the one or more processors and memory 320 of representative represent link together.Bus architecture is also
Various other circuits of such as peripheral equipment, voltage-stablizer and management circuit or the like can be linked together, these are all
It is it is known in the art, therefore, no longer it is described further herein.Bus interface provides interface.Transceiver 310 can
To be multiple element, i.e., including transmitter and receiver, provide the list for communicating over a transmission medium with various other devices
Member.Processor 300 is responsible for bus architecture and common processing, and memory 320 can store processor 300 and perform operation
When used data.
Processor 300 is responsible for bus architecture and common processing, and memory 320 can store processor 300 and hold
Used data during row operation.
It should be understood by those skilled in the art that, the embodiment of the present invention can be provided as method, system or computer program
Product.Therefore, the reality in terms of complete hardware embodiment, complete software embodiment or combination software and hardware can be used in the present invention
Apply the form of example.Moreover, the computer for wherein including computer usable program code in one or more can be used in the present invention
The computer program production that usable storage medium is implemented on (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.)
The form of product.
The present invention be with reference to according to the method for the embodiment of the present invention, the flow of equipment (system) and computer program product
Figure and/or block diagram describe.It should be understood that it can be realized by computer program instructions every first-class in flowchart and/or the block diagram
The combination of flow and/or box in journey and/or box and flowchart and/or the block diagram.These computer programs can be provided
The processor of all-purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices is instructed to produce
A raw machine so that the instruction performed by computer or the processor of other programmable data processing devices is generated for real
The device for the function of being specified in present one flow of flow chart or one box of multiple flows and/or block diagram or multiple boxes.
These computer program instructions, which may also be stored in, can guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works so that the instruction generation being stored in the computer-readable memory includes referring to
Make the manufacture of device, the command device realize in one flow of flow chart or multiple flows and/or one box of block diagram or
The function of being specified in multiple boxes.
These computer program instructions can be also loaded into computer or other programmable data processing devices so that counted
Series of operation steps is performed on calculation machine or other programmable devices to generate computer implemented processing, so as in computer or
The instruction offer performed on other programmable devices is used to implement in one flow of flow chart or multiple flows and/or block diagram one
The step of function of being specified in a box or multiple boxes.
Although preferred embodiments of the present invention have been described, but those skilled in the art once know basic creation
Property concept, then can make these embodiments other change and modification.So appended claims be intended to be construed to include it is excellent
It selects embodiment and falls into all change and modification of the scope of the invention.
Obviously, those skilled in the art can carry out the embodiment of the present invention various modification and variations without departing from this hair
The spirit and scope of bright embodiment.In this way, if these modifications and variations of the embodiment of the present invention belong to the claims in the present invention
And its within the scope of equivalent technologies, then the present invention is also intended to comprising including these modification and variations.