Re: [Discuss-gnuradio] Three different USRP2 nodes are transmitting with almost exactly 1 MHz frequency offset

2012-02-11 Thread shantharam balasubramanian
Hi Ben,

I am happy to hear from Nazmul that the image works.



Thanks a lot for your help.


Have a nice weekend
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] reg problem in running gnuradio 3.5 benchmark programs

2012-01-31 Thread shantharam balasubramanian
Hi

I installed gnuradio 3.5 images in my college lab, and I installed the
appropriate SD card image for it.

I then tried to run the benchmark programs, by running the benchmark_tx
and rx in two different nodes that have USRP2, with daughter boards, XCVR
2450 in them.

But I saw that the benchmark_rx didnt receive any packets from the node
which was running the benchmark_tx in it. There was a problem of overrun in
the node running benchmark_rx, but still it didnt receive any packets from
the node running the transmitter program.

Following the advice of tom, we then ran the benchmark_tx and saw that
there were no signal being shown in spectrum analyzer, kept near to the
transmitter node. But still the program was showing the dots, indicating
that it was sending the packets.

Can anyone tell me why this problem occurs and what should I do to resolve
it?


Thanks



-- 
Regards

Shantharam Balasubramanian
MS in Electrical and Computer Engineering
Rutgers University
Ph:732-543-6863
Email:shantharam...@gmail.com
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] reg problem in running gnuradio 3.5 benchmark programs

2012-01-31 Thread shantharam balasubramanian
Hi

I just want to list down the commands I used to run the benchmark programs.

./benchmark_tx.py -f 2.4G -r 1M --args addr=192.168.10.2.  In addition I
also gave the option [-A J1] to select the antenna to transmit. But I
couldnt detect any transmitted signal from that node.

I also ran uhd_fft in receiver to graphically see if there is any signal
getting received. but still couldnt see any.

uhd_fft.py -f 2.4G -s 1M --args addr=192.168.10.2


It will be of great help if someone can help me out with this.


Thanks
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Unable to receive using USRP N210, XCVR2450 daughterboards running benchmark programs

2012-01-31 Thread shantharam balasubramanian
When the transmitter was producing the dots, are you 100% sure that the
packets were gettting transmitted in the first place?

cause i used spectrum analyser and i ran uhd_fft.py, and saw that no
signals were peaking up on that particular frequency. Even Tom had the same
doubt when he visited my lab today, and told me to check if the transmitter
was transmitting the packets. I dont think it does.
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] problem in installing gnuradio

2011-11-20 Thread shantharam balasubramanian
Hi

I was installing the gnuradio in ubuntu 10.04, and the nodes have USRP2.

After installing gnuradio from the website link,

http://gnuradio.org/redmine/projects/gnuradio/wiki/UbuntuInstall

I then installed the UHD from the instructions given in the

http://cegt201.bradley.edu/projects/proj2011/sdr/update_files/install_gnuradio_uhd.pdf

which is given at steps 3 and 4. After doing these steps, I saw that there
are two different folders gnruadio, and uhd. And then I tried to run the
benchmark programs from the gr-digital folder inside gnuradio. But it didnt
work.

Can you point out the mistakes I made here?


Thank you
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] problem in installing gnuradio

2011-11-20 Thread shantharam balasubramanian
I have actually mentioned that error in the first mail itself.

I have mentioned that it gave me the error,

ImportError: cannot import name uhd
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] problem in installing gnuradio

2011-11-19 Thread shantharam balasubramanian
Hi

I was trying to install the gnuradio in one of the wireless nodes available
in my college lab. I followed the steps given in the link;

http://gnuradio.org/redmine/projects/gnuradio/wiki/UbuntuInstall

I installed the image successfully, but when I tried to run some benchmark
programs in the folder gr-digital/examples/narrowband, I got the error
saying

ImportError: cannot import name uhd

I have not done this type of build process before and this is the first
time I am doing it. Can anyone please help me out with this?


Thank you



-- 
Regards

Shantharam Balasubramanian
MS in Electrical and Computer Engineering
Rutgers University
Ph:732-543-6863
Email:shantharam...@gmail.com
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Fwd: Introducing noise/ considerable BER

2011-10-25 Thread shantharam balasubramanian
Hello Marcus,

You sent the forwarded email a few months ago.

The benchmark stuff doesn't, as far as I know, have FEC in it. I think
Tom was referring to single-bit errors in the so-called accesscode
at the beginning of the frame.  If there are bit errors there, then
the frame is necessarily discarded, since it's not *recognized* as a
valid frame. But apart from that, if the frame sequence is valid, then
the packet is recognized, and punted up through the RX packet
callback mechanism, which means there could still be bit errors in the
payload section of the packet.

We implemented a CRC checking block in the benchmark_rx code using
binascii.crc32 python code. We observed a very interesting thing in
the following portion of the benchmark_rx code:

def rx_callback(ok, payload):

global n_rcvd, n_right

   (pktno,) = struct.unpack('!H', payload[0:2])

if ok:

   n_right += 1

 Whenever the packet was received as 'OK' (i.e. 'OK = True') and
n_right increased, the packet also passed our CRC check. Every packet
that did not pass our CRC check was also not received as 'OK' (i.e.
'OK = False' in those packets). Our CRC checking portion is completely
independent of the main benchmark_rx code. We just look at the
received data and see if there is any bit error or not.

Now, if the above the mentioned portion of the code does not do CRC
checking on its own, how does it completely match with our CRC based
results? Does it mean that errors occur in bursts. Therefore, whenever
there is any single bit error in the data, there are errors in the
header as well ??

Your feedback will be very appreciated.


Thanks,


Shantharam
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] want to use the gr_probe_mpsk_snr block in benchmark programs in python/digital folder

2011-10-04 Thread shantharam balasubramanian
Hi

I have been working with benchmark_tx  and benchmark_rx python programs for
my project, which are available in the
gnuradio/gnuradio-examples/python/digital folder and I have been modifying
them to use for my project.

I wish to calculate the SNR of the received signal and I found that there is
a block with the name gr_probe_mpsk_snr which might help to calculate the
SNR of the signal. But I am not sure how to add this block to the code and I
haven't seen any example programs like that so far.

It will be really helpful if someone can point me out a program that makes
use of this block, or if someone can give me the syntax to add this block to
my code.

Your reply will be much appreciated.

Thank you

-- 
Regards

Shantharam Balasubramanian
MS in Electrical and Computer Engineering
Rutgers University
Ph:732-543-6863
Email:shantharam...@gmail.com
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] regarding connecting SNR block in benchmark_rx

2011-10-04 Thread shantharam balasubramanian
Hi

I have been working with gnuradio python programs for my project and I am
trying to collect SNR data for the signals I receive using benchmark_rx.py.
I have been dealing with connecting an SNR block in the benchmark_rx.py and
I came across a block called, gr.probe_mpsk_snr_c(thresh), which is in the
receive.path.py.

Unfortunately, I am not very familiar with connecting blocks and using them
in gnuradio python programs. I have asked gnuradio people before regarding
connecting a block to collect the data about power of the signal received.

I then received an email explaining to me about doing it by including the
following statements and it worked perfectly.

self.probe = gr.probe_avg_mag_sqrd_cf(thresh,alpha)
self.power_sink = gr.file_sink(gr.sizeof_float, rxpower.dat)
self.connect(self.probe, self.power_sink) # should dump the power
values in a file.hopefully
# Set up receive path
self.rxpath = usrp_receive_path.usrp_receive_path(demodulator,
rx_callback, options)

#connects#
self.connect(self.rxpath)
self.connect(self.rxpath.channel_filter,self.probe)

I was then trying to use the similar list of commands to calculate the SNR
using the block gr.probe_mpsk_snr_c(thresh) but it didnt work. I then
tried the following statements,

self.probe = gr.probe_mpsk_snr_c(thresh)
self.rxpath = usrp_receive_path.usrp_receive_path(demodulator,
rx_callback, options)
self.connect(self.rxpath)
self.connect(self.rxpath.channel_filter,self.probe)

But the receiver didnt receive anything properly and it was printing out
weird symbols.

It will be really helpful if someone can explain to me about connecting this
block and measure the SNR.

Thank you

-- 
Regards

Shantharam Balasubramanian
MS in Electrical and Computer Engineering
Rutgers University
Ph:732-543-6863
Email:shantharam...@gmail.com
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] reg calculation of BER/SNR using gnuradio UHD

2011-09-27 Thread shantharam balasubramanian
Hi

I am working in WINLAB and I have been using gnuradio UHD image for running
some of the programs I have previously worked in summer.

I came across a post in this forum, where few months ago someone has asked
how to calculate BER and Tom has given him the answer to look into
digital-bert folder.

http://gnuradio.org/redmine/projects/gnuradio/repository/revisions/master/show/gnuradio-examples/python/digital-bert

When I tried to run the program it said it cannot find USRP and I guess this
is due to the problem of firmware image I am using.

Does anyone have any idea of what image I should use for these programs? It
will be much helpful if someone can help me out with this.

Thank you

-- 
Regards

Shantharam Balasubramanian
MS in Electrical and Computer Engineering
Rutgers University
Ph:732-543-6863
Email:shantharam...@gmail.com
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] reg calculation of BER/SNR using gnuradio UHD

2011-09-27 Thread shantharam balasubramanian
Hi Ben,

Thanks a lot for the reply. One of our colleagues downloaded the gnuradio
version 3.1.2 and we are using that version. I don't know if we need to
download the latest version of gnuradio (3.4.0) and run that.

Now, the thing is, the benchmark_tx and benchmark_rx programs in
gnuradio-examples/python/digital sub-folder work properly. That means, the
receiver receives the packets transmitted by the transmitter. However, when
we try running the benchmark_rx and benchmark_tx programs of
gnuradio-examples/python/digital-bert subfolder, it fails to find usrp.

We give the following command to run the benchmark_rx program of bert
subfolder:

./benchmark_rx.py -f 2.412G -r 1M

We have also tried with: ./benchmark_rx.py -f 2.412G -r 1M -w 2 (We are
using USRP2)

The program shows the following error message:

usrp: failed to find usrp[0] (If we give -w 2, it says failed to find
usrp[2])

Runtime error: can't open usrp

We don't know if we are giving wrong commands because similar commands work
well for benchmark programs in the python/digital sub-folder. Your help will
be very appreciated.


Thanks,

--
Regards

Shantharam Balasubramanian
MS in Electrical and Computer Engineering
Rutgers University
Ph:732-543-6863
Email:shantharam...@gmail.com
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] reg calculation of BER/SNR using gnuradio UHD

2011-09-27 Thread shantharam balasubramanian
Hi

Thanks for the reply. And yes you are correct. It just works for USRP1
alone, though it seeks to give the option of selecting the USRP number.
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] reg calculation of BER/SNR using gnuradio UHD

2011-09-27 Thread shantharam balasubramanian
Hi

When I run it in USRP1 nodes, I don't get the error as before, that says it
cannot find USRP1.

But the benchmark_tx program says Failed to tune to center frequency. I
then tried to send it in 2 MHZ and also in 2 GHZ frequency, but it still
doesn't work.

Can anyone tell me why it's happening.? It will be greatly helpful if
someone can help me out with this center frequency setting process.

Thanks

Shantharam
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Help with rx_sample_to_file.cpp program and modulation scheme change in UHD

2011-09-21 Thread shantharam balasubramanian
Hi Josh,


 Thanks for the email. I went through the website you mentioned and I found
 there were benchmark_tx.py and benchmark_rx.py files in the gr-digital
 folder.


 We imaged the nodes using gnuradio-uhd-working.ndz. Using this image, we
 see the following folders when we log in to the nodes:

 gnuradio-uhd

 Inside this folder, I see:

 gnuradio uhd

 If I select uhd, I see the folders that are available in the website (
 http://code.ettus.com/redmine/ettus/projects/uhd/repository):

 firmwarefpgahostimages

 *On the other hand, I was expecting to see the gr-digital folder after
 selecting the gnuradio folder because the gr-digital folder is inside the
 gnuradio folder in the link (
 https://github.com/trondeau/gnuradio/tree/digital/gr-digital/examples).
 Unfortunately, I don't see the gr-digital folder there.*

 Can you tell me what image I should burn on the SD cards in order to see
 this folder and the files that I can see on the website?

 Thanks,

 Shantharam




-- 
Regards

Shantharam Balasubramanian
MS in Electrical and Computer Engineering
Rutgers University
Ph:732-543-6863
Email:shantharam...@gmail.com
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] Help with rx_sample_to_file.cpp program and modulation scheme change in UHD

2011-09-20 Thread shantharam balasubramanian
Hi

I am pretty new to UHD. I was looking for some example programs which
can send and receive a text file, and I came across two programs in
the website
(http://code.ettus.com/redmine/ettus/projects/uhd/repository/revisions/master/show/host/examples)
named rx_samples_to_file.cpp and tx_samples_to_file.cpp.

I ran these programs in USRP1. and gave the following arguements:
1)./tx --rate 50 --freq 1000  --file rr.txt[this is the name
of the file i transferred]
2)./rx --rate 50 --freq 1000 --file r1.txt[this is the name of
the file where i store the received text]

When I tried to transmit and receive some sample text files, the
sender transmitted it correctly, but the receiver is not receiving
anything. When I opened the received file, I found that the file was
more than 10MB and there were some gibberish text in the file. The
programs specify in the help options that they transmit and receive
binary samples, so I don't know if I am working with the correct
programs or if I am giving the correct arguments while running them.

I also need to change the modulation schemes for different channel
environments. Actually, I am working on adaptive modulation schemes in
my experiments. However, I don't find an option to change the
modulation schemes in UHD. (I saw those options in python based
non-uhd codes, e.g. benchmar_Rx and benchmark_Tx). Are there any
programs like that in UHD codes that allow change of modulation
schemes?

Your feedback will be very appreciated.

Thanks,

-- 
Regards

Shantharam Balasubramanian
MS in Electrical and Computer Engineering
Rutgers University
Ph:732-543-6863
Email:shantharam...@gmail.com

___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Help with rx_sample_to_file.cpp program and modulation scheme change in UHD

2011-09-20 Thread shantharam balasubramanian
Dear Josh,

Thanks for the reply. I have some questions regarding installing grc.
The questions are probably too naive since we are still at the
beginning level of using gnuradio.

We work in WINLAB, Rutgers University. It has a 400 grid testbed and 2
sandboxes that are compatible with GNUradio. There are SD cards
inserted in the nodes. We just load gnuradio images before starting
any experiment (using commands like: omf-5.2 load all
gnuradio-uhd-3.1.2-usrp1.ndz). Now, when you ask us to install gr-uhd,
do you mean that we should install it in the SD cards? Because
gnuradio is not installed in our computers. We just load the image in
the SD cards (inserted in the nodes), ssh to the nodes and then run
the example programs.

Your feedback will be very appreciated.

Thanks,

Shantharam

On Tue, Sep 20, 2011 at 1:45 PM, Josh Blum j...@ettus.com wrote:


 On 09/20/2011 10:25 AM, shantharam balasubramanian wrote:
 Hi

 I am pretty new to UHD. I was looking for some example programs which
 can send and receive a text file, and I came across two programs in
 the website
 (http://code.ettus.com/redmine/ettus/projects/uhd/repository/revisions/master/show/host/examples)
 named rx_samples_to_file.cpp and tx_samples_to_file.cpp.

 I ran these programs in USRP1. and gave the following arguements:
 1)./tx --rate 50 --freq 1000  --file rr.txt[this is the name
 of the file i transferred]
 2)./rx --rate 50 --freq 1000 --file r1.txt[this is the name of
 the file where i store the received text]


 Those files are supposed to contain baseband samples.

 When I tried to transmit and receive some sample text files, the
 sender transmitted it correctly, but the receiver is not receiving
 anything. When I opened the received file, I found that the file was
 more than 10MB and there were some gibberish text in the file. The
 programs specify in the help options that they transmit and receive
 binary samples, so I don't know if I am working with the correct
 programs or if I am giving the correct arguments while running them.


 You have scared me.

 I also need to change the modulation schemes for different channel
 environments. Actually, I am working on adaptive modulation schemes in
 my experiments. However, I don't find an option to change the
 modulation schemes in UHD. (I saw those options in python based
 non-uhd codes, e.g. benchmar_Rx and benchmark_Tx). Are there any
 programs like that in UHD codes that allow change of modulation
 schemes?


 Gnuradio implements many modulation schemes. UHD provides an interface
 to send/recv baseband samples. You should use gnuradio w/ UHD to
 implement a receiver and transmitter chain.

 I highly recommend installing gr-uhd component and getting familiar w/
 gnuradio-companion:
 http://code.ettus.com/redmine/ettus/projects/uhd/wiki#Gnuradio-UHD

 -Josh

 ___
 Discuss-gnuradio mailing list
 Discuss-gnuradio@gnu.org
 https://lists.gnu.org/mailman/listinfo/discuss-gnuradio




-- 
Regards

Shantharam Balasubramanian
MS in Electrical and Computer Engineering
Rutgers University
Ph:732-543-6863
Email:shantharam...@gmail.com

___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Help with rx_sample_to_file.cpp program and modulation scheme change in UHD

2011-09-20 Thread shantharam balasubramanian
Hi Josh,

Thanks for the email. I went through the website you mentioned and I found
there were benchmark_tx.py and benchmark_rx.py files in the gr-digital
folder.


We imaged the nodes using gnuradio-uhd-working.ndz. Using this image, we see
the following folders when we log in to the nodes:

gnuradio-uhd

Inside this folder, I see:

gnuradio uhd

If I select uhd, I see the folders that are available in the website (
http://code.ettus.com/redmine/ettus/projects/uhd/repository):

firmwarefpgahostimages

*On the other hand, I was expecting to see the gr-digital folder after
selecting the gnuradio folder because the gr-digital folder is inside the
gnuradio folder in the link (
https://github.com/trondeau/gnuradio/tree/digital/gr-digital/examples).
Unfortunately, I don't see the gr-digital folder there.*

Can you tell me what image I should burn on the SD cards in order to see
this folder and the files that I can see on the website?

Thanks,


Shantharam
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] about UHD pgms running

2011-09-16 Thread shantharam balasubramanian
Hi

I have to work on UHD gnuradio platform and this is the first time I
am gonna work with UHD. I just want to run some example
files in the examples folder, like tx_waveforms.cpp. I think I am
missing some commands or giving some wrong image file to the SD cards
used in the wireless nodes, where I am supposed to run the experiment.
Some of my friends there told me to image gnuradio-uhd-working.ndz. I
dont know if this is the correct image i have to use. I then followed
the following list of commands. Please tell me, if I am doing
something wrong there.

1) So first I imaged the file as:
 omf-5.2 load all gnuradio-uhd-working.ndz

2) ssh root@node1-1
   i go into examples folder where the cpp files are present.

3)ifconfig eth2 up
  ifconfig eth2 192.168.10.1

4)g++ tx_waveforms.cpp -o tx -luhd -lboost_program_options

5)./tx

I then got the following error:

Creating the usrp device with: ...
Error: LookupError: KeyError: No devices found for -
Empty Device Address

is there something wrong in these cmds?
It would be great if you can let me know the mistake I am doing.

Thank you

--
Regards

Shantharam Balasubramanian
MS in Electrical and Computer Engineering
Rutgers University
Ph:732-543-6863
Email:shantharam...@gmail.com

___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] raw binary data transmission

2011-08-12 Thread shantharam balasubramanian
hi
I am using USRP2 testbed and I am willing to transmit and receive
binary data between two nodes I am using. I have been working with the
benchmark_tx and rx.py and I have been modifying those programs for
the past 2 months for my project.
I did this by, generating random number between 0 and 1 and then
forming a binary sequence from it. But when adding the payload to the
packet, I am not able to add any data of data type, other than string.
So I had to make the binary numbers randomly and make them as string
using str() function, and then add them to the payload before sending
the packet.
Is there anyway to transmit raw binary data through the nodes using
the benchmark programs? Or is there any other program, that can help
me with it?

thank you

___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] Fwd: Introducing noise/ considerable BER

2011-08-09 Thread shantharam balasubramanian
Hello Tom, Marcus and Martin,

Thanks a lot for your replies. One of the objective of our experiment
is find to the capacity of a path, i.e, we want to transmit a random
binary sequence between two USRP nodes. We want to find the maximum
data transfer rate (in bit/sec) with a small bit error rate /
probability of error.
Tom said, The way things are in our benchmark code, a single bit
error means that an entire packet is lost. Based on this statement, I
have the following questions:

