Specific embodiment
In order to keep the purposes, technical schemes and advantages of the application clearer, below in conjunction with attached drawing to the application make into
It is described in detail to one step, it is clear that described embodiment is only the application some embodiments, rather than whole implementation
Example.Based on the embodiment in the application, obtained by those of ordinary skill in the art without making creative efforts
All other embodiment, shall fall in the protection scope of this application.
What is be described below is some in multiple embodiments of the application, it is desirable to provide to the basic understanding of the application,
It is not intended to the crucial or decisive element of confirmation the application or limits scope of the claimed.According to the technical side of the application
Case can be replaced mutually under the connotation for not changing the application and obtain other implementations.
As previously mentioned, terminal device is before accessing wireless network, it can not be with other equipment such as hand in wireless network
Machine directly establishes communication, also can not access internet by access device.But the Wi-Fi module of terminal device can enter
Listening mode can monitor the radio frames of peripheral equipment transmission in the listen mode.The payload segment of radio frames is encryption, such as
Fruit terminal device, which can not decrypt payload segment also, can not just obtain the data of payload segment carrying, but the packet length of entire radio frames is
It can be calculated, the total length of the long as radio frames of the packet of radio frames.According to this feature, the application implementation is provided
A kind of data transmission scheme.
In data transmission scheme provided by the embodiments of the present application, sender by the Deta bearer of transmission radio frames packet
Long corresponding bit sequence is sent, and after recipient captures radio frames, the packet for calculating radio frames is long, corresponding according to packet length
Bit sequence can obtain the data of needs.
It, can be by mobile terminal, such as mobile phone, as transmission for applying the embodiment of the present application under Intelligent household scene
Square data transmission device, using the smart home device for not having the input units such as keyboard and screen or embedded device as reception
Square data transmission device carries wireless local area by the long corresponding bit sequence of packet of radio frames by sender's data transmission device
The access pin of net, receiving side data transmitting device is long according to the packet that the radio frames received calculate the radio frames, is grown according to packet
Corresponding bit sequence obtains WLAN access pin, to access WLAN according to the access pin, and then solves
Determined smart home device or embedded device access WLAN the problem of.
Radio frames described in the embodiment of the present application follow wireless communication protocol.802.11 series are followed herein with radio frames
It is described for agreement, in the case where not special declaration, radio frames described below are to follow 802.11 serial protocols
Radio frames.
Fig. 1 schematically illustrates a kind of structure of radio frames of 802.11 protocol definitions.Wherein, frame head part carrying control
Information, protocol information and address information processed etc., frame entity part is the payload segment of radio frames, for carrying data content, FCS
(Frame Check Sequence, Frame Check Sequence) field is used to load carrying frame check information, to guarantee the integrality of radio frames.
Frame head part, the occupied total length of frame entity part and the part FCS, the packet of referred to as radio frames are long.The Bao Changke of radio frames
It is calculated by the application layer of receiving side data transmitting device.
It should be noted that radio frames described in the embodiment of the present application are not limited to structure shown in FIG. 1.
Radio frames can be grouped and be sent, and may include multiple radio frames in a grouping.For convenience of description, the application is implemented
In example, the radio frames in a grouping are known as data frame.It needs to send a radio frames between two groupings to be spaced, this
The radio frames being inserted between two groupings are known as packet frames in application embodiment.Packet frames are used to control rising for next grouping
Beginning position, that is, for synchronizing the position of the data frame of next grouping, to prevent recipient out-of-order.
Data frame described in the embodiment of the present application, the long corresponding bit sequence of packet is used to carry data, for example is used for
Access the account of wireless network;The long corresponding bit sequence of the packet of the packet frames is used to carry packet number.
It should be noted that this differentiation mode to radio frames is only used for the embodiment of the present application, it is therefore an objective to convenient for describing,
It is not meant to that the wireless frame classification to 802.11 agreements or other communication protocol definitions is modified.
Fig. 2 schematically illustrates the distribution of data frame and packet frames.
In the embodiment of the present application, for needing to carry the radio frames of data with the long corresponding bit sequence of packet, for example, needing
The radio frames of the access pin of WLAN are carried with the long corresponding bit sequence of packet, it is long to the packet of the radio frames to correspond to
The format of bit sequence be defined.It specifically, may include sequence number field and data field in the long corresponding bit sequence of packet.
If radio frames are data frames, the value for wrapping the bit of the sequence number field in long corresponding bit sequence is used to indicate data frame
Serial number in grouping belonging to it, the value of the bit of data field are used to indicate to need to be held by the long corresponding bit sequence of packet
The data of load;If radio frames are packet frames, the value for wrapping the bit of the sequence number field in long corresponding bit sequence can be made
For the mark of packet frames, the value of the bit of data field is used to indicate packet number.
Preferably, the sequence number field in the long corresponding bit sequence of the packet of radio frames described in the embodiment of the present application can be located at
The higher bit bit position of the long corresponding bit sequence of packet, the data field wrapped in long corresponding bit sequence can be corresponding positioned at packet length
The low bit bit position of bit sequence.The definition of above-mentioned sequence number field and data field is only a kind of example, and the embodiment of the present application is to this
With no restriction.
According to 802.11 agreements, the packet of radio frames is long due to MTU (the data packet maximum transmission unit of communication protocol agreement)
The hexadecimal representation of the limitation reason of length, usually less than 1500 bytes, the decimal system 1500 is 0x5DC, uses 11 bits
Width can be used to indicate packet length, that is, the length of the long corresponding bit sequence of the packet of radio frames is at least 11 bits.
By taking the long corresponding bit sequence length of the packet of radio frames is 11 bits as an example, in the embodiment of the present application, for needs
The radio frames that data are carried with the long corresponding bit sequence of packet, using high 4 bit of the long corresponding bit sequence of packet as serial number
Domain, using low 7 bit of the long corresponding bit sequence of packet as data field.
The value range of 4 bits is { 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 }, be expressed as [0,
15].Following herein to indicate value range with [a1, a2], the lower limit of the range is a1, and the upper limit is a2, and includes a1 and a2, that is, is taken
Value range is the integer between a1 to a2.In view of the packet length of radio frames is typically limited to 1500=0x5DC hereinafter, therefore high by 4
The value range of bit is [0,11].
If the radio frames may be between other radio frames in view of the bit in sequence number field takes complete zero numerical value
Interference is generated, is unfavorable for the data receiver of recipient, therefore in the embodiment of the present application, can be excluded in the value range of sequence number field
0.For example, in a preferred solution, for data frame, the value model of the sequence number field in the long corresponding bit sequence of packet
It encloses for [1,10];For packet frames, the value range of the sequence number field in the long corresponding bit sequence of packet is [11].7 bits
The value range of the data field of length is [0,127].Due to taking for the sequence number field in the long corresponding bit sequence of the packet of data frame
Value range is not overlapped with the value of the sequence number field in the long corresponding bit sequence of the packet of packet frames or value range, therefore can be led to
The value of the bit for the sequence number field crossed in the long corresponding bit sequence of packet distinguishes data frame and packet frames.
It is often necessary to can be ascii character, such as wireless office using the long corresponding bit sequence of packet come the data carried
The account information of domain net.Since effective ascii character of the data is only a subset of ascii character-set, in the subset
The value range of ascii character is [32,126].
According to the These characteristics of the value of the data field in the long corresponding bit sequence of the packet of data frame, the embodiment of the present application
In, following several schemes can be used to the sequence number field and data field in the long corresponding bit sequence of the packet of data frame and packet frames
Value range be defined, wherein for convenience of description, indicate data frame with Fram_data, indicate to be grouped with Fram_group
Frame, indicates the sequence number field in the long corresponding bit sequence of packet with field_index, indicates the long corresponding ratio of packet with field_data
Data field in special sequence.
Scheme 1
Fram_data:field_index value range is [1,10], and field_data value range is [32,126]
Fram_group:field_index value is any one integer in [11,15] range, and preferably value is 11,
Field_data value range is [0,31]
If sender's data transmission device can be by the binary system value of ascii character directly as packet using scheme 1
The value of the bit of data field in long corresponding bit sequence, receiving side data transmitting device can be according to the long corresponding ratios of packet
The value of the bit of data field in special sequence directly obtains corresponding ascii character.
Scheme 2
Fram_data:field_index value range is [1,11], and preferred scope is [1,10], field_data value
Range is [0,94]
Fram_group:field_index value is any one integer in [1,11] range, and preferably value is 11,
Field_data value range is [95,126]
If, will after the corresponding value of ascii character can be subtracted 32 by sender's data transmission device using scheme 2
Value of the value corresponding to value after subtraction as the bit of the data field in the long corresponding bit sequence of packet, connects
Debit's data transmission device can be by the value of the bit of the data field in the long corresponding bit sequence of packet plus after 32, according to adding
Value after method operation obtains corresponding ascii character.
The definition scheme of the above sequence number field and the value range of data field is only a kind of example, the embodiment of the present application and not only
It is limited to above scheme.For example, allowing the value range of data frame and the sequence number field in the long corresponding bit sequence of the packet of packet frames
It is overlapping, but the value range of data field cannot exist it is overlapping, can be distinguished in this way according to the value range of data field data frame and
Packet frames;Alternatively, allow the value range of data frame and the data field in the long corresponding bit sequence of the packet of packet frames overlapping, but
The value range of sequence number field, which cannot exist, to be overlapped, in this way, can distinguish data frame and grouping according to the value range of sequence number field
Frame.
Fig. 3 a and Fig. 3 b are to wrap the length for growing corresponding bit sequence as 11 bits, and the number of bits of sequence number field is 4, number
For number of bits according to domain is 7, the long corresponding bit of packet of radio frames provided by the embodiments of the present application is schematically illustrated
The format of sequence.Wherein, Fig. 3 a schematically illustrates the format of the long corresponding bit sequence of packet of data frame, a data frame
The long corresponding bit sequence of packet in data field can be used to carry an ascii character.Fig. 3 b is schematically illustrated point
The format of the long corresponding bit sequence of the packet of framing.
In Fig. 3 a, the sequence number field of the long corresponding bit sequence of the packet of data frame occupies the higher bit position portion in the bit sequence
4 bits divided, value range are defined as [1,10], and data field occupies 7 ratios of the low bit bit position in the bit sequence
Spy, value range are [32,126].
The format definition of the long corresponding bit sequence of the packet of data frame may be expressed as:
Len=(index < < 7)+data, index=[1,2,3,4,5,6,7,8,9,10]
126 >=data >=32
Wherein, len represent data frame packet it is long;Index represents data frame with respect to serial number, i.e., data frame is in affiliated grouping
Serial number or position;Data represents the data in data field, that is, needs by the data of the long corresponding bit sequence carrying of packet, one
Data field in the long corresponding bit sequence of the packet of data frame can carry the data of a byte, such as an ascii character.?
In the case where using account information of the long corresponding bit sequence carrying of packet for accessing wireless network, 126 >=data can define
>=32, because ascii character corresponding to the range is ascii character used in account information.
In Fig. 3 b, the sequence number field in the long corresponding bit sequence of the packet of packet frames occupies the higher bit position portion of the bit sequence
4 bits divided, the value of definition are fixed as 11, and data field occupies 7 bits of the low bit bit position of the bit sequence, takes
Being worth range is [0,31].
The format definition of the long corresponding bit sequence of the packet of packet frames may be expressed as:
Len=(fixed_index < < 7)+base_index
Wherein, len represent packet frames packet it is long, fixed_index represents the fixation serial number that packet frames use, and value is
11;Base_index represents packet number, and value range is [0,31].
According to Fig. 3 a and Fig. 3 b, define 126 >=data >=32 in the case where, due to the value range of base_index
It is [0,31], is not overlapped with the value range of data, therefore can be according to the number in the long corresponding bit sequence of packet of radio frames
Data frame and packet frames are distinguished according to the value of the bit in domain.Certainly, in data frame and the long corresponding bit sequence of the packet of packet frames
In the case that the value of the bit of sequence number field in column is not overlapping, number can also be distinguished according to the value of the bit of sequence number field
According to frame and packet frames.
As can be seen that the use of the above coded format being that can reach to hide data and serial number into long pair of packet that is encoded to radio frames
The purpose for the bit sequence answered.
It is only described so that the length of the long corresponding bit sequence of the packet of radio frames is 11 bits as an example above, the packet of radio frames is long
The length of corresponding bit sequence can also be greater than 11 bits, in this case, the high N ratio in the long corresponding bit sequence of packet
Spy can be used as sequence number field, and N is greater than 4 integer, and the low M-bit in the bit sequence can be used as data field, and M is greater than or equal to
7 integer.
It is defined according to the format above to the long corresponding bit sequence of the packet of radio frames, combines Fig. 3 and Fig. 4 separately below,
Data transmission method process provided by the embodiments of the present application is described in detail.
It referring to fig. 4, is the schematic diagram of data transmission method process provided by the embodiments of the present application.The process describes data
The treatment process of recipient, the process can be executed by the data transmission device as data receiver.The data transmission device
It is provided with wireless module, such as Wi-Fi module, can receive and handle radio frames.For example, the data transmission device can be intelligence
It can home equipment or embedded device etc..
As shown, the process may include following steps:
Step 401: receiving radio frames;
Step 402: determining that the packet of the radio frames is long;The long corresponding bit sequence of the packet of the radio frames includes sequence number field
And data field, the number of bits of the sequence number field is at least more than 3;
Step 403: according to the bit of sequence number field and/or data field in the long corresponding bit sequence of the packet of the radio frames
The value of position, determines whether the long corresponding bit sequence of the packet of the radio frames is used to carry data;
Step 404: if it is determined that be it is yes, then according to the data field in the long corresponding bit sequence of the packet of the radio frames
The value of bit determines the data that the long corresponding bit sequence of the packet of the radio frames is carried.
Further, if determining in step 403, the long corresponding bit sequence of the packet of the radio frames is used to carry grouping
Number, then data receiver and sequence can be carried out according to the radio frames.
The structure of radio frames described in above-mentioned process, the long corresponding bit sequence of packet can be as previously described.For example, packet length
Sequence number field in corresponding bit sequence is located at the higher bit bit position in the bit sequence, wraps in long corresponding bit sequence
Data field is located at the low bit bit position in the bit sequence.Preferably, the number of bits of the sequence number field is 4, the data
The number of bits in domain is 7.
In step 401, due to being provided with wireless module in data transmission device, peripheral equipment transmission can be monitored
Radio frames.
In step 402, the packet that the radio frames can be calculated in application layer as the data transmission device of recipient is long,
And then obtain the long corresponding bit sequence of the packet.
As previously mentioned, data frame can be distinguished according to the value of the bit of the sequence number field in the long corresponding bit sequence of packet
And packet frames, data frame can also be distinguished according to the value of the bit of the data field in the long corresponding bit sequence of packet and divided
Framing, correspondingly, in step 403, one of following manner can be used to determine that the radio frames are in data transmission device
No is data frame:
Mode 1: if the value of the bit of sequence number field takes first in the long corresponding bit sequence of the packet of the radio frames
It is worth in range, it is determined that the long corresponding bit sequence of the packet of the radio frames is used to carry data, wherein the packet of the radio frames
The value of the bit of sequence number field is for identifying serial number of the radio frames in affiliated grouping in long corresponding bit sequence.
Further, if the value of the bit of sequence number field is second in the long corresponding bit sequence of the packet of the radio frames
It in value range or is the first value, it is determined that the long corresponding bit sequence of the packet of the radio frames is used to carry packet number,
In, second value range is not overlapped with first value range, and first value is not in the first value model
In enclosing.
For example, for the format of the long corresponding bit sequence of the packet of the radio frames shown in Fig. 3 a and Fig. 3 b, if
The value of the bit of sequence number field in the long corresponding bit sequence of the packet of radio frames is in [1,10] range, it is determined that this is wireless
Frame is data frame, if the value of the bit of the sequence number field in the long corresponding bit sequence of the packet of radio frames is 11, it is determined that
The radio frames are packet frames.
Mode 2: if the value of the bit of data field takes in third in the long corresponding bit sequence of the packet of the radio frames
It is worth in range, it is determined that the long corresponding bit sequence of the packet of the radio frames is used to carry data, and the third value range is
Value range corresponding to the data for needing to be carried as the long corresponding bit sequence of packet of radio frames.Preferably, in such case
Under, value of the fixed value as the bit of the sequence number field in the long corresponding bit sequence of packet of packet frames can be selected.
Further, if the value of the bit of data field is the 4th in the long corresponding bit sequence of the packet of the radio frames
In value range, it is determined that the long corresponding bit sequence of the packet of the radio frames is used to carry packet number, the 4th value model
The value range for grouping serial number is enclosed, the third value range is not overlapped with the 4th value range.
For example, for the format of the long corresponding bit sequence of the packet of the radio frames shown in Fig. 3 a and Fig. 3 b, if
The value of the bit of data field in the long corresponding bit sequence of the packet of radio frames is in [32,126] range, it is determined that the nothing
Line frame is data frame, if the value of the bit of the data field in the long corresponding bit sequence of the packet of radio frames is in [0,31] model
In enclosing, it is determined that the radio frames are packet frames.
In step 404, the packet of the data frame can be determined by following procedure as the data transmission device of recipient
The data that long corresponding bit sequence is carried: according to the ratio of the data field in the long corresponding bit sequence of the packet of the data frame
The value of special position determines corresponding ascii character, the long correspondence of the packet that the ascii character determined is determined as the data frame
The data that are carried of bit sequence.
Data field in the long corresponding bit sequence of the packet of one data frame can usually carry a byte, such as one
Ascii character includes multiple bytes, such as multiple ASCII words if necessary to the data by the long corresponding bit sequence carrying of packet
The long corresponding bit sequence of packet of the data frame of respective numbers can be used then to carry the data of multiple byte in symbol.Fig. 5 shows
Show to example property the schematic diagram that multiple byte datas are carried with the long corresponding bit sequence of the packet of multiple data frames, byte in figure
1 to byte n indicates to need the data of the long transmission of packet by radio frames, for example, a byte can represent an ascii character.
In view of the sequence that data transmission device receives radio frames may be inconsistent with transmission sequence, therefore the application is implemented
It, can be by the value of the bit of the sequence number field in the long corresponding bit sequence of packet of data frame, to determine a grouping in example
The sequence of interior data frame sequentially spells the data that the long corresponding bit sequence of the packet of these data frames is carried according to this
It connects, so as to solve the problems, such as to receive data inaccuracy caused by radio frames random ordering.
It specifically, can be according in the long corresponding bit sequence of the packet of data frame as the data transmission device of recipient
The value of the bit of sequence number field determines serial number of the data frame in affiliated grouping, according to the data frame in affiliated grouping
Serial number determines data that the data field in the long corresponding bit sequence of the packet of the data frame is carried in entire data sequence
Position.
It further, can be according in the long corresponding bit sequence of the packet of packet frames as the data transmission device of recipient
The value of the bit of data field determines packet number, according to the packet number, determines the absolute in entire data sequence of data
Position determines the start offset of next packet data in other words.
For example, can determine a data according to the following formula when the data transmission device as recipient parses data
Final position:
Pos=(base_index*group_nums)+index
Wherein, pos represents the final position of data packet, and group_nums represents the quantity of the data frame in a grouping.
Recipient determines the final position of data according to base_index and index.
Preferably, above-described embodiment can be applied to the scene of wireless network access, under the scene, the needs are by nothing
The data of the long corresponding bit sequence carrying of the packet of line frame can include: for carrying out the account information of wireless network access, or
The access pin of wireless network, for example can be the access pin of WLAN.
In above-described embodiment of the application, needed since the data field of the long corresponding bit sequence of packet by radio frames carries
The data of access side are sent to, enable the recipient to obtain the number needed according to the long corresponding bit sequence of packet of radio frames
According to.Especially under the scene of access WLAN, the account information of WLAN can be carried on radio frames by sender
The long corresponding bit sequence of packet is sent to recipient, so that recipient obtains the account information of WLAN, to can access
WLAN.In addition, since the number of bits of the sequence number field in the long corresponding bit sequence of the packet of radio frames is greater than 3, due to
Sequence number field in the long corresponding bit sequence of packet can be used to identify serial number of the radio frames in the grouping of place, therefore pass through the length
Sequence number field so that including greater number of radio frames in each grouping, that is to say, that can be at interval of greater number of wireless
Frame sends the radio frames as class interval, and the quantity of the radio frames as class interval is fewer, can more reduce because making
For the influence caused by the wireless frame loss of class interval to recipient's receiving efficiency.
To need to transmit the data instance of 100 bytes by the long corresponding bit sequence of packet of radio frames, according to the application
Above-described embodiment, 10 data frames of every transmission need to send a packet frames, need 10 packet frames altogether.But if
The number of bits of sequence number field in the long corresponding bit sequence of the packet of radio frames is less than or equal to 3, for example is equal to 3, then needs 25
A packet frames.Data frame position determines that docking debit is most important, because radio frame transmission process is easily lost, recipient one
It is secondary be difficult information search is complete, circulation receive process in, often receive a data, it is thus necessary to determine that the position of the data.By
Not high in the reliability of wireless transmission, the loss of packet frames easily causes the data of previous grouping to parse and causes confusion, influences to connect
The efficiency of debit, therefore the quantity of packet frames is reduced using the embodiment of the present application, and then can guarantee recipient to a certain extent
Reception reliability.
It is the schematic diagram of data transmission method process provided by the embodiments of the present application referring to Fig. 6.The process describes data
The treatment process of sender, the process can be executed by the data transmission device as data sender.The data transmission device
It is provided with wireless module, such as Wi-Fi module, can send and handle radio frames.For example, the data transmission device can be shifting
Move terminal or can be wireless router or home gateway etc..
As shown in fig. 6, the process may include following steps:
Step 601: obtaining and need by the data of the long corresponding bit sequence carrying of packet of radio frames;
Step 602: according to the data got, determining the long corresponding bit sequence of the packet of radio frames, make the radio frames
The long corresponding bit sequence of packet in data field carry the data, wherein the long corresponding bit sequence of the packet of the radio frames
It include sequence number field and data field in column, the number of bits of the sequence number field is at least more than 3;
Step 603: generating the radio frames according to the packet of the radio frames is long;
Step 604: sending the radio frames.
The structure of radio frames described in above-mentioned process, the long corresponding bit sequence of packet can be as previously described.For example, serial number
Domain is located at the higher bit bit position in the long corresponding bit sequence of packet, and the data field is located in the long corresponding bit sequence of packet
Low bit bit position.Preferably, the number of bits of the sequence number field is 4, and the number of bits of the data field is 7.
In step 601, the long corresponding ratio of packet needed by radio frames can be obtained as the data transmission device of sender
The data of special sequence carrying, the data can be a byte in a byte sequence, such as in an ascii string
One ascii character.
It in step 602, can be corresponding by the packet length of radio frames by the needs as the data transmission device of sender
The data of bit sequence carrying are converted to the corresponding value of ascii character, according to the corresponding value of ascii character after conversion,
The value for determining data field in the long corresponding bit sequence of the packet of the radio frames makes the long corresponding bit of the packet of the radio frames
Data field in sequence carries the data.
In step 603, the data transmission device as sender can be corresponding according to the packet length determined in step 602
Bit sequence generates the radio frames of corresponding length.Under normal conditions, the frame head part of radio frames and the length of frame check part are
It is changeless, therefore can be by adjusting the length of frame entity part, so that the length of the radio frames generated and step 602 institute are really
Equal length represented by the long corresponding bit sequence of the packet made.
It further, in step 602, can also be according to the radio frames affiliated as the data transmission device of sender
Serial number in grouping determines the value of the bit of sequence number field in the long corresponding bit sequence of the packet of the radio frames, the sequence
In the first value range, first value range does not overlap the value of bit with the second value range in number domain, or
The first value is not included in first value range described in person, wherein if the serial number in the long corresponding bit sequence of the packet of radio frames
The value of the bit in domain is in second value range or is first value, then the packet length of the radio frames is corresponding
The bit of data field in bit sequence is used to carry packet number.
For example, for the format of the long corresponding bit sequence of the packet of the radio frames shown in Fig. 3 a and Fig. 3 b, as
The long corresponding bit sequence of packet can be arranged in the data transmission device of sender according to serial number of the current data frame in affiliated grouping
In the value of bit of sequence number field obtain the bit in conjunction with the value of the bit of the data field in the bit bit sequence
The value of sequence, that is, the packet of current data frame is long.
Further, can also be sent before or after sending the radio frames as the data transmission device of sender with
Lower radio frames: the value of the bit of the data field in the long corresponding bit sequence of the packet of the radio frames is in the 4th value range
Interior, the 4th value range is the value range of grouping serial number, and the 4th value range is not handed over third value range
Folded, the third value range is to need to wrap value corresponding to the data that long corresponding bit sequence carries using radio frames
Range.
For example, for the format of the long corresponding bit sequence of the packet of the radio frames shown in Fig. 3 a and Fig. 3 b, as
When the data transmission device of sender determines to send packet frames, determine that the packet number of the packet frames, the value range of packet number are
[0,31], the value of the bit for the data field in the long corresponding bit sequence of packet which is arranged according to the packet number.
By the value of the bit of the sequence number field in the long corresponding bit sequence of the packet of the packet frames be set as 11 or be set as [11,
16] any one integer in range is packet frames to be used to identify the radio frames.Wherein, the packet length of data frame is corresponding
The bit value range of data field in bit sequence is [32,126], in the long corresponding bit sequence of the packet of packet frames
The value range of the bit of data field does not overlap.
Data field in the long corresponding bit sequence of the packet of one data frame can usually carry a byte, such as one
Ascii character includes multiple bytes, such as multiple ASCII words if necessary to the data by the long corresponding bit sequence carrying of packet
The long corresponding bit sequence of packet of the data frame of respective numbers can be used then to carry the data of multiple byte in symbol.Fig. 5 shows
Show to example property the schematic diagram that multiple byte datas are carried with the long corresponding bit sequence of the packet of multiple data frames, byte in figure
1 to byte n indicates to need the data of the long transmission of packet by radio frames, for example, a byte can represent an ascii character.
Preferably, above-described embodiment can be applied to the scene of wireless network access, under the scene, the needs are by nothing
The data of the long corresponding bit sequence carrying of the packet of line frame can include: for carrying out the account information of wireless network access, or
The access pin of wireless network, for example can be the access pin of WLAN.
In above-described embodiment of the application, needed since the data field of the long corresponding bit sequence of packet by radio frames carries
The data of access side are sent to, enable the recipient to obtain the number needed according to the long corresponding bit sequence of packet of radio frames
According to.Especially under the scene of access WLAN, the account information of WLAN can be carried on radio frames by sender
The long corresponding bit sequence of packet is sent to recipient, so that recipient obtains the account information of WLAN, to can access
WLAN.In addition, since the number of bits of the sequence number field in the long corresponding bit sequence of the packet of radio frames is greater than 3, due to
Sequence number field in the long corresponding bit sequence of packet can be used to identify serial number of the radio frames in the grouping of place, therefore pass through the length
Sequence number field so that including greater number of radio frames in each grouping, that is to say, that can be at interval of greater number of wireless
Frame sends the radio frames as class interval, and the quantity of the radio frames as class interval is fewer, can more reduce because making
For the influence caused by the wireless frame loss of class interval to recipient's receiving efficiency.
It should be noted that the number of various needs can be carried by the long corresponding bit sequence of packet using the embodiment of the present application
According to being sent to recipient.For example, these data include but is not limited to: data word joint number (i.e. overall length), flag bit (flag), SSID
Length, SSID, the length of access pin, access pin, Frame Check Sequence etc..Wherein, data word joint number (overall length), flag bit
(flag), the length of SSID and the length of access pin, can occupy 1 byte respectively, and Frame Check Sequence occupies 2 words
Section, SSID and access pin can occupy multiple bytes respectively.
Wherein, the mark bit sequence of radio frames can be defined as follows:
Bit7: it is fixed as 0;
Bit6 is to bit5: reserved field;
Bit4 is to bit3: protocol version, current version 00;
Bit2 to bit1: load (payload) information cipher mode, 00 indicates no encryption, and 01 indicates stream cipher (stream
cipher);
Whether bit0: including SSID.
It is long with the packet of radio frames shown in Fig. 3 a and Fig. 3 b below in order to be more clearly understood that above-described embodiment of the application
For corresponding bit sequence format, under the scene of description wireless network access, pass through the long corresponding bit sequence of the packet of radio frames
Column carry the process for accessing the account information of WLAN.
The scene are as follows: smart home device is by the account information of acquisition for mobile terminal WLAN to access wireless office
Domain net.
The process can be described as: application program is equipped on mobile terminal, the function of the application program is can be using this
Apply for that the mode of above-described embodiment sends the account information of WLAN by the long corresponding bit sequence of packet of radio frames.
Corresponding application program is installed, the function of the application program is can to use the above embodiments of the present application on smart home device
Mode receive radio frames, and the account letter of WLAN that the long corresponding bit sequence of the packet for obtaining radio frames is carried
Breath.
After the above-mentioned application program installed on mobile terminal and smart home device is opened, acquisition for mobile terminal is wireless office
The account information of domain net, account information include: that SSID is 1234, access pin abcd.Account information can be by a variety of
Mode is obtained by mobile terminal, for example, being cached with account information on mobile terminal or by being manually inputted into the account
Information.
Mobile terminal sequence sends 18 radio frames, wherein every 10 radio frames send the nothing for being used to be spaced grouping
Line frame.Wherein, the long corresponding bit sequence of packet that sender and recipient can arrange the 2nd to the 5th radio frames is respectively intended to hold
Carry total length information, the length information of flag, SSID, access pin length information, radio frames thereafter packet length it is corresponding
Bit sequence is successively used to transmit the ascii character of SSID and access pin, the long corresponding bit sequence of the packet of last 2 radio frames
Column are used to carry frame check sequence.Sender send radio frames include:
The value of the bit of sequence number field in the long corresponding bit sequence of the packet of radio frames 1 is 1011, the ratio of data field
The value of special position is 0000000, which indicates the packet number of first grouping;
The value of the bit of sequence number field in the long corresponding bit sequence of the packet of radio frames 2 is 0001, the ratio of data field
The value of special position be 0001110, the value indicate total length information, decimal system value be 14 because total length information, flag,
SSID length information, access pin length information, Frame Check Sequence, 4 ascii characters SSID and 4 ascii character
Access pin is total to occupy 14 bytes;
The value of the bit of sequence number field in the long corresponding bit sequence of the packet of radio frames 3 is 0010, the ratio of data field
The value of special position is 0000000, which indicates the value of flag flag bit;
The value of the bit of sequence number field in the long corresponding bit sequence of the packet of radio frames 4 is 0011, the ratio of data field
The value of special position is 0000100, which indicates that SSID is made of 4 ascii characters;
The value of the bit of sequence number field in the long corresponding bit sequence of the packet of radio frames 5 is 0100, the ratio of data field
The value of special position is 0000100, which indicates that access pin is made of 4 ascii characters;
The value of the bit of sequence number field in the long corresponding bit sequence of the packet of radio frames 6 is 0101, the ratio of data field
The value of special position is 0110001, which indicates that first ascii character of SSID is 1;
The value of the bit of sequence number field in the long corresponding bit sequence of the packet of radio frames 7 is 0110, the ratio of data field
The value of special position is 0110010, which indicates that second ascii character of SSID is 2;
The value of the bit of sequence number field in the long corresponding bit sequence of the packet of radio frames 8 is 0111, the ratio of data field
The value of special position is 0110011, which indicates that the third ascii character of SSID is 3;
The value of the bit of sequence number field in the long corresponding bit sequence of the packet of radio frames 9 is 1000, the ratio of data field
The value of special position is 0110100, which indicates that the 4th ascii character of SSID is 4;
The value of the bit of sequence number field in the long corresponding bit sequence of the packet of radio frames 10 is 1001, the ratio of data field
The value of special position is 1100001, which indicates that first ascii character of access pin is a;
The value of the bit of sequence number field in the long corresponding bit sequence of the packet of radio frames 11 is 1010, the ratio of data field
The value of special position is 1100010, which indicates that second ascii character of access pin is b;
The value of the bit of sequence number field in the long corresponding bit sequence of the packet of radio frames 12 is 1011, the ratio of data field
The value of special position is 0000010, which indicates the packet number of second grouping;
The value of the bit of sequence number field in the long corresponding bit sequence of the packet of radio frames 13 is 0001, the ratio of data field
The value of special position is 1100011, which indicates that the third ascii character of access pin is c;
The value of the bit of sequence number field in the long corresponding bit sequence of the packet of radio frames 14 is 0010, the ratio of data field
The value of special position is 1100100, which indicates that the 4th ascii character of access pin is d;
The value of the bit of sequence number field in the long corresponding bit sequence of the packet of radio frames 15 is 0011, the ratio of data field
The value of special position is the check value of 7 bits;
The value of the bit of sequence number field in the long corresponding bit sequence of the packet of radio frames 16 is 0100, the ratio of data field
The value of special position is the check value of 7 bits.
After smart home device receives above-mentioned radio frames, the packet for calculating separately out each radio frames is long, by the long value of packet
Binary sequence is converted to, according to the value of the bit of the data field in the long corresponding binary sequence of the packet of each data frame
The ascii character of corresponding length information, flag, Frame Check Sequence and SSID and access pin is obtained, and according to data frame
The long corresponding binary sequence of packet in sequence number field bit value and packet frames the long corresponding binary system sequence of packet
The value of the bit of data field in column determines the assembled sequence of the ascii character of SSID and access pin, to obtain
Whole SSID and access pin, and then account information access WLAN can be used.
Based on the same technical idea, the embodiment of the present application also provides a kind of data as data receiver to transmit dress
It sets and a kind of data transmission device as data sender.
It is the structural schematic diagram of data transmission device provided by the embodiments of the present application referring to Fig. 7.The data transmission device can
As data receiver, data transmission stream journey above-mentioned is executed.The data transmission device is provided with wireless module, such as Wi-
Fi module can receive and handle radio frames.For example, the data transmission device can be smart home device or embedded device
Deng.
As shown, the data transmission device can include: receiving module 701, the first determining module 702, second determine mould
Block 703, third determining module 704, in which:
Receiving module 701, for receiving radio frames;
First determining module 702, the packet for determining the radio frames is long, the long corresponding bit sequence of the packet of the radio frames
Column include sequence number field and data field, and the number of bits of the sequence number field is at least more than 3;
Second determining module 703, in the long corresponding bit sequence of packet according to the radio frames sequence number field and/or
The value of the bit of data field, determines whether the long corresponding bit sequence of the packet of the radio frames is used to carry data;
Third determining module 704, in the case where the second determining module 703 is determined as, according to the radio frames
The long corresponding bit sequence of packet in data field bit value, determine the long corresponding bit sequence of the packet of the radio frames
Arrange carried data.
Wherein, the sequence number field is located at the higher bit bit position in the long corresponding bit sequence of packet, and the data field is located at
Low bit bit position in the long corresponding bit sequence of packet.
Wherein, the radio frames are the radio frames of 802.11 protocol definitions, and the number of bits of the sequence number field is 4, described
The number of bits of data field is 7.
Wherein, the data that the long corresponding bit sequence of the packet of the radio frames is carried include: for carrying out wireless network
The account information of access or the access pin of wireless network.
Preferably, third determining module 704 can be specifically used for: according in the long corresponding bit sequence of the packet of the radio frames
The value of the bit of data field determines ascii character, and the packet that the ascii character determined is determined as the radio frames is long
The data that corresponding bit sequence is carried.
Preferably, the second determining module 703 can be specifically used for: if sequence in the long corresponding bit sequence of the packet of the radio frames
The value of the bit in number domain is in the first value range, it is determined that the long corresponding bit sequence of the packet of the radio frames is used to hold
Carry data, wherein the value of the bit of sequence number field is described for identifying in the long corresponding bit sequence of the packet of the radio frames
Serial number of the radio frames in affiliated grouping.
Further, the second determining module 703 can also be used in: if sequence in the long corresponding bit sequence of the packet of the radio frames
The value of the bit in number domain is in the second value range or is the first value, it is determined that the long corresponding ratio of the packet of the radio frames
Special sequence is used to carry packet number, wherein and second value range is not overlapped with first value range, and described first
Value is not in first value range.
Preferably, the second determining module 703 can be specifically used for: if number in the long corresponding bit sequence of the packet of the radio frames
According to domain bit value in third value range, it is determined that the long corresponding bit sequence of the packets of the radio frames is used to hold
Data are carried, the third value range is to need to take corresponding to the data carried as the long corresponding bit sequence of packet of radio frames
It is worth range.
Further, the second determining module 703 can also be used in: if number in the long corresponding bit sequence of the packet of the radio frames
According to domain bit value in the 4th value range, it is determined that the long corresponding bit sequence of the packets of the radio frames is used to hold
Packet number is carried, the 4th value range is the value range of grouping serial number, the third value range and the 4th value
Range does not overlap.
It is the structural schematic diagram of data transmission device provided by the embodiments of the present application referring to Fig. 8.The data transmission device can
As data sender, data transmission stream journey above-mentioned is executed.The data transmission device is provided with wireless module, such as Wi-
Fi module can send and handle radio frames.For example, the data transmission device can be mobile terminal or can be no route
By device or home gateway etc..
As shown in figure 8, the device can include: obtain module 801, determining module 802, generation module 803 and send mould
Block 804, in which:
Module 801 is obtained, is needed for obtaining by the data of the long corresponding bit sequence carrying of packet of radio frames;
Determining module 802, for determining the long corresponding bit sequence of the packet of radio frames, making institute according to the data got
The data field stated in the long corresponding bit sequence of packet of radio frames carries the data, wherein the packet of the radio frames is long to be corresponded to
Bit sequence in include sequence number field and data field, the number of bits of the sequence number field is at least more than 3;
Generation module 803, for generating the radio frames according to the packet of the radio frames is long;;
Sending module 804, for sending the radio frames.
Wherein, the sequence number field is located at the higher bit bit position in the long corresponding bit sequence of packet, and the data field is located at
Low bit bit position in the long corresponding bit sequence of packet.
Wherein, the radio frames are the radio frames of 802.11 protocol definitions, and the number of bits of the sequence number field is 4, described
The number of bits of data field is 7.
Wherein, described to need by the data of the long corresponding bit sequence carrying of packet of radio frames to include: wireless for carrying out
The account information of network insertion or the access pin of wireless network.
Preferably, determining module 802 can be specifically used for: the data that will acquire are converted to the corresponding value of ascii character,
According to the corresponding value of ascii character after conversion, data field in the long corresponding bit sequence of the packet of the radio frames is determined
Value makes the data field in the long corresponding bit sequence of the packet of the radio frames carry the data.
Further, it is determined that module 802 can also be used in: according to serial number of the radio frames in affiliated grouping, determining institute
The value of the bit of sequence number field in the long corresponding bit sequence of packet of radio frames is stated, the value of bit exists in the sequence number field
In first value range, first value range and the second value range do not overlap or first value range in
Not comprising the first value, wherein if the value of the bit of the sequence number field in the long corresponding bit sequence of the packet of radio frames is in institute
It states in the second value range or for first value, then the data field in the long corresponding bit sequence of the packet of the radio frames
Bit is used to carry packet number.
Further, sending module 804 can be also used to: be sent before or after sending the radio frames wireless
Frame: the value of the bit of the data field in the long corresponding bit sequence of the packet of the radio frames is described in the 4th value range
4th value range is the value range of grouping serial number, and the 4th value range is not overlapped with third value range, described
Third value range is to need to wrap value range corresponding to the data that long corresponding bit sequence carries using radio frames.
In conclusion since the data field carrying of the long corresponding bit sequence of packet by radio frames needs to be sent to access
The data of side enable the recipient to obtain the data needed according to the long corresponding bit sequence of packet of radio frames.Especially connecing
Under the scene for entering WLAN, the account information of WLAN can be carried on the long corresponding ratio of packet of radio frames by sender
Special sequence is sent to recipient, so that recipient obtains the account information of WLAN, to can access WLAN.Separately
Outside, since the number of bits of the sequence number field in the long corresponding bit sequence of the packet of radio frames is greater than 3, due to the long corresponding bit of packet
Sequence number field in sequence can be used to identify serial number of the radio frames in the grouping of place, therefore pass through the sequence number field of the length, so that
It include greater number of radio frames in each grouping, that is to say, that a work can be sent at interval of greater number of radio frames
For the radio frames of class interval, and the quantity of the radio frames as class interval is fewer, can more reduce because as class interval
Influence caused by wireless frame loss to recipient's receiving efficiency.
The application is referring to method, the process of equipment (system) and computer program product according to the embodiment of the present application
Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions
The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs
Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce
A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real
The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates,
Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or
The function of being specified in multiple boxes.
These computer program instructions can also be loaded into computer or other programmable data processing devices, so that counting
Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or
The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one
The step of function of being specified in a box or multiple boxes.
Although the preferred embodiment of the application has been described, it is created once a person skilled in the art knows basic
Property concept, then additional changes and modifications may be made to these embodiments.So it includes excellent that the following claims are intended to be interpreted as
It selects embodiment and falls into all change and modification of the application range.
Obviously, those skilled in the art can carry out various modification and variations without departing from the essence of the application to the application
Mind and range.In this way, if these modifications and variations of the application belong to the range of the claim of this application and its equivalent technologies
Within, then the application is also intended to include these modifications and variations.