CN109922057A - UDP message recombination method based on frame sequence - Google Patents
UDP message recombination method based on frame sequence Download PDFInfo
- Publication number
- CN109922057A CN109922057A CN201910144422.9A CN201910144422A CN109922057A CN 109922057 A CN109922057 A CN 109922057A CN 201910144422 A CN201910144422 A CN 201910144422A CN 109922057 A CN109922057 A CN 109922057A
- Authority
- CN
- China
- Prior art keywords
- data
- index
- frame
- airkiss
- seq
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Landscapes
- Mobile Radio Communication Systems (AREA)
Abstract
The present invention provides a kind of UDP message recombination methods based on frame sequence, the order sent based on internet udp data frame, and the repeatability that airkiss distribution protocol data is sent, it repeats to send UDP message in data sending terminal, in data receiver based on the serial number for sending frame, position when received Data Matching to data is sent carries out data recombination, realizes that data are complete, continuously receive.The beneficial effects of the present invention are: the problem that the UDP message loss rate for effectively having evaded airkiss is high, several times improve the success rate of airkiss intelligent network distribution, the time of airkiss intelligent network distribution is shortened.
Description
Technical field
The present invention relates to UDP message recombination method more particularly to a kind of UDP message recombination methods based on frame sequence.
Background technique
In recent years, as smart home, Internet of Things are increasingly popularized, the smart machine of these not input functions how is allowed
Internet is accessed, is always the hot spot discussed in the industry.TI company proposes smartConfig intelligent network distribution algorithm earliest, introduces
It is encoded with Length field, to transmit SSID (service set) and PWD (password) letter of AP (wireless access points)
Breath.The perfect this intelligent network distribution algorithm of wechat, and referred to as airkiss technology, wechat airkiss technology is gradually at present
Leading position is occupied on the market.
Wechat Airkiss distribution basic procedure is as follows:
1.wifi smart machine is with the operation of station promiscuous mode;
2. ssid the and psw password that handset Wechat client sends router by Airkiss;
3.wifi equipment gets ssid and psw password by packet capturing, is then attached to router.
Airkiss data flowchart is as shown in Figure 1, the WIFI chip built in intelligent terminal is in promiscuous mode, by grabbing
Data packet is taken, then loses and gives the processing of airkiss program, due to the complexity of network environment, may be simultaneously present many a roads WIFI
By device or routing device, lead to receive very more invalid datas.In addition, the transmission of airkiss client is connectionless
UDP, data are often lost.The superposition of these factors, causes the packet loss in the airkiss received to reach 30%-40%,
When WIFI environment difference, packet loss has been even up to 50%.
The agreement of airkiss provides:
1. continuously receiving 4 correct guide code, this WIFI channel is locked, magic code to be received is waited.
2. continuously receive 4 correct magic code, obtain total length and ssid verification and.
3. continuously receive 4 correct prefix code, obtain password (psw) length and psw verification and.
More than 4. 6 correct psw and ssid of reception and data (index and 4 data word containing 1 data field
Section), receive number is equal to total length/4.
It is provided from agreement it can be calculated that if with 30% packet loss, the probability for continuously receiving 4 correct bytes is
0.7*0.7*0.7*0.7=0.24, the probability for continuously receiving 6 correct bytes is 0.7*0.7*0.7*0.7*0.7*0.7=
0.11.For statistically, 4 continuous correct bytes can be received by needing running fire 5 times, need just receive for running fire 10 times
6 continuous correct bytes.When packet loss reaches 50%, it has been difficult to be properly received the data of psw and ssid.
In fact also just so, before not using based on the UDP message reassembly algorithm of frame sequence, psw and ssid are received
Data, ten just can once succeed several times.Even if success, it is also desirable to the very long distribution time.
Therefore, if the distribution success rate for improving airkiss is those skilled in the art's technical problem urgently to be resolved.
Summary of the invention
In order to solve the problems in the prior art, the present invention provides a kind of UDP message recombination methods based on frame sequence.
The present invention provides a kind of UDP message recombination methods based on frame sequence, are sent based on internet udp data frame
Order and airkiss distribution protocol data send repeatability, data sending terminal repeat send UDP (user data
Datagram protocol) data, data receiver based on send frame serial number, by received Data Matching to data transmission when position,
Data recombination is carried out, realizes that data are complete, continuously receive.
As a further improvement of the present invention, data recombination is carried out in such a way that data byte is filled in accumulation.
As a further improvement of the present invention, comprising the following steps:
(1) airkiss_recv receives the data that client sends over, and after receiving guide code, calls
Airkiss_filter crosses filter data, only receives the frame of the address mac identical with guide code frame, including the address transmitting terminal mac,
Send the address router mac, the receiving end address mac;
(2) data validity is judged, receives data several times, if any one data in the 1st, 2 and 3-6
3 data meet agreement regulation altogether, then are primary effective data;
(3) the 2nd byte index represent the serial number 0-need_seq of seq data group, and the data specifically received are placed
To in seq_data [index], totally 6 bytes, the 1st byte represent the school crc of this data group to seq_data [index]
Test and, the 2nd byte index, the 3-6 byte is data, is verified after 4 data all receive;
(4) 4 data bit thereafter are successively checked, first by frame number frame_id and index locating for data
Frame_id subtracts each other, and is exactly effective data if range is within 1-4, is placed into corresponding seq_data [index] [id]
In;
(5) by the data group where index, crc inspection is carried out, and judges whether index data group all collects, seq_
Data [index] all data are not 0 to show that data are all collected;
(6) it if the data of index data group are not collected all or crc verification does not pass through, proceeds to (1) step and connects
Receive data;
(7) if the data of index data group are all collected, and crc verification passes through, and represents index data group
It receives successfully;
(8) 0-need_seq is checked whether, whether the data of need_seq all receive successfully altogether;
(9) it if not receiving data there are also some data groups, proceeds to (1) step and receives data;
(10) 0-need_seq all data whole OK are stored in ssid and psw array, are written to wpa_
Supplicant.conf file, and script is called to connect network.
The beneficial effects of the present invention are: the problem that the UDP message loss rate for effectively having evaded airkiss is high, several times
The success rate for improving airkiss intelligent network distribution shortens the time of airkiss intelligent network distribution.
Detailed description of the invention
Fig. 1 is airkiss data flowchart in the prior art.
Fig. 2 is a kind of ssid and psw data field definition structure of the UDP message recombination method based on frame sequence of the present invention
Figure.
Fig. 3 is a kind of airkiss cooperation fundamental block diagram of UDP message recombination method based on frame sequence of the present invention.
Fig. 4 is the present invention a kind of the airkiss data processing and state diagram of the UDP message recombination method based on frame sequence.
Fig. 5 is a kind of flow chart of the UDP message recombination method based on frame sequence of the present invention.
Specific embodiment
The invention will be further described for explanation and specific embodiment with reference to the accompanying drawing.
As shown in Figures 2 to 5, a kind of UDP message recombination method based on frame sequence is based on internet udp data frame
The repeatability that the order and airkiss distribution protocol data of transmission are sent repeats to send UDP message in data sending terminal,
Data recombination is carried out by received Data Matching to position when data transmission based on the serial number for sending frame in data receiver,
Realize that data are complete, continuously receive.
A kind of UDP message recombination method based on frame sequence provided by the invention is sent based on internet udp data frame
Order and airkiss distribution protocol data send repeatability, data receiver based on send frame serial number, will
Position when received Data Matching is sent to data is recombinated, and the UDP message loss rate of airkiss has effectively been evaded
High problem, several times improve the success rate of airkiss intelligent network distribution, shorten the time of airkiss intelligent network distribution.Therefore,
This method has larger value for the promotion and application of airkiss intelligent network distribution.Meanwhile this method is also to connectionless UDP number
A kind of reference is provided according to transmission: can be connect in receiving end based on frame sequence progress data recombination by repeating to send UDP message
Data are received, a kind of effect of virtual link may be implemented.
In airkiss program, the airkiss data received are printed, data slot is as follows:
451,[08 42 00 00 ff ff ff ff ff ff b0 e2 35 06 59 98 00 0a f5 86 6d
d4 80 64]
438,[08 42 00 00 ff ff ff ff ff ff b0 e2 35 06 59 98 00 0a f5 86 6d
D4 90 64] // lose 64a0
204,[08 42 00 00 ff ff ff ff ff ff b0 e2 35 06 59 98 00 0a f5 86 6d
D4 b0 64] // lose 64c0
383,[08 42 00 00 ff ff ff ff ff ff b0 e2 35 06 59 98 00 0a f5 86 6d
D4 d0 64] // lose 64e0
387,[08 42 00 00 ff ff ff ff ff ff b0 e2 35 06 59 98 00 0a f5 86 6d
d4 f0 64]
318,[08 42 00 00 ff ff ff ff ff ff b0 e2 35 06 59 98 00 0a f5 86 6d
D4 00 65] // lose 6510
389,[08 42 00 00 ff ff ff ff ff ff b0 e2 35 06 59 98 00 0a f5 86 6d
D4 20 65] // lose 6530,6540
386,[08 42 00 00 ff ff ff ff ff ff b0 e2 35 06 59 98 00 0a f5 86 6d
d4 50 65]
204,[08 42 00 00 ff ff ff ff ff ff b0 e2 35 06 59 98 00 0a f5 86 6d
d4 60 65]
206,[08 42 00 00 ff ff ff ff ff ff b0 e2 35 06 59 98 00 0a f5 86 6d
D4 70 65] // lose 6580,6590,65a0
454,[08 42 00 00 ff ff ff ff ff ff b0 e2 35 06 59 98 00 0a f5 86 6d
d4 b0 65]
243,[08 42 00 00 ff ff ff ff ff ff b0 e2 35 06 59 98 00 0a f5 86 6d
d4 c0 65]
207,[08 42 00 00 ff ff ff ff ff ff b0 e2 35 06 59 98 00 0a f5 86 6d
d4 d0 65]
451,[08 42 00 00 ff ff ff ff ff ff b0 e2 35 06 59 98 00 0a f5 86 6d
D4 e0 65] // lose 65f0
222,[08 42 00 00 ff ff ff ff ff ff b0 e2 35 06 59 98 00 0a f5 86 6d
d4 00 66]
204,[08 42 00 00 ff ff ff ff ff ff b0 e2 35 06 59 98 00 0a f5 86 6d
D4 10 66] // lose 6620,6630
385,[08 42 00 00 ff ff ff ff ff ff b0 e2 35 06 59 98 00 0a f5 86 6d
d4 40 66]
387,[08 42 00 00 ff ff ff ff ff ff b0 e2 35 06 59 98 00 0a f5 86 6d
d4 50 66]
318,[08 42 00 00 ff ff ff ff ff ff b0 e2 35 06 59 98 00 0a f5 86 6d
D4 60 66] // lose 6670
389,[08 42 00 00 ff ff ff ff ff ff b0 e2 35 06 59 98 00 0a f5 86 6d
d4 80 66]
382,[08 42 00 00 ff ff ff ff ff ff b0 e2 35 06 59 98 00 0a f5 86 6d
D4 90 66] // lose 66a0
386,[08 42 00 00 ff ff ff ff ff ff b0 e2 35 06 59 98 00 0a f5 86 6d
d4b0 66]
206,[08 42 00 00 ff ff ff ff ff ff b0 e2 35 06 59 98 00 0a f5 86 6d
d4 d0 66]
From the data received, it can be seen that most latter two byte is incremented by by serial number, this is airkiss client journey
The data that sequence issues, are the Identification (identity) of data frame, later abbreviation ID.
It receives 23 frame data altogether above, loses 14 frame data, packet loss is 14/ (14+32)=30%.The data of loss are
It cannot recover, but since the data of airkiss are to repeat to send, the data of loss are recovered in rear extended meeting repeating transmission, only
It is that the ID of frame is changed.This is the basic thought of algorithm, is had a problem that here, which data is that front is lost
? this just needs to give each data one position, cites an actual example: needing to receive the data " 1357 " of psw, foundation now
Airkiss agreement, code data need to receive continuous 6 bytes, respectively represent:
[crc][index][data1][data2][data3][data4]
Concrete meaning is as follows:
As shown in Fig. 2, the 1st, 2 byte has the byte of special meaning, especially the 2nd to represent the number of this 4 bytes
According to the Index in entire data.UDP message reassembly algorithm based on frame sequence only requires that the 1st, 2 reception is correct, adds one
Data bit is correct.And continuous 6 data of original airkiss protocol requirement are all correct, new algorithm passes through accumulation filling data
The mode of byte substantially increases the validity of data.
1st, 2 byte is inserted into [crc] [index], data thereafter pass through the ID phase of data frame ID and [index]
Subtract, if difference is in the range of 4, then it is assumed that be a valid data, and insert corresponding Data Position.When all 4 numbers
After being completely filled with according to position, crc is checked, completes data receiver.
Or with the airkiss data instance of printing:
222,[08 42 00 00 ff ff ff ff ff ff b0 e2 35 06 59 98 00 0a f5 86 6d
d4 00 66]
204,[08 42 00 00 ff ff ff ff ff ff b0 e2 35 06 59 98 00 0a f5 86 6d
D4 10 66] // lose 6620,6630
385,[08 42 00 00 ff ff ff ff ff ff b0 e2 35 06 59 98 00 0a f5 86 6d
d4 40 66]
387,[08 42 00 00 ff ff ff ff ff ff b0 e2 35 06 59 98 00 0a f5 86 6d
d4 50 66]
318,[08 42 00 00 ff ff ff ff ff ff b0 e2 35 06 59 98 00 0a f5 86 6d
D4 60 66] // lose 6670
Here the 1st, 2 byte is 222 and 204, and valid data are [crc]=0x12, [index]=0, data 385
ID is 6640, differs 3 with the ID of [index], so this is data3, similarly, 387 be data4, and 318 be not significant figure
According to.
This time Data Position filling result is [crc:12] [index:0] [data1] [data2] [data3:35]
[data4:37]。
If subsequent can get data1 and data2 again, even if data obtain completely, crc verifying OK is.
UDP message reassembly algorithm based on frame sequence is used primarily in the step 4 process_sequence of Fig. 4, for AP
Ssid and psw data reception.
As shown in figure 5, a kind of UDP message recombination method based on frame sequence, process flow are specific as follows:
(1) airkiss_recv receives the data that client sends over, after receiving guide code, Lock
Channel (with reference to the serial number 1 and 2 in Fig. 4 airkiss data processing and state diagram), hereafter can call airkiss_filter
Cross filter data, only receive the address mac identical with guide code frame frame (address transmitting terminal mac, transmission the address router mac,
The receiving end address mac).
(2) data validity is judged, the data rule that former algorithm requires continuous 6 bytes to meet sequence
(referring to Fig. 2: ssid and psw data field definition), it is desirable to four data bytes have disposably been received, and have carried out crc verification,
Success rate is very low in complex network environment.
New algorithm goes to receive this four data bytes several times, it is only necessary to which any one data in the 1st, 2 and 3-6 have altogether
3 data meet agreement regulation, are taken as primary effective data.
(3) the 2nd byte index represent the serial number (0-need_seq) of seq data group.The data specifically received will be put
It sets in seq_data [index].Totally 6 bytes, the 1st byte represent the crc of this data group to seq_data [index]
Verification and, the 2nd byte index, the 3-6 byte is data, is verified after 4 data all receive.
(4) 4 data bit thereafter are successively checked, first by frame number frame_id and index locating for data
Frame_id subtracts each other, and is exactly effective data if range is within 1-4, is placed into corresponding seq_data [index] [id]
In.(transmitting terminal continuously transmits when sending data, so frame_id is continuous).
(5) by the data group where index, crc inspection is carried out, and judges whether index data group all collects.
(seq_data [index] all data be not 0 show that data are all collected).
(6) if the data of index data group are not collected all or crc verification does not pass through.(1) step is proceeded to connect
Receive data.
(7) if the data of index data group are all collected, and crc verification passes through, and represents index data group
OK。
(8) check whether 0-need_seq, altogether the data of need_seq whether whole OK.
(9) data are not received there are also some data groups, proceeds to (1) step and receives data.
(10) 0-need_seq all data whole OK are stored in ssid and psw array, are written to wpa_
Supplicant.conf file, and script is called to connect network.
A kind of UDP message recombination method based on frame sequence provided by the invention can be used for guide code, magic code,
The reception of prefix code data, specific as follows:
1, the reception of guide code:
Former algorithm: continuous 4 bytes are received
Data [3]-data [2]=1, data [2]-data [1]=1, data [1]-data [0]=1
UDP message recombination method based on frame sequence:
Situation 1: only receiving data 1,2,4, and the leakage of data 3 is received
Data [1]-data [0]=1, data [2]-data [1]=2,
Id [1]-id [0]=1, id [2]-id [1]=2;
Herein, although missing out data 3, by introduce frame_id parameter, and the frame id of data [2] and
The frame id difference 2 of data [1], we, which clearly know, misses out data 3.By data 1,2,4 it is known that depositing here
In continuous 4 bytes, meet the protocol requirement of guide code.
Situation 2: only receiving data 1,3,4, and the leakage of data 2 is received
Data [1]-data [0]=2, data [2]-data [1]=1,
Id [1]-id [0]=2, id [2]-id [1]=1;
Similarly, by introducing frame_id parameter, we, which clearly know, misses out data 2.Pass through data 1,3,4
Know here there is continuous 4 bytes, meets the protocol requirement of guide code.
In former algorithm, needs continuously to receive 4 data, once receive.Modified hydrothermal process increases frame sequence frame id
Parameter, it is only necessary to receive 3 related datas can, considerably increase success rate.
2, the reception of magic code:
Former algorithm: continuous 4 bytes are received
(data [0] &0x01f0)==0x0000//5-9 is 0x0
(data [1] &0x01f0)==0x0010//5-9 is 0x1
(data [2] &0x01f0)==0x0020//5-9 is 0x2
(data [3] &0x01f0)==0x0030//5-9 is 0x3
UDP message recombination method based on frame sequence:
Situation 1:
(data [0] &0x01f0)==0x0000//5-9 is 0x0
(data [1] &0x01f0)==0x0010//5-9 is 0x1
(data [2] &0x01f0)==0x0020//5-9 is 0x2
Id [1]-id [0]=1, id [2]-id [1]=1
Situation 1 receives 3 effective magic data 0,1,2,
Magic_data [0]=data [0], magic_data [1]=data [1], magic_data [2]=data [2]
Situation 2:
(data [0] &0x01f0)==0x0000//5-9 is 0x0
(data [1] &0x01f0)==0x0010//5-9 is 0x1
(data [2] &0x01f0)==0x0030//5-9 is 0x3
Id [1]-id [0]=1, id [2]-id [1]=2
Situation 2 receives 3 effective magic data 0,1,3,
Magic_data [0]=data [0], magic_data [1]=data [1], magic_data [3]=data [2]
Situation 3:
(data [0] &0x01f0)==0x0000//5-9 is 0x0
(data [1] &0x01f0)==0x0020//5-9 is 0x2
(data [2] &0x01f0)==0x0030//5-9 is 0x3
Id [1]-id [0]=2, id [2]-id [1]=1
Situation 3 receives 3 effective magic data 0,2,3,
Magic_data [0]=data [0], magic_data [2]=data [1], magic_data [3]=data [2]
Situation 4:
(data [0] &0x01f0)==0x0010//5-9 is 0x1
(data [1] &0x01f0)==0x0020//5-9 is 0x2
(data [2] &0x01f0)==0x0030//5-9 is 0x3
Id [1]-id [0]=1, id [2]-id [1]=1
Situation 4 receives 3 effective magic data 1,2,3,
Magic_data [1]=data [0], magic_data [2]=data [1], magic_data [3]=data [2]
It is received when by mostly wheel, after magic_data [0-4] receipt receives completely, does crc verifying, be confirmed whether the company of receiving
Continue 4 maigc code.
In former algorithm, needs continuously to receive 4 data, once receive.Modified hydrothermal process increases frame sequence frame id
Parameter, receive 3 valid data, the data received navigated to sequence when transmission, more wheels receive data, increase
Success rate is added.
3, the reception of prefix code:
Former algorithm: continuous 4 bytes are received
(data [0] &0x01f0)==0x0040//5-9 is 0x4
(data [1] &0x01f0)==0x0050//5-9 is 0x5
(data [2] &0x01f0)==0x0060//5-9 is 0x6
(data [3] &0x01f0)==0x0070//5-9 is 0x7
UDP message recombination method based on frame sequence:
Situation 1:
(data [0] &0x01f0)==0x0040//5-9 is 0x4
(data [1] &0x01f0)==0x0050//5-9 is 0x5
(data [2] &0x01f0)==0x0060//5-9 is 0x6
Id [1]-id [0]=1, id [2]-id [1]=1
Situation 1 receives 3 effective prefix data 0,1,2,
Prefix_data [0]=data [0], prefix_data [1]=data [1], prefix_data [2]=data
[2]
Situation 2:
(data [0] &0x01f0)==0x0040//5-9 is 0x4
(data [1] &0x01f0)==0x0050//5-9 is 0x5
(data [2] &0x01f0)==0x0070//5-9 is 0x7
Id [1]-id [0]=1, id [2]-id [1]=2
Situation 2 receives 3 effective prefix data 0,1,3,
Prefix_data [0]=data [0], prefix_data [1]=data [1], prefix_data [3]=data
[2]
Situation 3:
(data [0] &0x01f0)==0x0040//5-9 is 0x4
(data [1] &0x01f0)==0x0060//5-9 is 0x6
(data [2] &0x01f0)==0x0070//5-9 is 0x7
Id [1]-id [0]=2, id [2]-id [1]=1
Situation 1 receives 3 effective prefix data 0,2,3,
Prefix_data [0]=data [0], prefix_data [2]=data [1], prefix_data [3]=data
[2]
Situation 4:
(data [0] &0x01f0)==0x0050//5-9 is 0x5
(data [1] &0x01f0)==0x0060//5-9 is 0x6
(data [2] &0x01f0)==0x0070//5-9 is 0x7
Id [1]-id [0]=1, id [2]-id [1]=1
Situation 1 receives 3 effective prefix data 1,2,3,
Prefix_data [1]=data [0] at this time, prefix_data [2]=data [1], prefix_data [3]=
data[2]
It is received when by mostly wheel, after prefix_data [0-4] receipt receives completely, does crc verifying, be confirmed whether to receive
Continuous 4 prefix code.
In former algorithm, needs continuously to receive 4 data, once receive.Modified hydrothermal process increases frame sequence frame id
Parameter, receive 3 valid data, the data received navigated to sequence when transmission, more wheels receive data, increase
Success rate is added.
Proof of algorithm is as follows: algorithm is verified on the development board of arm7, before algorithm, airkiss distribution success
Rate is 5% or so, the distribution time 150-180 seconds.After new algorithm, airkiss distribution success rate 80%, distribution time 10-
60 seconds.It significantly provides airkiss distribution success rate and greatly shortens the distribution time.For airkiss distribution promote and
Using there is larger value.
Meanwhile algorithm also provides a kind of reference to connectionless UDP message transmission, it can be by repeating to send UDP number
According to, receiving end using based on frame sequence UDP message reassembly algorithm receive data, realize a kind of effect of connection.
Below by the LOG for realizing airkiss distribution using innovatory algorithm, the complete procedure of algorithm operation is illustrated.
[+++ ++] [69] [0] [71] [72] // receive guide code data 0,2,3
airkiss_recv_discover success
base len:68
Lock channel in 3//receive guide code
[+++ ++] magic code:[8] [0] [36] [54] // receive magic code data 0,2,3
[+++ ++] magic code:[8] [30] [36] [54] // receive magic code data 0,1,2,3
Airkiss_process_magic_code success//receive magic code
Total_len:20, ssid crc:4e//need to receive 20 bytes
[+++ ++] prefix code:[64] [0] [103] [126] // receive prefix data 0,2,3
[+++ ++] prefix code:[64] [90] [103] [126] // receive prefix data 0,1,2,3
Airkiss_process_prefix_code success//receive prefix code
Pswd_len:10, pswd_lencrc:7e, need seq:5, seq map:1f//need to receive 5 data slices
Section, every time 4 byte
[+++ ++] [crc:12] [index:00] [00,33,00,37] //index 0: receive the 2,4th byte
[+++ ++] [crc:41] [index:03] [00,6e, 67,77] //index 3: receive the 2,3,4th byte
[+++ ++] [crc:6e] [index:02] [00,30,00,7a] //index 2: receive the 2,4th byte
[+++ ++] [crc:41] [index:03] [65,6e, 67,77] //index 3: receive the 1,2,3,4th byte
[+++++]crc ok//index 3ok
[+++ ++] [crc:4a] [index:04] [75,6a, 75,00] //index 4: receive the 1,2,3rd byte
[+++ ++] [crc:6e] [index:02] [00,30, c3,7a] //index 2: receive the 2,3,4th byte
[+++ ++] [crc:12] [index:00] [00,33,35,37] //index 0: receive the 2,3,4th byte
[+++ ++] [crc:72] [index:01] [39,00,34,36] //index 1: receive the 1,2,3rd byte
[+++ ++] [crc:6e] [index:02] [38,30, c3,7a] //index 2: receive the 1,2,3,4th byte
[+++++]crc ok//index 2ok
[+++ ++] [crc:72] [index:01] [39,32,34,36] //index 1: receive the 1,2,3,4th byte
[+++++]crc ok//index 1ok
[+++ ++] [crc:4a] [index:04] [75,6a, 75,6e] //index 4: receive the 1,2,3,4th byte
[+++++]crc ok//index 4ok
[+++ ++] [crc:12] [index:00] [31,33,35,37] //index 0: receive the 1,2,3,4th byte
[+++++]crc ok//index 0ok
User data is:31 33 35 37 39 32 34 36 38 30c3 7a 65 6e 67 7775 6a 75
6e 00
Airkiss completed.
Result:
ssid_crc:[4e]
key_len:[10]
key:[1357924680]
random:[0xc3]
ssid_len:[9]
ssid:[zengwujun]。
The above content is a further detailed description of the present invention in conjunction with specific preferred embodiments, and it cannot be said that
Specific implementation of the invention is only limited to these instructions.For those of ordinary skill in the art to which the present invention belongs, exist
Under the premise of not departing from present inventive concept, a number of simple deductions or replacements can also be made, all shall be regarded as belonging to of the invention
Protection scope.
Claims (3)
1. a kind of UDP message recombination method based on frame sequence, it is characterised in that: sent based on internet udp data frame
The repeatability that order and airkiss distribution protocol data are sent repeats to send UDP message in data sending terminal, in data
Receiving end is carried out data recombination, realizes number based on the serial number for sending frame by received Data Matching to position when data transmission
According to complete, continuous reception.
2. the UDP message recombination method according to claim 1 based on frame sequence, it is characterised in that: by accumulating filler
Data recombination is carried out according to the mode of byte.
3. the UDP message recombination method according to claim 1 based on frame sequence, it is characterised in that: the following steps are included:
(1) airkiss_recv receives the data that client sends over, and after receiving guide code, calls airkiss_
Filter crosses filter data, only receives the frame of the address mac identical with guide code frame, including the address transmitting terminal mac, sends routing
The address device mac, the receiving end address mac;
(2) data validity is judged, receives data several times, if any one data in the 1st, 2 and 3-6 have altogether
3 data meet agreement regulation, then are primary effective data;
(3) the 2nd byte index represent the serial number 0-need_seq of seq data group, and the data specifically received are placed into
In seq_data [index], totally 6 bytes, the 1st byte represent the crc verification of this data group to seq_data [index]
With the 2nd byte index, the 3-6 byte is data, is verified after 4 data all receive;
(4) 4 data bit thereafter are successively checked, first by the frame_id of frame number frame_id and index locating for data
Subtract each other, be exactly effective data if range is within 1-4, is placed into corresponding seq_data [index] [id];
(5) by the data group where index, crc inspection is carried out, and judges whether index data group all collects, seq_data
[index] all data are not 0 to show that data are all collected;
(6) it if the data of index data group are not collected all or crc verification does not pass through, proceeds to (1) step and receives number
According to;
(7) if the data of index data group are all collected, and crc verification passes through, and represents the reception of index data group
Success;
(8) 0-need_seq is checked whether, whether the data of need_seq all receive successfully altogether;
(9) it if not receiving data there are also some data groups, proceeds to (1) step and receives data;
(10) 0-need_seq all data whole OK are stored in ssid and psw array, are written to wpa_
Supplicant.conf file, and script is called to connect network.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910144422.9A CN109922057A (en) | 2019-02-27 | 2019-02-27 | UDP message recombination method based on frame sequence |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910144422.9A CN109922057A (en) | 2019-02-27 | 2019-02-27 | UDP message recombination method based on frame sequence |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109922057A true CN109922057A (en) | 2019-06-21 |
Family
ID=66962548
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910144422.9A Pending CN109922057A (en) | 2019-02-27 | 2019-02-27 | UDP message recombination method based on frame sequence |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109922057A (en) |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101030842A (en) * | 2006-03-03 | 2007-09-05 | 华为技术有限公司 | Method and apparatus for rearranging data in mobile telecommunication system |
CN105187440A (en) * | 2015-09-26 | 2015-12-23 | 北京暴风科技股份有限公司 | Method and system for transmitting video data by using UDP protocol |
CN106027631A (en) * | 2016-05-12 | 2016-10-12 | 腾讯科技(深圳)有限公司 | Data transmission method and device |
CN106686410A (en) * | 2015-11-09 | 2017-05-17 | 中国电信股份有限公司 | HLS streaming media transmission method and apparatus |
CN107104911A (en) * | 2017-04-06 | 2017-08-29 | 清华大学 | The dividing method and sending method of UDP message bag |
CN107276877A (en) * | 2017-08-07 | 2017-10-20 | 深圳酷旗互联网有限公司 | A kind of control method and device of the smart machine based on wechat Airkiss |
JP2018170770A (en) * | 2018-06-01 | 2018-11-01 | 株式会社インフォシティ | Content distribution system |
CN109219045A (en) * | 2018-09-17 | 2019-01-15 | 北京奇艺世纪科技有限公司 | A kind of router connection method, device, electronic equipment and system |
JP3220180U (en) * | 2018-08-21 | 2019-02-21 | 嶺南師範学院 | Domestic pet feeder system based on the Airkiss technology |
CN109379355A (en) * | 2018-10-11 | 2019-02-22 | 无锡威孚力达催化净化器有限责任公司 | Adaptive reliable multiwindow data transmission method based on udp protocol |
-
2019
- 2019-02-27 CN CN201910144422.9A patent/CN109922057A/en active Pending
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101030842A (en) * | 2006-03-03 | 2007-09-05 | 华为技术有限公司 | Method and apparatus for rearranging data in mobile telecommunication system |
CN105187440A (en) * | 2015-09-26 | 2015-12-23 | 北京暴风科技股份有限公司 | Method and system for transmitting video data by using UDP protocol |
CN106686410A (en) * | 2015-11-09 | 2017-05-17 | 中国电信股份有限公司 | HLS streaming media transmission method and apparatus |
CN106027631A (en) * | 2016-05-12 | 2016-10-12 | 腾讯科技(深圳)有限公司 | Data transmission method and device |
CN107104911A (en) * | 2017-04-06 | 2017-08-29 | 清华大学 | The dividing method and sending method of UDP message bag |
CN107276877A (en) * | 2017-08-07 | 2017-10-20 | 深圳酷旗互联网有限公司 | A kind of control method and device of the smart machine based on wechat Airkiss |
JP2018170770A (en) * | 2018-06-01 | 2018-11-01 | 株式会社インフォシティ | Content distribution system |
JP3220180U (en) * | 2018-08-21 | 2019-02-21 | 嶺南師範学院 | Domestic pet feeder system based on the Airkiss technology |
CN109219045A (en) * | 2018-09-17 | 2019-01-15 | 北京奇艺世纪科技有限公司 | A kind of router connection method, device, electronic equipment and system |
CN109379355A (en) * | 2018-10-11 | 2019-02-22 | 无锡威孚力达催化净化器有限责任公司 | Adaptive reliable multiwindow data transmission method based on udp protocol |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103945369B (en) | A kind of length by checking WIFI packets realizes the Internet-surfing configuration method of WIFI equipment | |
CN103765848B (en) | The apparatus and method replaced are controlled for media interviews | |
EP1594284B1 (en) | MAC header compression for use with frame aggregation | |
CN100571124C (en) | Prevent the method for Replay Attack and guarantee the unduplicated method of message SN | |
EP2288195A2 (en) | Method and apparatus for reducing overhead for integrity check of data in wireless communication system | |
CN101156351A (en) | Key updating method and device | |
CN105119900B (en) | Information secure transmission method, networking cut-in method and corresponding terminal | |
CN106452688A (en) | Beidou data lost message retransmission method and system | |
CN110392998B (en) | Data packet checking method and equipment | |
CN107682859A (en) | Message treatment method and relevant device | |
CN106911428B (en) | Information transmission method and device | |
CN108924827A (en) | A kind of fast access method and system of wireless network | |
CN106878324A (en) | Short message authentication method, short message certification server and terminal | |
CN102045714A (en) | Method and device for providing intercommunication security of 3GPP (third generation partnership project) network and wireless local area network | |
JP5494995B2 (en) | Method, apparatus, and system for obtaining a local domain name | |
Vanhoef | A time-memory trade-off attack on WPA3's SAE-PK | |
CN102685746A (en) | Method, device and system for verifying mobile equipment | |
CN109922057A (en) | UDP message recombination method based on frame sequence | |
WO2018214070A1 (en) | Decoding method and device | |
CN103095451B (en) | A kind of method being authenticated in sensor network and sensor network | |
CN100579013C (en) | Access authentication system and method for global access mutual operation network | |
CN110417804A (en) | A kind of bidirectional identity authentication encryption communication method and system suitable for chip microcontroller | |
WO2020103159A1 (en) | Message transmitting and receiving method and apparatus | |
CN106888072B (en) | Data transmission method and device | |
CN114930769B (en) | Method, device and system for local communication |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
AD01 | Patent right deemed abandoned |
Effective date of abandoning: 20210223 |
|
AD01 | Patent right deemed abandoned |