It is a kind of that SD state being fed back in the way of broadcast frame embedded data during SD networking
Method
Technical field
The present invention relates to wireless communication technology fields, in particular, being to be related to one kind to utilize broadcast during SD networking
The method that frame embedded data mode feeds back SD state.
Background technique
As internet constantly rises, the increasingly prominent of demand is moved, wireless interconnected demand is also more strong.Existing
Wireless communication technique in, Bluetooth Communication Technology coverage area is small, and infrared communication technology is influenced big effect through walls by environment
It is undesirable.And the WIFI communication technology is gradually received by enterprise, family due to being widely used.Traditional measured
IEEE802.11 defines the specification of wireless network: a wireless points are as AP(Access Point) mode, it is other wireless
Point is used as STA(STAtion) mode, after being associated with AP by STA, STA could be communicated between AP, between STA and STA
Communication also depend on AP carry out transfer.It is no carry out it is authentication associated and before being successfully associated, STA and AP, STA and STA these
Data communication can not be carried out between equipment.STA and AP provides certification, releases certification, number in common network communication
According to encryption, the service of data transmission, the safety of this design scheme is very high, and under normal circumstances, STA and AP establish connection
Process is as shown in Figure 1, be the AP that artificially control STA scans surrounding in a manner of actively or passively, the letter of acquisition surrounding AP
Breath, then STA manually or automatically inputs key, carries out link authentication, and foundation is associated with AP's.
With smart machine SD(Smart Device) rise, the universal feature of these smart machines is no serial ports, nothing
Input-output equipment, no touch screen, existing networking mode are not just able to satisfy the networking requirements of these equipment.This demand is answered, it is existing
Occur allowing in the way of the frame structures embedded data such as broadcast frame, multicast frame networking smart machine obtain AP SSID,
The information such as KEY carry out intelligent networking.This mode is convenient and efficient, but since user can not obtain the status information of SD, once
SD networking Pending The Entry Into Force or failure, user can not further be operated.Therefore, it is necessary to solve the problems, such as this.
Summary of the invention
To overcome the above problem in the prior art, the present invention provides a kind of novel, ingenious in design in SD networking
The method of SD state is fed back in the way of broadcast frame embedded data in the process.
To achieve the goals above, The technical solution adopted by the invention is as follows:
A method of SD state being fed back in the way of broadcast frame embedded data during SD networking, including in same
Further include following steps under WIFI environment but not associated AP and SD:
(S1) SD fictionalize one can response external equipment scanning pseudo- AP;
(S2) SD extracts the facility information building broadcast frame of itself and broadcasts, and the facility information of the SD includes puppet AP
Service set SSID, address information MAC and the SD status information STATUS;
(S3) the neighbouring channel of the AP active scan, detects puppet AP, establishes and the spurious correlation channel of puppet AP, and by
The facility information of the SD is got in its broadcast frame;
(S4) AP extracts the facility information of itself, and is broadcasted using constructing after the SD facility information encryption got
Frame is broadcasted in present channel;
(S5) SD captures the broadcast frame that AP is sent, and parsing obtains the facility information of AP, and is authenticated with this with the AP
Association sends current SD shape to the AP by spurious correlation channel in the process after the status information of the SD changes
State information;
(S6) AP is presented the SD status information received by way of display.
Specifically, the status information STATUS of the SD include be not configured, parse in, parsing failure, certification in, certification mistake
It loses and authenticates successfully.
Further, the process of building broadcast frame is as follows in the step (S2):
(S2a) SD extracts the facility information processing of itself as mainly by information data main body and CRC check information structure
At data flow;
(S2b) data flow is embedded at least one broadcast frame according to 802.11 standards;
(S2c) broadcast frame formed by the pseudo- AP Broadcast step (S2b) that the SD is fictionalized.
In order to the reciprocal correspondence of information transmitting, in the step (S2b), when the data flow is embedded into multiple broadcast frames
When constituting one group of broadcast frame to be sent, the format of these broadcast frames, sequence and embedded mode are arranged;
Correspondingly, AP described in step (S3) is captured and is extracted corresponding data flow according to stipulated form after whole group broadcast frame
Information obtains the facility information of the SD.
Specifically, the broadcast frame is generated according to 802.11 standards, by header Header, embedded data area and frame check sequence
Arrange FCS composition, at least one data being stored in the data flow in the embedded data area of each broadcast frame.
For the ease of identification, when the data flow is embedded into multiple broadcast frames, after the broadcast frame of continuous certain amount
It is inserted into the fixed broadcast identification frame of the difference of continuous 3 length;
It correspondingly, whether is wide by verifying arbitrary continuous 3 broadcast frames after the AP captures multiple broadcast frames
Broadcast identification frame, come judge these broadcast frames whether be puppet AP broadcast broadcast frame.
When verifying broadcast identification frame, if present channel has broadcast identification frame, the AP rests on present channel reception
Complete group broadcast frame switches to working channel after a setting time adjacent if there is no broadcast identification frames for present channel
Channel.After receiving complete group broadcast frame, the CRC check information in traffic flow information also extracted by verifying judges the group
Whether the content of broadcast packet is complete, if imperfect, received broadcast frame is abandoned, and receive again, if broadcast packet is interior
Hold and completely then extracts corresponding SD facility information.
More specifically, the step (S4) includes the following steps:
(S4a) AP extracts the facility information that itself includes at least service set SSID and key Key;
(S4b) AP encrypts the facility information of its extraction, composition packet using the address information MAC of the SD of acquisition as key
Data flow containing length information, data subject and CRC check information, wherein the data body portion of the data flow is by SD's
The AP facility information of address information MAC encryption;
(S4c) data flow is embedded at least one broadcast frame;The mode and step of broadcast frame are formed at this time
(S2b) mode in is identical;
(S4d) AP is in the present channel broadcast frame that periodically sending step (S4c) is formed.
Further, in the step (S5), after the SD captures complete broadcast frame, its embedded data is extracted
Stream, and decrypted using the address information MAC of its own, obtain the facility information of the AP.
Further, the facility information of the AP includes service set SSID, password Key, bandwidth information
BANDWIDTH, authentication mode information AUTHENTICATION, encryption and decryption mode information ENCRYPTION, channel information CHANNEL
With optional information OPTION.
In order to improve operational efficiency, in the step (S5), when the state of the SD is in parsing, parsing failure, is recognized
In card or when authentification failure, after continuing a setting time, non-configuration status is set by the state of the SD.
As an alternative, the side of SD state should be fed back in the way of broadcast frame embedded data during SD networking
Method further includes the one and AP associated third party's mobile terminal MT, at this point, replacing the AP with the MT to obtain the SD
Facility information;This method is achieved by the steps of:
(S1) SD fictionalize one can response external equipment scanning pseudo- AP;
(S2) SD extracts the facility information building broadcast frame of itself and broadcasts, and the facility information of the SD includes puppet AP
Service set SSID, address information MAC and the SD status information STATUS;
(S3) AP near the MT active scan detects puppet AP, establishes the spurious correlation with puppet AP, and by its broadcast
The facility information of the SD is got in frame;
(S4) facility information for the SD that the MT will acquire is sent to the AP;
(S5) AP extracts the facility information of itself, and is broadcasted using constructing after the SD facility information encryption got
Frame is broadcasted in present channel;
(S6) SD captures the broadcast frame that AP is sent, and parsing obtains the facility information of AP, and is authenticated with this with the AP
Association sends current SD shape to the AP by spurious correlation channel in the process after the status information of the SD changes
State information;
(S7) AP is presented the SD status information received by way of display.
Compared with prior art, the invention has the following advantages:
The present invention is dexterously utilized SD and fictionalizes pseudo- AP and broadcast the facility information of its own, makes AP or third
Square mobile terminal MT can get the status information of SD by broadcast frame, so that user can effectively understand working as SD
Preceding state facilitates the discovery of problem during SD intelligent networking in order to grasp the networking progress and failure cause of SD, quasi-
Really reliable, highly-safe, while SD equipment does not need any input information in the whole process, particularly convenient do not have without serial ports
Having touch screen etc., the smart machine of input unit be associated with AP, convenient and efficient, is with a wide range of applications, suitable
It closes and promotes and applies.
Detailed description of the invention
Fig. 1 is the flow diagram of AP and SD networking in the prior art.
Fig. 2 is flow diagram of the invention.
Fig. 3 is the structural schematic diagram that SD constructs data flow composition in broadcast frame in the present invention.
Fig. 4 is the structural schematic diagram of broadcast frame encapsulation in the present invention.
Fig. 5 is another flow diagram of the invention.
Specific embodiment
Present invention will be further explained below with reference to the attached drawings and examples, and embodiments of the present invention include but is not limited to
The following example.
Embodiment 1
As shown in Figures 2 to 4, the side of SD state should be fed back in the way of broadcast frame embedded data during SD networking
Method, primarily to solve in the prior art without serial ports, without touch screen etc. not input unit smart machine SD with
During AP establishes connection, failure cause problem when user can not grasp the networking progress of SD and occur unsuccessfully, Ke Yishi
Answer the wireless communication environment of various complexity, including AD-Hoc network, BSS network, ESS network;And this method is to be based on
The design of 802.11 standards can extend compatible 802.11 protocol suites.
The device that this method is related to include under the same WIFI environment but not associated smart machine SD and wireless points AP,
Its specific implementation includes the following steps:
(S1) SD fictionalize one can response external equipment scanning pseudo- AP.
(S2) SD extracts the facility information building broadcast frame of itself and broadcasts, and the facility information of the SD includes puppet AP
Service set SSID, address information MAC and the SD status information STATUS;The SD facility information can also include optional
Information OPTION;Wherein, the status information STATUS of the SD includes but is not limited in being not configured, parsing, parsing failure, authenticates
In, authentification failure and authenticate successfully.It is in non-configuration status after the SD initialization, its state can be with the relationship with AP thereafter
Variation.It constructs broadcast frame, and specific step is as follows:
(S2a) SD extracts the facility information processing of itself as mainly by information data main body and CRC check information structure
At data flow;The data flow can also include the length information of data flow;
(S2b) data flow is embedded at least one broadcast frame according to 802.11 standards;When the data flow is embedding
Enter to multiple broadcast frames constitute one group of broadcast frame to be sent when, to the format of these broadcast frames, sequence and embedded mode into
Row agreement.Wherein specific stipulated form can be executed using existing coding mode, and the present invention repeats no more.
For the ease of identification, when the data flow is embedded into multiple broadcast frames, after the broadcast frame of continuous certain amount
It is inserted into the fixed broadcast identification frame of the difference of continuous 3 length.
(S2c) broadcast frame formed by the pseudo- AP Broadcast step (S2b) that the SD is fictionalized.
(S3) the neighbouring channel of the AP active scan, detects puppet AP, establishes and the spurious correlation channel of puppet AP, and by
The facility information of the SD is got in its broadcast frame;In AP after capturing the broadcast frame in present channel, also to capturing
Continuous multiple broadcast frames verified, judge in these continuous broadcast frames with the presence or absence of broadcast identification frame, if so, described
AP rests on present channel and receives complete group broadcast frame, and otherwise the AP switches to working channel after a setting time adjacent
Channel.The method of verifying is to examine whether the difference of the length of any 3 continuous broadcast frames in these continuous broadcast frames accords with
Close the consistent difference set between broadcast identification frame.
(S4) AP extracts the facility information of itself, and is broadcasted using constructing after the SD facility information encryption got
Frame is broadcasted in present channel;Specifically,
(S4a) AP extracts the facility information that itself includes at least service set SSID and key Key;Wherein, institute
The facility information for stating AP includes service set SSID, password Key, bandwidth information BANDWIDTH, authentication mode information
AUTHENTICATION, encryption and decryption mode information ENCRYPTION, channel information CHANNEL and optional information OPTION.
(S4b) AP encrypts the facility information of its extraction, composition packet using the address information MAC of the SD of acquisition as key
Data flow containing length information, data subject and CRC check information, wherein the data body portion of the data flow is by SD's
The AP facility information of address information MAC encryption;
(S4c) data flow is embedded at least one broadcast frame;The mode and step of broadcast frame are formed at this time
(S2b) mode in is identical, i.e., when the data flow, which is embedded into multiple broadcast frames, constitutes one group of broadcast frame to be sent, to this
Format, sequence and the embedded mode of a little broadcast frames are arranged.Wherein specific stipulated form can use existing coding
Mode executes, and the present invention repeats no more;
Similarly, for the ease of identification, when the data flow is embedded into multiple broadcast frames, in the wide of continuous certain amount
The broadcast identification frame that the difference of continuous 3 length is fixed is inserted into after broadcasting frame.
(S4d) AP is in the present channel broadcast frame that periodically sending step (S4c) is formed.
(S5) SD captures the broadcast frame that AP is sent, and parsing obtains the facility information of AP, and is authenticated with this with the AP
Association sends current SD shape to the AP by spurious correlation channel in the process after the status information of the SD changes
State information;Specific step is as follows for the process:
The SD verifies the multiple broadcast frames captured, that is, verifies it after present channel captures broadcast frame
In the differences of length of any 3 continuous broadcast frames whether meet the consistent difference that sets between broadcast identification frame, if it exists extensively
Identification frame is broadcast, then the SD rests on present channel and receives complete group broadcast frame, and otherwise the SD is after a setting time by work
Adjacent channel is switched to as channel to continue to;
After the SD receives complete group broadcast frame, broadcast frame is parsed according to the mode of agreement, at this time the SD
State in parsing is set by the state of its own, and (spurious correlation channel) is sent to institute by the way of step (S2) and (S3)
State AP;
It is related to the coding mode of agreement and the address information MAC decryption of SD itself, any bar due to the resolving
Part mismatch may cause parsing failure, and when there is parsing failure, the SD sets parsing for the state of its own and loses
State is lost, equally state will be sent to the AP at this time, and revert to SD state not after a setting time (usually 30s)
Configuration status;
If successfully resolved, the SD can extract the facility information of the AP from corresponding broadcast frame, so as into one
Step is associated certification with AP;SD carries out link authentication according to the information such as the SSID and KEY of the AP of acquisition and AP at this time, and will be certainly
Body state is set as state in certification, equally state will be sent to the AP at this time;
If its own state is set authentification failure state by the SD authentification failure, SD, state will equally send out at this time
It send to the AP, and SD state is reverted into non-configuration status after a setting time (usually 30s);
If authenticating successfully, SD and AP carry out normal association, and the two can carry out WIFI data communication, and SD will be certainly at this time
Body state is set as authenticating successfully/association status.
(S6) the SD status information received is presented to the user by the AP by way of display.
Specifically, it when SD is in non-configuration status, is executed by above-mentioned steps (S1).
In practical applications, when user has purchased using smart machine of the invention, such as intelligent router AP and intelligent lamp
SD, when the two carries out intelligent networking, SD is by the method for the invention by its status information feedback to AP, in order to user's grasp group
Net process, and when networking fails, it is that user can recognize for which link problem, thus be modified,
Facilitate the reason of searching networking failure.
Embodiment 2
As shown in figure 5, the present embodiment the difference from embodiment 1 is that, the equipment that this method is related to further include one with it is described
AP associated third party's mobile terminal MT, at this point, replacing the AP with the MT to obtain the facility information of the SD;This method
It is achieved by the steps of:
(S1) SD fictionalize one can response external equipment scanning pseudo- AP;
(S2) SD extracts the facility information building broadcast frame of itself and broadcasts, and the facility information of the SD includes puppet AP
Service set SSID, address information MAC and the SD status information STATUS;
(S3) AP near the MT active scan detects puppet AP, establishes the spurious correlation with puppet AP, and by its broadcast
The facility information of the SD is got in frame;
(S4) facility information for the SD that the MT will acquire is sent to the AP;
(S5) AP extracts the facility information of itself, and is broadcasted using constructing after the SD facility information encryption got
Frame is broadcasted in present channel;
(S6) SD captures the broadcast frame that AP is sent, and parsing obtains the facility information of AP, and is authenticated with this with the AP
Association sends current SD shape to the AP by spurious correlation channel in the process after the status information of the SD changes
State information;
(S7) AP is presented the SD status information received by way of display.
User can more easily grasp SD state through this embodiment.
Above-described embodiment is merely a preferred embodiment of the present invention, and it is not intended to limit the protection scope of the present invention, as long as using
Design principle of the invention, and the non-creative variation worked and made is carried out on this basis, it should belong to of the invention
Within protection scope.