1. From Tom's reply, it seems like the benchmark_Rx and benchmark_Tx
programs already have error correction coding blocks in themselves.
Therefore, it is hard for us to calculate the bit error rate and find
the capacity of the path. Is there any program in gnuradio repository
that does not employ error correction codes?

2. In our experiments, we have received packets that has some bit
error rate (e.g. 15% bit error rate, 20% bit error rate, etc.). If a
single bit error means that an entire packet is lost, do you know why
that phenomenon occurs? (i.e. some packets get lost but some other
packets have small erroneous bits)

Your feedback will be very appreciated.

Thanks

___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Introducing noise/ considerable BER

2011-08-08 Thread shantharam balasubramanian
Hello people,

Thanks a lot for the reply. So, you are saying that the packet loss at
low transmitter amplitude in benchmark_Tx.py and benchmark_Rx.py come
from the loss of packet synchronization data, i.e., a part of the
packet synchronization data gets lost or degraded due to low SNR. I
know that packet loss also occurs if the queue length is not long
enough to hold incoming traffic or if the data reaches the receiver
after a long time. I want to ensure that these things don't happen.

Basically, we are trying to transmit a random binary sequence between
two nodes using the benchmark_Tx.py and benchmark_Rx.py programs.
Since both these programs use packets, we convert the whole binary
sequence into a number of packets and then transmit each packet using
the benchmark programs. Let us say, we have 2000 bits in total. We
convert it to 20 packets (100 bits/packet) and then transmit 20
packets from one node to the other. We want to calculate the bit error
rate for different levels of transmitter amplitude.

Based on our objectives, I have the following questions.

1. Is there any upper limit on the no. of binary bits per packet in
benchmark_Tx.py program?

2. Overall can I take other steps to get rid of the packet loss
scenario ? Adam, can you please describe the generation of long
preamble in further details ?

Your help and feedback will be highly appreciated.

Thanks,
shantharam

___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] Introducing noise/ considerable BER

2011-08-06 Thread shantharam balasubramanian
Hi
I have been working in usrp2 testbed, and I have been modifying the
benchmark_tx and rx programs for my project. There have been situations
where I was supposed to introduce noise to find out BER. I did that by
giving lower  transmitter amplitude values. But very low values cause packet
loss along with higher BER values. I just want to know if there Is there
anyway to just cause high BER values, without causing packet loss? Is there
any way I can do that inside the program or should I do it by any other way
e.g.by using some noise producing source?
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] regarding transmitting and receiving in two different frequencies

2011-07-25 Thread shantharam balasubramanian
hi
I am looking to make a transceiver work such that it receives the data
and then transmits its own and other nodes data that it got.
I am new to python and gnuradio and so I have been modifying the
benchmark_tx and rx.py, so far to do my project, Since I have to make
the receiver to work first and then the sender, I added the
transmitter code to the def_rxcallback function and it worked
correctly.
But I am not able to transmit and receive in two different
frequencies, though I see come expert options in the help window of
the program such --tx-freq and --rx-freq.
Can anyone help me in setting up the option such that I can set two
different frequencies for both transmission and reception?

thank you

___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] reg transceiver program

2011-07-19 Thread shantharam balasubramanian
hi.
i wanted to simulate a transceiver which receives some data and then
transmits its own and the data it got.
I have been modifying then benchmark_tx and rx program to do this and
I was able to simulate the transceiver I mentioned, by adding the
sender code in the def_rxcallback function.
I dont know if thats the right way to do, but it worked for me, after
importing and adding some code from benchmark_tx program.
But I am now trying to find a way to parse options for both the sender
and receiver. Since I have been modifying the benchmark_rx program for
this, the options I pass are only used for the receiver program alone.
So I am not able to send and receive using two different frequencies
or two different packet sizes for each.
Can anyone please help me with this?. I have attached my code here, so
that if anyone is free to go through it, can help me with the mistakes
I made.
thank you
#!/usr/bin/env python
#
# Copyright 2005,2006,2007,2009 Free Software Foundation, Inc.
# 
# This file is part of GNU Radio
# 
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
# 
# GNU Radio is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public License
# along with GNU Radio; see the file COPYING.  If not, write to
# the Free Software Foundation, Inc., 51 Franklin Street,
# Boston, MA 02110-1301, USA.
# 

