⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readme.txt

📁 用python实现的802.11b系统的程序。包括可运行的收发程序
💻 TXT
字号:
This directory contains examples for transmitting and receiving 802.11style bpsk.  The following are brief descriptions of the python scripsin this directory.bbn_80211b.py:  This module instantiates the gr-blocks that do the encoding anddecoding.  For both the transmitter and receiver the user can choosewhether to use a raised-cosine baseband pulse, or the 802.11 Barkerbaseband pulse.  Currently, the transmitter does not work very wellwith the Barker baseband pulse, however given a sufficient signal tonoise ratio (and processing power), the receiver can correctly decode802.11 1 Mbps packets.  Also, once in a while, the receiver cancorrectly decode an 802.11 2 Mbps (qpsk) packet, however qpsktranmission is not yet supported (although it is possible to transmitand receive at 2 Mbps using bpsk and 2 bits per symbol).bbn_80211b_pkt.py:  This module is wraps the classes in bbn_80211b.py.  The user shouldinstantiate the classes in this file, and not instantiate the classesin bbn_80211b.py directly.  The bbn_80211b_mod_pkts class instantiatesthe transmit packet queue and provides the send_pkt function.  Thesend_pkt function takes a payload, prepends the 802.11 long preambleand plcp header, appeands the payload crc, and queues the packet fortransmission.  The bbn_80211b_demod_pkts class instantiates thereceive queue and creates a thread to watch for received packets.bbn_80211b_transmit_path.py:  This file contains a class that connects an instance ofbbn_80211b_mod_pkts to the usrp.bbn_80211b_test.py:  This class instantiates the transmitter and receiver and simulatesan additive white Gaussian noise channel.  Its sends a few packetsacross the simulated channel, and prints out their contents when theyare received.bbn_80211_rx.py:bbn_80211_tx.py:  These python scripts respectively receive and send packets over theusrp.  There are several different ways of running these scripts.  Thetransmit script uses a raised cosine baseband pulse, and the receivescript can be configured to look for either a raised cosine, or aBarker pulse.  To send some packets between two usrps at 500 kBps, onone machine start the receiver:    ./bbn_80211_rx.py  and on the other machine run the transmitter:    ./bbn_80211_tx.py  If it works, the receiver will output a "PKT" message for eachpacket it receives.  By default, both the transmitter and receiver use8 samples per symbol, run at 4 megasamples per second, and use 2.4Mhzas the center frequency.  The receiver configures the usrp to use 8bits for each I and Q sample, and the transmitter uses 16 bits foreach I and Q sample.  To send data at 1 Mpbs, you can configure thereceiver to use 4 samples per symbol:    ./bbn_80211_rx.py --spb 4  and do the same for the transmitter:    ./bbn_80211_tx.py --spb 4  On a fast machine, the receiver program should be able to capturereal 802.11 1 Mbps packets and a few 2 Mbps packets.  Running in thismode seems to max out the cpu on our 1.6 Ghz Pentium M.  Despite thefact that the symbol rate of 802.11 bpsk and qpsk is only 1megasymbols per second, the energy in the 802.11 signal is spread over11 Mhz (at baseband) using an 11-chip Barker spreading code.Fortunately, under high signal-to-noise ratio conditions, it is notnecessary to sample the entire 11 Mhz bandwidge to recover thesymbols.  We have succeeded in recovering 802.11 packets using an 8Mhz sampling rate.  To try to catch 802.11 1 Mpbs packets, use thefollowing command:    ./bbn_80211b_rx.py -d 8 -f 2412e6 -b  The "-d 8" tells the receiver to run at 8 megasamples per second(instead of 4), and  "-f 2412e6" means to listen on 802.11 channel 1.(The 802.11 channels are 5 Mhz apart, so channel 2 is at 2427, channel3 is at 2422 etc..)  The "-b" means to look for the Barker code.  Amessage will be printed out for each received packet that passes thecrc check.  Use the "-p" option to disable crc checking.  Note thatwhen crc checking is enabled the crc is sripped off the packet, sodisabling crc checking causes the received packet to be 4 byteslonger.bbn_80211_tap.py:  This script creates a tap interface that can used to send andreceive packets.  On Linux a standard ethernet tap (called gr0) iscreated, and on NetBSD an 802.11 (called tap0) interface is created.Most of the options in the other scripts are available for the tapscript.  However, the tap script has a "-z" option for transmit only(disable the reciver), and the "-t" option to enable the transmitter(while leaving the receiver enabled).  If you use both -r and -toptions at the same time the transmitter will be enabled and thereciver will be diabled.  To run the tap in 802.11 channel 6 withouttransmitting, use the following command:    ./bbn_80211b_tap.pyThe defaults are shown in this command    ./bbn_80211b_tap.py -d 8 -f 2437e6 -b

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -