Summary of the invention
The object of the present invention is to provide wireless personal local area network and its implementation of a kind of low-frequency band, have advantages such as low-power consumption, high reliability, be particularly suitable for wireless application the less demanding short-distance and medium-distance of data transfer rate.
The technical solution adopted for the present invention to solve the technical problems is: a kind of wireless personal local area network, in one network, comprise a full-function device and one/a plurality of function devices of simplifying, described full-function device and all function device of simplifying communicate, described simplifying do not have the mutual communication ability between the function device, if described full-function device determines that by the back channel scanning of starting shooting channel is idle, then produce network identity and set up to finish network; The described function device of simplifying is found described full-function device by near the channel scanning, and sends this network of request adding to described full-function device, and described full-function device is then simplified the function device Resources allocation and admitted the described function device of simplifying for described.
Among the present invention, the described function device of simplifying sends data by intercepting channel to described full-function device.
Among the present invention, described wireless personal local area network adopts the 433.05-434.79MHz frequency band.
Among the present invention, at the 433.05-434.79MHz frequency band 17 channels are arranged, two adjacent channel distances are 0.1MHz, k channel center frequency F
C=433.10+ (k-1) 0.1[MHz], k=1,2, Λ, 17.
Among the present invention, the physical layer data rate of described wireless personal local area network is 38kb/s, and its transmitter and receiver adopts the modulation and demodulation mode of binary phase shift keying.
The present invention also discloses a kind of implementation method of wireless personal local area network simultaneously, comprises the dynamic frequency of full-function device and step whether definite channel is interfered and the step of simplifying function device transmission data.
Among the present invention, the step whether dynamic frequency of described full-function device and definite channel are interfered specifically comprises:
A1, channel scanning, if find idle channel, the idle channels evaluation tasks is carried out in circulation, otherwise execution in step A2;
A2 waits for Preset Time, judges whether to receive the described Frame that function device is sent of simplifying; If receive, then RRS is put 1, and return steps A 1, otherwise the Frame that described full-function device is sent empty packet puts 0 to described number of times of simplifying function device, and judge whether have the described function device of simplifying to be connected to this network this moment; If no, then return steps A 1, otherwise execution in step A3, wherein RRS is a Boolean variable, is put the signal that 1 expression received RFD, is put the signal that 0 expression does not receive RFD;
A3 to any one described Frame of simplifying an empty packet of function device transmission, and judges whether to receive described replying of function device, the execution in step A4 of simplifying;
A4, if receive described the replying of function device of simplifying, then return steps A 1, otherwise judge that whether Frame that described full-function device sends empty packet judge that greater than described full-function device channel has the number of times of the Frame that must attempt sending empty packet before disturbing to described number of times of simplifying function device, if greater than, then increase by 1, execution in step A5 with channel predetermined number; Otherwise return steps A 3;
A5, judge described channel predetermined number whether greater than 17, if then put 0, execution in step A6 with described channel predetermined number; Otherwise execution in step A6;
A6 calculates described full-function device carrier frequency according to described channel predetermined number, and to revise carrier frequency be described full-function device carrier frequency.
Among the present invention,, adopt the mode accesses network of the carrier sense multiple access that the band conflict avoids, describedly simplify the step that function device sends data and specifically comprise when the described function device of simplifying when having data to send:
B1 revises frequency counter, and it is put 0, and the number of times that skin is kept out of the way is put 0, simultaneously the index kept out of the way to skin of the minimum value assignment of the index that skin is kept out of the way;
B2 keeps out of the way 2
BE0-1 unit back-off period, wherein BE0 is 2 index, expression is simplified function device and is begun to keep out of the way 2 before the next operation
BE0-1 time quantum;
B3 puts 0 with the number of times that internal layer is kept out of the way, simultaneously the index kept out of the way to internal layer of the minimum value assignment of the index that internal layer is kept out of the way;
B4 keeps out of the way 2
BE0-1 unit back-off period, wherein BE1 is 2 index, expression is simplified function device and is detected channel when busy, keeps out of the way 2 before the idle channels evaluation tasks is carried out in beginning next time
BE1-1 time quantum;
B5 carries out the idle channels evaluation tasks, and judges channel free time whether, if not idle, execution in step B6 then; Otherwise the described function device of simplifying sends Frame to described full-function device, and judges and describedly simplify the answer signal whether function device receives described full-function device, sends successfully the end transmission if receive then explain data; Otherwise execution in step B7;
B6, the number of times that internal layer is kept out of the way increases by 1 and the number of times kept out of the way to internal layer of assignment, gets the index that the minimum value assignment is kept out of the way to internal layer simultaneously between index+1 that internal layer is kept out of the way and maximum, and judges that whether number of times that this internal layer keeps out of the way is greater than maximum, if greater than, execution in step B7 then; Otherwise return step B4;
B7, the number of times that skin is kept out of the way increases the number of times that 1 assignment is kept out of the way to skin, simultaneously gets the index that the minimum value assignment is kept out of the way to skin between index+1 that skin is kept out of the way and maximum, and judges that whether number of times that this skin keeps out of the way is greater than maximum, if greater than, execution in step B8 then; Otherwise return step B2;
B8, the described function device of simplifying increases a 0.1MHz with self frequency, simultaneously frequency counter is increased by 1, and whether the determination frequency counter greater than channel predetermined number, if greater than, then send failure, finish to send; Otherwise increase by 1, execution in step B9 with channel predetermined number;
Whether B9 judges described channel predetermined k greater than described channel predetermined number, if greater than, then put 0 with channel predetermined number, and execution in step B10; Otherwise execution in step B10;
B10 calculates described full-function device carrier frequency according to described channel predetermined number, and to revise carrier frequency be described full-function device carrier frequency.
Among the present invention, also comprise described full-function device and the described step of carrying out the data transmission between the function device, need carry out frame check when receiving of simplifying.
Among the present invention, described frame check takes the mode of CRC to carry out verification.Among the present invention, also comprise described full-function device and the described step of carrying out the data transmission between the function device, need carry out frame check when receiving of simplifying.
Among the present invention, described frame check takes the mode of CRC to carry out verification.
By adopting technical solution of the present invention, LR-433-WPAN of the present invention is a kind of lightweight protocol stack, wireless communication protocol cheaply, has advantages such as low-power consumption, high reliability, is particularly suitable for the wireless application to the less demanding short-distance and medium-distance of data transfer rate.
In addition, LR-433-WPAN is provided at the data transfer rate of 38kb/s in the air, the hub-and-spoke network topology structure, complete reception response protocol guarantees the reliability that data transmit, provide abundant channel (17) to satisfy the demand of different application, there are 65536 equipment in 2 byte addresses in network of permission at most, and working channel dynamically changes solution and other is with frequency coexistence problem.
Embodiment
The present invention is further elaborated with specific embodiment with reference to the accompanying drawings below.
As shown in Figure 1, wireless personal local area network of the present invention (low rate 433MHz wirelesspersonal area network, abbreviation LR-433-WPAN) mainly comprises two kinds of equipment: full-function device (full-function device, be called for short FFD) and simplify function device (reduced-functiondevice is called for short RFD).A network has and has only a FFD, but a network can have one or more (maximum 65535) RFD.FFD is the person of foundation of network, can communicate with all RFD; RFD also can communicate by letter with FFD, but does not have the mutual communication ability between the RFD.
Before network did not form, FFD determined by the back channel scanning of starting shooting whether channel is idle, if find idle channels, FFD will produce one 16 PAN at random, and PAN is the sign of a LR-433-WPAN network, and so far network is set up and finished.If FFD does not find idle channels, can't set up network.And RFD finds FFD by near the channel scanning, and in a single day RFD finds FFD, and RFD carves in due course and transmit a request to FFD request adding network, and FFD can and admit this RFD for this RFD Resources allocation.
The carrier sense multiple access that FRD avoids according to the band conflict (carrier sense multipleaccess with collision avoidance is called for short CSMA-CA) mode access media.When an equipment will transmit data, it at first intercepted channel, if channel is just busy, it just continues wait and when channel is idle data is sent.If clash, then wait for a time with the captain, restart then.
As shown in Figure 2, Fig. 2 is the dynamic frequency of FFD and the method flow diagram whether definite channel is interfered.
Step S1, FFD start back channel scanning.Before network did not form, FFD determined by the back channel scanning of starting shooting whether channel is idle.
Step S2 if find idle channel, then sets up a network, and begins to carry out idle channels assessment (CCA) task.The physical layer of LR-433-WPAN agreement has the ability of carrying out the CCA task, and CCA can use following any method to finish:
Method one detects energy level within the receiver limit of power, and the report channel is busy.
Method two receives the signal with LR-433-WPAN protocol-compliant of the present invention (identical modulation system etc.), and the report channel is busy.
Method three, the logical AND of method one and method two/or the result be true, the report channel is busy.
The receiving ability scope can be set according to the sensitivity of receiver.
Step S3 judges whether channel is idle.If FFD detects the channel free time, then return step S2 and carry out the CCA task; Otherwise execution in step S4.
Step S4, if channel is not idle, FFD then waits for 0.1 second, and execution in step S5.
Step S5 judges the Frame of whether receiving RFD in the time that FFD waits for.If in this time, receive the Frame of RFD, execution in step S6 then; Otherwise execution in step S7.
Step S6 if receive the Frame of RFD, puts 1 with RRS, and then returns step S2 and carry out the CCA task, and wherein RRS is a Boolean variable, is put the signal that 1 expression received RFD, is put the signal that 0 expression does not receive RFD.
Step S7 if do not receive the Frame of RFD, then puts 0 with DE, and DE is that FFD sends the number of times of the Frame of empty packet to RFD, and execution in step S8.
Whether step S8, judging has RFD to be connected to network this moment.Carry out the CCA task if no, then return step S2; Otherwise execution in step S9.
Step S9, if had RFD to be connected to network this moment, FFD then sends the Frame of an empty packet to any one RFD, and execution in step S10.
Step S10 judges whether to receive replying of RFD.According to receiving response protocol, RFD should return one and receive acknowledgement frame to FFD after receiving this Frame.If FFD receives acknowledgement frame, represent that then network do not receive interference, return step S2 and carry out the CCA task; Otherwise execution in step S11.
Step S11 if FFD does not receive the acknowledgement frame that RFD sends, then increases by 1 with DE, and judges that whether DE is greater than macMaxDE.MacMaxDE represents that FFD judges that channel has the necessary before trial of interference to send the number of times of the Frame of empty packet.If DE is greater than macMaxDE, execution in step S12 then; Otherwise return step S9.
Step S12, if DE greater than macMaxDE, then increases by 1 with k, k represents channel, and execution in step S13.
Whether step S13 judges k greater than channel predetermined number, for example judges that whether k is greater than 17.At the 433.05-434.79MHz frequency band 17 channels are arranged, two adjacent channel distances are 0.1MHz, k channel center frequency F
C=433.10+ (k-1) 0.1[MHz], k=1,2, Λ, 17.If k is greater than 17, execution in step S14 then; Otherwise execution in step S15.
Step S14 puts 0 with k, and execution in step S15.
Step S15 calculates fc according to k, and to revise carrier frequency be fc, and fc represents the FFD carrier frequency.
As shown in Figure 3, Fig. 3 is the method flow diagram that RFD sends data.
Step T1, RFD adopt the mode accesses network of CSMA-CA when having data to send.
Step T2 revises frequency counter CNT, and it is put 0.
Step T3, the times N B0 that skin is kept out of the way puts 0, gives BE0 with the minimum value macMinBE0 assignment of BE0 simultaneously, and macMinBE0 is a constant, the minimum value of expression BE0.
Step T4 keeps out of the way 2
BE0-1 unit back-off period, BE0 is 2 index, expression RFD begins to keep out of the way 2 before the next operation
BE0-1 time quantum.
Step T5, the times N B1 that internal layer is kept out of the way puts 0, gives BE1 with the minimum value macMinBE1 assignment of BE1 simultaneously, and macMinBE1 is a constant, the minimum value of expression BE1.
Step T6, T7 keeps out of the way 2
BE1-1 unit back-off period, and carry out the CCA task.BE1 is 2 index, and expression RFD detects channel when busy, keeps out of the way 2 before the CCA task is carried out in beginning next time
BE1-1 time quantum.
Step T8 judges whether channel is idle.If channel is not idle, execution in step T9 then; Otherwise execution in step T10.
Step T9, the times N B1 that internal layer is kept out of the way increases by 1 assignment to NB1, and between BE1+1 and macMaxBE1, get the minimum value assignment simultaneously and give BE1, and execution in step T12.
Step T10, if the channel free time, RFD sends Frame to FFD, and execution in step T11.
Step T11 judges whether RFD receives the answer signal of FFD.If RFD receives the answer signal of FFD, then expression sends successfully; Otherwise execution in step T13.
Whether step T12 judges times N B1 that internal layer keeps out of the way greater than macMaxNB1 (maximum of expression NB1), if NB1 greater than macMaxNB1, execution in step T13 then; Otherwise return step T6.
Step T13, the times N B0 that skin is kept out of the way increases by 1 assignment to NB0, and between BE0+1 and macMaxBE0, get the minimum value assignment simultaneously and give BE0, and execution in step T14.
Whether step T14 judges the outer times N B0 that keeps out of the way greater than macMaxNB0 (maximum of expression NB0), if NB0 greater than macMaxNB0, execution in step T15 then; Otherwise return step T4.
Step T15, RFD increases by 1 with frequency counter CNT simultaneously with 0.1MHz of self frequency increase, and execution in step T16.
Whether step T16, determination frequency counter be greater than channel predetermined number, and for example channel predetermined number is 17, if greater than channel predetermined several 17, then expression sends failure; Otherwise execution in step T17.
Step T17 increases by 1 with channel predetermined k, and execution in step T18.
Whether step T18 judges channel predetermined k greater than channel predetermined number, and for example channel predetermined number is 17, if greater than channel predetermined several 17, and execution in step T19 then; Otherwise execution in step T20.
Step T19, k puts 0 with channel predetermined, and execution in step T20.
Step T20 calculates fc according to k, and to revise carrier frequency be fc, and fc represents the FFD carrier frequency.
Below will be elaborated to LR-433-WPAN protocol contents of the present invention.
LR-433-WPAN uses the 433.05-434.79MHz frequency band.At the 433.05-434.79MHz frequency band 17 channels are arranged, two adjacent channel distances are 0.1MHz, k channel center frequency F
C=433.10+ (k-1) 0.1[MHz], k=1,2, Λ, 17.
The LR-433-WPAN maximum transmission power can not surpass the upper limit of local code, specifically can be with reference to following table:
Frequency band |
National region |
The radio-frequency power upper limit |
The regulation document |
433.05-434.79MHz |
Europe |
10mW |
ETSI EN 300 220 |
433.00-434.79MHz |
China |
10mW |
The specification requirement of micropower (short distance) wireless device |
The byte order of transmission of all physical layer frames is first low level rear high-lying.The transmission of multibyte field is high byte behind the first low byte in proper order.The PPDU data packet format is shown in following table physical layer frame form:
32 |
8 |
16 |
Variable |
Synchronization character |
Frame begins |
Frame length |
Physical layer service data |
Physical layer service data is medium access key-course frame (the medium access key-course frame format of face as follows).
Transmitter and receiver: physical layer data rate is 38kb/s.Transmitter adopts binary phase shift keying (binary phase-shift keying is called for short BPSK) modulation system, with reference to the modulation function block diagram shown in Fig. 4 physical layer BPSK modulation.
Physical layer BPSK modulation: receiver adopts the BPSK demodulation mode, with reference to demodulation function figure shown in Fig. 5 physical layer BPSK demodulation.
Medium access key-course frame format:
1, data frame format (being medium access key-course data frame format):
8 |
16 |
16 |
16 |
Variable |
16 |
Frame control |
PAN |
Destination address |
Source address |
Frame data |
Frame check |
Frame check is the entire frame CRC check sign indicating number of (not comprising frame check itself).
2, acknowledgement frame form (for the medium access key-course receives the acknowledgement frame form):
Frame check is CRC (cyclic redundancy check the is called for short CRC) check code of frame type field.
3, frame type:
Frame type field value (hexadecimal) |
Frame type |
Remarks |
01 |
Frame |
Require to receive and reply |
02 |
Receive acknowledgement frame |
Do not require to receive and reply |
The generation of 4, frame check field:
In order to ensure the accuracy that data transmit, the CRC check sign indicating number is added to the frame check field, and the functional block diagram of reference is shown in the generation of Fig. 6 frame check field.
5, receive response protocol:
For the high reliability that guarantees that data transmit, arrived the medium access key-course if receive response protocol, each Frame all has a frame check field (seeing above-mentioned medium access key-course frame format), data receiver generated 2 byte CRC check sign indicating numbers before Frame is passed to physical layer, and was filled into the frame check position of Frame; Data receiver's physical layer is received frame signal, whether wrong according to CRC check code check Frame, and wrongly according to whether make different reactions respectively: if transport process makes a mistake, the data receiver can not send any reception answer signal to data receiver; If transport process does not make a mistake, the data receiver can send one and receive acknowledgement frame to data receiver.
The recipient makes different reactions according to different check results, and transmit leg is then according to whether receiving that receiving acknowledgement frame comes the judgment data transmission whether successful.If do not receive data receiver's reception acknowledgement frame in the regular hour, then data receiver knows that data send not success; If receive data receiver's reception acknowledgement frame, then transmit leg knows that data send successfully.
Below prove compared with prior art that by some concrete data declarations LR-433-WPAN of the present invention the present invention has low data rate, short-distance and medium-distance, low-power consumption, and avoid the advantages such as phase mutual interference between the different agreement equipment.
Since exist in the radio communication various noises, in the face of electromagnetic reflection, barrier to effects such as electromagnetic reflection, diffraction, absorptions, so very complicated to the radio communication effect Analysis.Just for certain parameter different value relatively good and bad the time, can suppose the environment that has only thermal noise a kind of, the Friis equation can be used to and calculate the radio communication effect in this environment.
The Friis equation:
P
R: reception antenna effective power
P
T: transmission antennas transmit power
G
R: receiving antenna gain
G
T: transmitter antenna gain (dBi)
λ: wavelength, λ=c/f, c are light propagation velocitys in a vacuum, and f is a frequency
D: distance
C: light propagation velocity in a vacuum is 299.97245810
6M/s
The advantage of radio communication frequency band can be described with following example:
Suppose transmission antennas transmit power 1mW, transmitter antenna gain (dBi) 1dB, receiving antenna gain 1dB, 100 meters of distances.
When frequency is 2445MHz, have according to the Friis equation:
When frequency is reduced to 433.9MHz, have according to the Friis equation:
Under equal condition, the effective power that the 433.9MHz reception antenna receives is about 30 times of 2445MHz in other words, because the effective power that receives according to Friis equation reception antenna is that (quadratic power of λ=c/f) is inversely proportional to frequency.
Wireless personal local area network of the present invention (being LR-433-WPAN) is the wireless communication protocol of a kind of low data rate, short-distance and medium-distance, low-power consumption.LR-433-WPAN uses the 433.05-434.79MHz frequency band.It supports that maximum data rate reaches 38kb/s.Its outdoor maximum transmitting range reaches 200 meters.Equipment among the LR-433-WPAN is not in resting state when having data to transmit, can reduce the power consumption of equipment like this, extending battery life.
Following table is that various wireless protocols technology compare
To sum up, LR-433-WPAN is a kind of lightweight protocol stack, wireless communication protocol cheaply, has advantages such as low-power consumption, high reliability, is particularly suitable for the wireless application to the less demanding short-distance and medium-distance of data transfer rate.
In addition, some characteristics of LR-433-WPAN comprise: the data transfer rate that is provided at 38kb/s in the air, the hub-and-spoke network topology structure, complete reception response protocol guarantees the reliability that data transmit, provide abundant channel (17) to satisfy the demand of different application, there are 65536 equipment in 2 byte addresses in network of permission at most, and working channel dynamically changes solution and other is with frequency coexistence problem.
And the LR-433-WPAN scope of application comprises: wireless senser, Smart Home, radio meter register, Wireless Keyboard/mouse and wireless bar code reader or the like.
The above is the preferred embodiments of the present invention only, is not limited to the present invention, and for a person skilled in the art, the present invention can have various changes and variation.Within the spirit and principles in the present invention all, any modification of being done, be equal to replacement, improvement etc., all should be included within the claim scope of the present invention.