from gnuradio import gr, gru, modulation_utils
from gnuradio import usrp
from gnuradio import eng_notation
from gnuradio.eng_option import eng_option
from optparse import OptionParser

import random
import struct
import sys
import time
import binascii
# from current dir
import usrp_receive_path
import operator
# from current dir
import usrp_transmit_path

import usrp_receive_path
#import os 
#print os.getpid()
#raw_input('Attach and press enter')

class my_top_block(gr.top_block):

def __init__(self, modulator, demodulator, rx_callback, options):
gr.top_block.__init__(self)
self.rxpath = usrp_receive_path.usrp_receive_path(demodulator, rx_callback, options)
self.txpath = usrp_transmit_path.usrp_transmit_path(modulator, options)
self.connect(self.rxpath)
self.connect(self.txpath)

# /
#   main
# /
global n_rcvd, n_right

def main():
global n_rcvd, n_right, re, a, l, coun

def send_pkt(payload='', eof=False):
return tb.txpath.send_pkt(payload, eof)

def carrier_sensed(self):

Return True if the receive path thinks there's carrier


return self.rxpath.carrier_sensed()
a=0

n_rcvd=0
n_right=0
coun=l=0

def rx_callback(ok, payload):
global n_rcvd, n_right, coun, l
(ide,pktno,) = struct.unpack('!cH', payload[0:3])
n_rcvd += 1
if ok:
n_right += 1

print ok = %5s  pktno = %4d  n_rcvd = %4d  n_right = %4d ide=%1c % (
ok, pktno, n_rcvd, n_right, ide)

if(ide == 'a' or ide == 'c'):
print(payload=,payload)
a =ord(payload[3:options.size])
abin=bin(a)[2:]
FILE1.write(payload[3:options.size])
#a=ord(payload[2:options.size])
print ('a = ' , a)
print('abin=',abin)
x =ord('a')
#print('x=b=', x)
t= operator.xor(a,x)
#print(t=, t)
tbin= bin(t)[2:]
#print('tbin= ',tbin)
i=0
l=len(abin)+l

while ilen(tbin):
if tbin[i]=='1':
coun=coun+1
i=i+1
print(total error bits so far=,coun)
print(total bits=, l)
ber1=float(coun)/float(l)
print(ber1=,ber1)

#this s the block seen in tx.py, i added it here and it seems to work fine except for the last pkt. sid, please remove the 're' variable and add #the condtion like, (if pkt header=last pkt header)
if ide=='c':
nbytes=1250
n = 0
pktno = 0
pkt_size = int(options.size)
   #  c='a'
 #start_time=0
  #   last_time=0

while n  nbytes:
print(in while loop)
if options.from_file is None:
data = (pkt_size - 2) * chr(pktno  0xff)
else:
data = 

[Discuss-gnuradio] doubt req creating 2 top_blocks

2011-07-14 Thread shantharam balasubramanian
hi.
I am working with benchmark_tx and rx programs and I have been
changing them a lot for a project I am working with now.
I just want to make a node run as a receiver and then as a
transmitter. I think it involves creating two top_blocks. Is it
possible to create such two blocks and run one and stop it; and then
run the other one.?

___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] regarding calculating the noise power

2011-07-06 Thread shantharam balasubramanian
Hi.
I am using USRP2 testbed. I have been recently working on plotting the
PSD of the received signal and I was able to do it. The graph plots
the signal in baseband frequency level.
Then I turned on the receiver node while keeping the sender node off.
When I plotted the PSD graph for that, I was expecting to see a PSD
which should be more or less constant over all the frequencies.
But I saw a peak in the 0 Hz which is the center frequency. I was told
that this is due to DC offset. I am not sure what is meant by that
exactly and how to control or measure the DC offset in the output I
got.
Can anyone help me out?

___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] regarding calculating the noise power

2011-07-06 Thread shantharam balasubramanian
Also I have been working in a modified program of benchmark_rx for
this case. It would be more helpful if someone helps me to reduce it
or to measure it, so that I will be able to explain to the people who
will ask me about the spike.

___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] regarding connecting blocks

2011-06-27 Thread shantharam balasubramanian
Hi
I am new to python and I need to know about adding new blocks.
I modified the benchmark_tx and rx.py files, so that the receiver will
get the file from sender and store it in a txt file which is passed as
an arguement. I also added few lines of code so that the receiver
calculates the number of error bits in each packet it receives.

 The program is as follows:
