Hi all,
I’m in the progress of implementing the 802.11 short preamble on the TX
side. There is code on the RX side (based on yesterday’s discussion) to
handle a short preamble, but I am positive there is no code on the TX
side
to transmit using a short preamble. Of course, I’d like to implement it
as
an option.
The main crux of it is ensuring that only the preamble is modulated at
1Mbps, and that the PLCP header is actually modulated at 2Mbps. This is
unlike the long preamble where both are modulated at 1Mbps.
Right now, I have the loopback detecting the short preamble, but the
CRCs
fail. If you want to try it:
svn co
https://www.cgran.org/svn/projects/bbn_80211/branches/usrp2_version
Build, etc, and then go to gr-bbn/src/examples and run
./bbn_80211b_sptest.py … you will see this, for example:
Recieved (short) header!
signal: 0xCA
service: 0xA0
length: 0x52FA
crc: 0xB86C
Calculated crc: 0xE491
*** BAD CRC ***
To explain my changes a bit, I implemented a small option (which we can
add
to the command line) here:
https://www.cgran.org/browser/projects/bbn_80211/branches/usrp2_version/gr-bbn/src/examples/bbn_80211b_pkt.py?rev=383#L166
If using a short preamble, we use 7 bytes of scrambled 0’s and the
reversed
SFD:
https://www.cgran.org/browser/projects/bbn_80211/branches/usrp2_version/gr-bbn/src/examples/bbn_80211b_pkt.py?rev=383#L175
During modulation, I make sure to split the preamble and the PLCP
header,
and modulate them according to the preamble option:
https://www.cgran.org/browser/projects/bbn_80211/branches/usrp2_version/gr-bbn/src/examples/bbn_80211b_pkt.py?rev=383#L257
xpsk_mod_header_1 is to modulate the header at 1Mbps and
xpsk_mod_header_2
at 2Mbps:
https://www.cgran.org/browser/projects/bbn_80211/branches/usrp2_version/gr-bbn/src/examples/bbn_80211b_pkt.py?rev=383#L103
Again, when encoding, ensure we modulate based on the preamble option:
https://www.cgran.org/browser/projects/bbn_80211/branches/usrp2_version/gr-bbn/src/examples/bbn_80211b_pkt.py?rev=383#L272
One last time, for prepending to the payload:
https://www.cgran.org/browser/projects/bbn_80211/branches/usrp2_version/gr-bbn/src/examples/bbn_80211b_pkt.py?rev=383#L331
… and that’s it. If anyone pokes at it to pass the CRC with any
success,
let me know… I’ll keep working on it.
- George