Houston, we have a trunk.
[debian/gnuradio] / gnuradio-examples / python / gmsk2 / README
1 Quick overview of what's here:
2
3 * gmsk_test.py: stand-alone program that exercises the GMSK packet tx
4 and rx code.  The two halves are connected with a simulated noisy
5 channel.  It's easy to add extra instrumentation to log various internal 
6 states.  We used a variant of this code to get this working in the
7 first place. 
8
9 * benchmark_gmsk_tx.py: generates packets of the size you
10 specify and sends them across the air using the USRP.  Known to work
11 well using the USRP with the Flex 400 transceiver daughterboard.
12 You can specify the bitrate to use with the -r <bitrate> command line
13 parameter.  The default is 500k.  Some machines will do 1M or more.
14
15 * benchmark_gmsk_rx.py: the receiver half of benchmark_gmsk_tx.py.
16 Command line arguments are pretty much the same as tx.  Works well
17 with a USRP and Flex 400 transceiver daughterboard.  Will also work
18 with TVRX daugherboard, but you'll need to fiddle with the gain.  See
19 below.  Prints a summary of each packet received and keeps a running
20 total of packets received, and how many of them were error free.
21 There are two levels of error reporting going on.  If the access code
22 (PN code) and header of a packet were properly detected, then you'll
23 get an output line.  If the CRC32 of the payload was correct you get
24 "ok = True", else "ok = False".  The "pktno" is extracted from the
25 received packet.  If there are skipped numbers, you're missing some
26 packets.  Be sure you've got a suitable antenna connected to the TX/RX
27 port on each board.  A "70 cm" / 420 MHz antenna for a ham
28 handi-talkie works great.  These are available at ham radio supplies,
29 etc.  The boards need to be at least 3m apart.  You can also try
30 experimenting with the rx gain (-g <gain> command line option).
31
32 Generally speaking, I start the rx first on one machine, and then fire
33 up the tx on the other machine.  The tx also supports a discontinous
34 transmission mode where it sends bursts of 5 packets and then waits 1
35 second.  This is useful for ensuring that all the receiver control
36 loops lock up fast enough.
37
38 * tunnel.py: This program provides a framework for building your own
39 MACs.  It creates a "TAP" interface in the kernel, typically gr0,
40 and sends and receives ethernet frames through it.  See
41 /usr/src/linux/Documentation/networking/tuntap.txt and/or Google for
42 "universal tun tap".  The Linux 2.6 kernel includes the tun module, you
43 don't have to build it.  You may have to "modprobe tun" if it's not
44 loaded by default.  If /dev/net/tun doesn't exist, try "modprobe tun".
45
46 To run this program you'll need to be root or running with the
47 appropriate capability to open the tun interface.  You'll need to fire
48 up two copies on different machines.  Once each is running you'll need
49 to ifconfig the gr0 interface to set the IP address.
50
51 This will allow two machines to talk, but anything beyond the two
52 machines depends on your networking setup.  Left as an exercise...
53
54 On machine A:
55
56   $ su
57   # ./tunnel.py --freq 423.0M --bitrate 500k
58   # # in another window on A, also as root...
59   # ifconfig gr0 10.10.10.1
60
61
62 On machine B:
63
64   $ su
65   # ./tunnel.py --freq 423.0M --bitrate 500k
66   # # in another window on B, also as root...
67   # ifconfig gr0 10.10.10.2
68
69 Now, on machine A you shold be able to ping machine B:
70
71   $ ping 10.10.10.2
72
73 and you should see some output for each packet in the
74 tunnel.py window if you used the -v option.
75
76 Likewise, on machine B:
77
78   $ ping 10.10.10.1
79
80 This now uses a carrier sense MAC, so you should be able to ssh
81 between the machines, web browse, etc.