#!/usr/bin/env python
#
# Copyright 2005,2006,2007,2009 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
#
# GNU Radio is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GNU Radio; see the file COPYING.  If not, write to
# the Free Software Foundation, Inc., 51 Franklin Street,
# Boston, MA 02110-1301, USA.
#

from gnuradio import gr, gru, modulation_utils
from gnuradio import usrp
from gnuradio import eng_notation
from gnuradio.eng_option import eng_option
from optparse import OptionParser

import random
import struct
import sys
import time
import binascii
# from current dir
import usrp_receive_path
import operator
#import os
#print os.getpid()
#raw_input('Attach and press enter: ')

class my_top_block(gr.top_block):
   def __init__(self, demodulator, rx_callback, options):
       gr.top_block.__init__(self)
       # Set up receive path
       self.rxpath = usrp_receive_path.usrp_receive_path(demodulator,
rx_callback, options)

       self.connect(self.rxpath)

# /
#                                   main
# /

global n_rcvd, n_right

def main():
   global n_rcvd, n_right, bi, pattern, a, x, t, coun, tbin, i, l, abin

   n_rcvd = 0
   n_right = 0
   coun=l=0
   #FILE = open(payload.dat, a)

   def rx_callback(ok, payload):
       global n_rcvd, n_right, coun, l
       (pktno,) = struct.unpack('!H', payload[0:2])
       n_rcvd += 1
       if ok:
           n_right += 1

       print ok = %5s  pktno = %4d  n_rcvd = %4d  n_right = %4d % (
           ok, pktno, n_rcvd, n_right)
       a =ord(payload[2:options.size])
       abin=bin(a)[2:]
       FILE.write(payload[2:options.size])
       #a=ord(payload[2:options.size])
       print ('a = ' , a)
       print('abin=',abin)
       x =ord('a')
       #print('x=b=', x)
       t= operator.xor(a,x)
       #print(t=, t)
       tbin= bin(t)[2:]
       #print('tbin= ',tbin)
       i=0
       l=len(abin)+l

       while ilen(tbin):
               if tbin[i]=='1':
                       coun=coun+1
               i=i+1
       print(total error bits so far=,coun)
       print(total bits=, l)
       b=float(coun)/float(l)
       print(b=,b)
   demods = modulation_utils.type_1_demods()

   # Create Options Parser:
   parser = OptionParser (option_class=eng_option, conflict_handler=resolve)
   expert_grp = parser.add_option_group(Expert)

   parser.add_option(-m, --modulation, type=choice,
choices=demods.keys(),
                     default='gmsk',
                     help=Select modulation from: %s [default=%%default]
                           % (', '.join(demods.keys()),))
   parser.add_option(-s, --size, type=eng_float, default=1500,
                     help=set packet size [default=%default])

   usrp_receive_path.add_options(parser, expert_grp)

   for mod in demods.values():
       mod.add_options(expert_grp)

   (options, args) = parser.parse_args ()

   filename = args[0];
   FILE = open(filename, a)

   if len(args) != 1:
       parser.print_help(sys.stderr)
       sys.exit(1)

   if options.rx_freq is None:
       sys.stderr.write(You must specify -f FREQ or --freq FREQ\n)
       parser.print_help(sys.stderr)
       sys.exit(1)


   # build the graph
   tb = my_top_block(demods[options.modulation], rx_callback, options)

   r = gr.enable_realtime_scheduling()
   if r != gr.RT_OK:
       print Warning: Failed to enable realtime scheduling.

   tb.start()        # start flow graph

   tb.wait()         # wait for it to finish
   FILE.close()

if __name__ == '__main__':
   try:
       main()
   except KeyboardInterrupt:
       pass


I am now trying to find the received signal power in receiver node and
I found many websites mention this particulat piece of code to be
added to the program:

       alpha = 0.001
       thresh = 30   # in dB, will have to adjust
       self.probe = gr.probe_avg_mag_sqrd_cf(thresh,alpha)
       self.power_sink = gr.file_sink(gr.sizeof_float, rxpower.dat)
       self.connect(self.probe, self.power_sink)

But I am unable to