Summary of the invention
The shortcoming of prior art in view of the above, the object of the present invention is to provide the wireless network access method of a kind of wireless routing device and electronic equipment, solves the problem of smart machine access of radio network process complexity in above-mentioned prior art.
For realizing above-mentioned target and other related objectives, the invention provides a kind of wireless routing device, comprising: multicast message forwarding module, for forwarding the multicast message extremely multiple electronic equipment sent by multicast originator; Wherein, last three bytes of the multicast mac address in described multicast message are for loading the configuration information of described wireless network, described configuration information comprises: byte third from the bottom is used for being set to first dielectric mark or data transmission mark, latter two byte is respectively used to be set to the SSID of institute's wireless network and the length of password, described SSID and password or be all set to 0, extracts the configuration information of described wireless network and access described wireless network according to this for each described electronic equipment from described multicast message.
Optionally, described multicast message comprises following several: the first data message: the byte third from the bottom of its multicast mac address is that first dielectric indicates, and latter two byte is that the 0, the first data message length is set to L; Second data message: the byte third from the bottom of its multicast mac address is that data send mark, latter two byte is respectively described SSID length and Password Length, and the second data message length is L; 3rd data message: the byte third from the bottom of its multicast mac address is that data send mark, latter two byte is respectively described SSID length and Password Length, and the 3rd data message length increases progressively one by one by order of transmission and adds 1 and be in L+1 in the span of [L+ (SSID length+Password Length)/2]; 4th data message: the byte third from the bottom of its multicast mac address is that data send mark, latter two byte is 0, and the 4th data message length increases progressively one by one by order of transmission and adds 1 and be in L+1 in the span of [L+ (SSID length+Password Length)/2].
Optionally, in described 3rd packet literary composition, if SSID and Password Length are added up as odd number, then last byte of its multicast mac address is set to 0.
Optionally, described wireless routing device forwards described first data message, the second data message, the 3rd data message and the 4th data message successively to each described electronic equipment.
Optionally, described first data message, the second data message, the 3rd data message and the 4th data message repeat to send repeatedly all separately.
For realizing above-mentioned target and other related objectives, the invention provides a kind of wireless network access method of electronic equipment, comprising: forward the multicast message extremely multiple electronic equipment sent by multicast originator; Wherein, last three bytes of the multicast mac address in described multicast message are for loading the configuration information of described wireless network, described configuration information comprises: byte third from the bottom is used for being set to first dielectric mark or data send mark, and latter two byte is respectively used to be set to the SSID of institute's wireless network and the length of password, described SSID and password or be all set to 0; Each described electronic equipment extracts the configuration information of described wireless network and accesses described wireless network according to this from described multicast message.
Optionally, described multicast message comprises following several: the first data message: the byte third from the bottom of its multicast mac address is that first dielectric indicates, and latter two byte is that the 0, the first data message length is set to L; Second data message: the byte third from the bottom of its multicast mac address is that data send mark, latter two byte is respectively described SSID length and Password Length, and the second data message length is L; 3rd data message: the byte third from the bottom of its multicast mac address is that data send mark, latter two byte is respectively described SSID length and Password Length, and the 3rd data message length increases progressively one by one by order of transmission and adds 1 and be in L+1 in the span of [L+ (SSID length+Password Length)/2]; 4th data message: the byte third from the bottom of its multicast mac address is that data send mark, latter two byte is 0, and the 4th data message length increases progressively one by one by order of transmission and adds 1 and be in L+1 in the span of [L+ (SSID length+Password Length)/2].
Optionally, in described 3rd packet literary composition, if SSID and Password Length are added up as odd number, then last byte of its multicast mac address is set to 0.
Optionally, the wireless network access method of described electronic equipment, comprising: forward described first data message, the second data message, the 3rd data message and the 4th data message successively to each described electronic equipment.
Optionally, described first data message, the second data message, the 3rd data message and the 4th data message repeat to send repeatedly all separately.
As mentioned above, the invention provides the wireless network access method of a kind of wireless routing device and electronic equipment, by forwarding the multicast message extremely multiple electronic equipment sent by multicast originator; Wherein, last three bytes of the multicast mac address in described multicast message are for loading the configuration information of described wireless network, described configuration information comprises: byte third from the bottom is used for being set to first dielectric mark or data send mark, and latter two byte is respectively used to be set to the SSID of institute's wireless network and the length of password, described SSID and password or be all set to 0; Each described electronic equipment extracts the configuration information of described wireless network and accesses described wireless network according to this from described multicast message; The present invention realizes multiple stage smart machine simultaneously access of radio network, and can realize the access of equipment wireless network without the need to the support that user logs in smart machine and Geng Duo hardware designs, reduces costs.
Embodiment
Below by way of specific instantiation, embodiments of the present invention are described, those skilled in the art the content disclosed by this specification can understand other advantages of the present invention and effect easily.The present invention can also be implemented or be applied by embodiments different in addition, and the every details in this specification also can based on different viewpoints and application, carries out various modification or change not deviating under spirit of the present invention.It should be noted that, when not conflicting, the embodiment in the application and the feature in embodiment can combine mutually.
As shown in Figure 1, the invention provides a kind of wireless routing device 1, be such as router or the switch etc. with routing function, it comprises: multicast message forwarding module 11.
Described multicast message forwarding module 11, for forwarding the multicast message extremely multiple electronic equipment 2 sent by multicast originator (the such as mobile terminal such as mobile phone, panel computer or other electric terminals), wherein, last three bytes of the multicast mac address in described multicast message are for loading the configuration information of described wireless network, described configuration information comprises: byte third from the bottom is used for being set to first dielectric mark or data transmission mark, latter two byte is respectively used to SSID (the ServiceSet Identifier being set to institute's wireless network, service set) and password, the length of described SSID and password, or be all set to 0, from described multicast message, extract the configuration information of described wireless network for each described electronic equipment 2 and access described wireless network according to this, in one embodiment, described wireless network is WiFi network, but not as limit, also can be other existing communication networks.
In one embodiment, described multicast message comprises following several: the first data message: the byte third from the bottom of its multicast mac address is that first dielectric indicates, and latter two byte is that the 0, the first data message length is set to L; Second data message: the byte third from the bottom of its multicast mac address is that data send mark, latter two byte is respectively described SSID length and Password Length, and the second data message length is L; 3rd data message: the byte third from the bottom of its multicast mac address is that data send mark, latter two byte is respectively described SSID length and Password Length, and the 3rd data message length increases progressively one by one by order of transmission and adds 1 and be in L+1 in the span of [L+ (SSID length+Password Length)/2]; 4th data message: the byte third from the bottom of its multicast mac address is that data send mark, latter two byte is 0, and the 4th data message length increases progressively one by one by order of transmission and adds 1 and be in L+1 in the span of [L+ (SSID length+Password Length)/2].
Refer to Fig. 2, the principle that above-mentioned multicast message forwards is introduced: described wireless routing device 1 forwards described first data message, the second data message, the 3rd data message and the 4th data message successively to each described electronic equipment 2 for an embodiment, in one embodiment, described first data message, the second data message, the 3rd data message and the 4th data message repeat to send repeatedly all separately, such as 3 times.
As shown in the figure, A, B represent the data of a byte, represent first dielectric mark and data transmission mark respectively.L is the sequencing of the length decision multicast message of data message.
Concrete, in step: send first dielectric mark (A) by the first data message, after MAC Address, three bytes are A:00:00, and message length is filled to L;
In stepb: the length being sent SSID and password by the second data message, after MAC Address, three bytes are B:[SSID length]: [Password Length], message length is L;
In step C: the ASCII character being sent SSID and password by the 3rd data message order, after MAC Address, three bytes are B:[data]: [data], the sequencing of message length determination data message is from L+1 to [L+ (SSID length+Password Length)/2], such as, L+1 is followed successively by, L+2 by each data message length of sending order ... until [L+ (SSID length+Password Length)/2]; Optionally, if SSID and Password Length are added up as odd number, last byte of MAC Address is 0, i.e. B:[data]: 00;
In step D: by sending the 4th data message as end identification message, after MAC Address, three bytes are B:00:00, prolong as [L+ (SSID length+Password Length)/2]+1 after message length order.
Corresponding, each electronic equipment 2 can be such as intelligent appliance equipment, mobile terminal (smart mobile phone or panel computer) and being connected with described routing device, preferred, but each intelligent appliance equipment obtains the information such as SSID, password by the smart jack with wireless network card from described multicast message, thus connects described routing device and access described wireless network; Therefore, the present invention can be applicable in the intelligent domestic system of Internet of Things, realizes simple and quick intelligent appliance equipment access network and transmission.
Specifically can consult the illustrative flow process of Fig. 3, first electronic equipment 2 scans all channel, for determining the channel sending multicast packet packet router, after determining channel, just starts receiving group bag.Initial state is " initially ", waits until that switching state is " reception length " after receiving length and MAC Address meets the multicast packets of origin identification always; Then, after wait-receiving mode meets the multicast packets of length mark to length and MAC Address the 3rd byte, after record MAC Address, two is the length of SSID and password, and switching state is " reception data "; Subsequently MAC Address the 3rd byte is met " reception data " state and receive the data of length in the scope of " reception data " state and be kept in order in character array, if judge that data receiver is complete and receive to terminate mark, then switching state is " terminating to receive ", SSID and encrypted message is separated and control electronic equipment 2 to be connected to wireless network from character array; Those skilled in the art teaching according to the present invention should be realized and be changed, and are not limited with illustrated example.
As shown in Figure 4, the invention provides a kind of wireless network access method of electronic equipment, its know-why is roughly the same with above-described embodiment, and the technical characteristic therefore when not conflicting in above-described embodiment can be applicable to the present embodiment, therefore repeats no more the technical characteristic repeated; Described method comprises:
Step S1: forward the multicast message extremely multiple electronic equipment sent by multicast originator; Wherein, last three bytes of the multicast mac address in described multicast message are for loading the configuration information of described wireless network, described configuration information comprises: byte third from the bottom is used for being set to first dielectric mark or data send mark, and latter two byte is respectively used to be set to the SSID of institute's wireless network and the length of password, described SSID and password or be all set to 0;
Step S2: each described electronic equipment extracts the configuration information of described wireless network and accesses described wireless network according to this from described multicast message.
In one embodiment, described multicast message comprises following several: the first data message: the byte third from the bottom of its multicast mac address is that first dielectric indicates, and latter two byte is that the 0, the first data message length is set to L; Second data message: the byte third from the bottom of its multicast mac address is that data send mark, latter two byte is respectively described SSID length and Password Length, and the second data message length is L; 3rd data message: the byte third from the bottom of its multicast mac address is that data send mark, latter two byte is respectively described SSID length and Password Length, and the 3rd data message length increases progressively one by one by order of transmission and adds 1 and be in L+1 in the span of [L+ (SSID length+Password Length)/2]; 4th data message: the byte third from the bottom of its multicast mac address is that data send mark, latter two byte is 0, and the 4th data message length increases progressively one by one by order of transmission and adds 1 and be in L+1 in the span of [L+ (SSID length+Password Length)/2].
In one embodiment, in described 3rd packet literary composition, if SSID and Password Length are added up as odd number, then last byte of its multicast mac address is set to 0.
In one embodiment, the wireless network access method of described electronic equipment, comprising: forward described first data message, the second data message, the 3rd data message and the 4th data message successively to each described electronic equipment.
In one embodiment, described first data message, the second data message, the 3rd data message and the 4th data message repeat to send repeatedly all separately.
In sum, the invention provides the wireless network access method of a kind of wireless routing device and electronic equipment, by forwarding the multicast message extremely multiple electronic equipment sent by multicast originator; Wherein, last three bytes of the multicast mac address in described multicast message are for loading the configuration information of described wireless network, described configuration information comprises: byte third from the bottom is used for being set to first dielectric mark or data send mark, and latter two byte is respectively used to be set to the SSID of institute's wireless network and the length of password, described SSID and password or be all set to 0; Each described electronic equipment extracts the configuration information of described wireless network and accesses described wireless network according to this from described multicast message; The present invention realizes multiple stage smart machine simultaneously access of radio network, and can realize the access of equipment wireless network without the need to the support that user logs in smart machine and Geng Duo hardware designs, reduces costs.
Above-described embodiment is illustrative principle of the present invention and effect thereof only, but not for limiting the present invention.Any person skilled in the art scholar all without prejudice under spirit of the present invention and category, can modify above-described embodiment or changes.Therefore, such as have in art usually know the knowledgeable do not depart from complete under disclosed spirit and technological thought all equivalence modify or change, must be contained by claim of the present invention.