[Discuss-gnuradio] One question regarding "-B FUSB_BLOCK_SIZE" and "-N F
From:
Bishal Thapa
Subject:
[Discuss-gnuradio] One question regarding "-B FUSB_BLOCK_SIZE" and "-N FUSB_NBLOCKS"
Date:
Sun, 27 Sep 2009 20:06:21 -0400
Dear Eric, Jonathan, List I am stuck in a simple problem, and I am wondering if I understand what "-B FUSB_BLOCK_SIZE" and "-N FUSB_NBLOCKS" options do, then it MIGHT help a little bit. I am using benchmark_tx.py to send a payload of size 102 bytes, but with added header, CRC, padded "0x55"s it becomes exactly a 128 bytes packet. I spread this message using DSSS of length 104 in pkt.py and use interpolation rate of 256 and modulation dbpsk.
On the receiver side, I collect complex baseband samples using usrp_rx_cfile capture with decimation rate of 128 into a file. When I observe the file using read_complex_binary and plot it in matlab, I only receive about 15 packets out of every 20 packets I send. Do you think, this is because of the USB transfers 512 bytes at a time, or simply the queues not being cleared out before the transmitter stops the transmit program. I do put a time.sleep(1) between every packet to make sure they are sent, which I actually do not like to do. Nevertheless, after all this, still i do not see all my packets/samples captured. Could you shed a little light on this please, if you don't mind. I was thinking may be setting -N to 1 and -B to 128 will help. But I promise I couldn't figure out what exactly these options will do for me. Thank you.
Sincerely,
1.Transmitter command: sudo ./benchmark_tx.py -f 2.4G -i 256 -m dbpsk --from-file=102bytesofA.txt -c 20 [-N 1] [-B 128] (-c: Added an option to represent the number of times benchmark_tx will send the same packet)
3.Analysis In matlab: I observer plot(abs(read_complex_binary('foo.dat'))). Five packets are missing on average. It is not consistent, sometimes its 10 sometimes its 3.