[Discuss-gnuradio] (no subject)

2012-02-04 Thread pratik hetamsaria

http://iublog.eu/petsl.html

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


Re: [Discuss-gnuradio] Tx/Rx using one USRP board

2007-08-02 Thread pratik hetamsaria
Hi,

I am facing a few problems in making USRP work as relay. 

I use rx_voice.py and tx_voice.py for reception and transmission of audio 
files.If i transmit at 910MHz and relay it at 950MHz then after relaying , very 
few packets are received on another node. Infact, most of the packets are not 
received. 

What i know is that the usrp is working as a relay to some extent because if i 
transmit a sine wave using usrp_siggen.py and see the wave after relaying then 
i do observe the sine wave. But, the sine wave has a lot of variation. i.e it 
is continuously changing its amplitude .I observed it to change from 2500-15000 
on oscope. The original wave was at a perfect amplitude of ard 15000. Now, is 
the problem in reception of packets coming because of this kind of variation?? 
Or is it that the USB is playing the limiting factor role. The data rates used 
in audio transmission is 

Bitrate- 50,000
Samples per symbol = 5

Also, Even if i receive a few packets then, i get the error message

terminate called after throwing an instance of 'std::runtime_error'
 what():  msg length is not a multiple of d_itemsize
Aborted (core dumped)

Please tell me how to handle the above problems.

Thanks
Pratik Hetamsaria


On Wed, Aug 01, 2007 at 05:52:56AM +0100, pratik hetamsaria wrote:
 hi,
 

 I am posting this again as i havent got any concrete replies.I have
 been stuck making the usrp work as a relay for a very long time. I
 am giving the code which i am using for making it work as a
 relay. Can somebody please point out where is the mistake. I am
 trying to receive a signal sent by usrp_siggen.py at 910MHz and
 retransmit it at 950MHz. However, when i view the signal at 950MHz
 using usrp_oscope.py then i am able to see only noise. There is no
 sine wave present at that frequency. I am not able to understand
 what is the usrp transmitting at 950 MHz then. What i know is that
 the usrp does receive the sine wave at 910MHz.

Are you using one or two daughterboards?

What kind of daughterboard(s)?

Is your rx-subdev-spec the same as tx-subdev-spec?

Checking to see if r is None is highly recommended.

If you're using a RFX-900 for TX, is the saw filter still in?
(It comes with a 902 to 928 MHz ISM band filter.)

Does the data in usrp_data_receive.dat look reasonable?
What are the min and max values that you see?

What's your tx-amplitude?

Depending on the tx daughterboard, you may need

  dst.set_enable(True)

If you're trying to use a single RFX-* daughterboard, you'll need to
set the RX to receive from the RX2 antenna port, not the TX/RX port:

  rx_src.select_rx_antenna('RX2')
  

Eric


 PLease point out where is the mistake in my code.
 
 Thanks
 Pratik Hetamsaria
 
 _
 
 class my_graph(gr.flow_graph):
 
 def __init__(self):
 gr.flow_graph.__init_ _(self)
 
 parser = OptionParser(option_class=eng_option)
 parser.add_option(-R, --rx-subdev-spec,  type=subdev, 
 default=None)
 parser.add_option(-d, --decim, type=int, default=256)   
 
 parser.add_option(-f,  --freq, type=eng_float, default=910e6)
 parser.add_option(-g, --gain, type=eng_float, default=45)
 parser.add_option(-T, --tx-subdev-spec, type=subdev, 
 default=None) 
 parser.add_option(-a, --tx-amplitude, type=eng_float, 
 default=32000)
 parser.add_option(-q, --tx-freq, type=eng_float, default=950e6) 
 parser.add_option(-i, --interp, type=intx, default=512)
 (options, args) =  parser.parse_args()
 
 rx_src = usrp.source_c (0, options.decim)
 rx_subdev_spec = (0,0) 
 rx_src.set_mux(usrp.determine_rx_mux_value(rx_src, rx_subdev_spec))
 subdev = usrp.selected_subdev(rx_src,  rx_subdev_spec)
 r = rx_src.tune(0, subdev, options.freq)
 
 self._tx_amplitude = options.tx_amplitude
 self.amp = gr.multiply_const_cc(0)
  self.amp.set_k(self._tx_amplitude)

 dst = usrp.sink_c(0, options.interp)
 if options.tx_subdev_spec is None:
 tx_subdev_spec = usrp.pick_tx_subdevice(dst)
  dst.set_mux(usrp.determine_tx_mux_value (dst, tx_subdev_spec))
 subdev = usrp.selected_subdev(dst, tx_subdev_spec)
 r = dst.tune(subdev._which, subdev, options.tx_freq )
 
 filename = /home/polytech/Desktop/usrp_data_receive.dat 
 destination = gr.file_sink(gr.sizeof_gr_complex, filename)
 
 self.connect(rx_src,  destination)
 self.connect(rx_src, self.amp, dst)
 
 if __name__ == '__main__':
 try:
 my_graph().run()
 except KeyboardInterrupt:
 pass



   
-
 5, 50, 500, 5000. Store N number of mails in your inbox. Click here.___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Tx/Rx using one USRP board

2007-08-01 Thread pratik hetamsaria
Hi,

Thanks very much for your info. i finally got the relay working.. :) ...the 
basic problem was probably in the selection of the antenna. 

But, other things have cropped up. I am transmitting a sine wave from one of 
the usrp and after the relay ,when i receive it on another 3rd machine at say, 
950MHz, thne there is a lot of amplitude variation and i am not able to see a 
clear sine wave.Moreover, changing the tx_amplitude introduces a lot of 
variation in the signal. The best sine wave is viewed when i keep its value 
1.Increasing its value introduces more signal distortion in the signal. Please 
tell me what are the values which should be kept for tx_amplitude.

Moreover, I have to work with tx_voice.py and rx_voice.py for transmission and 
reception of audio files. After relaying, when i try to receive, after a 
reception of few packets, i get the following error message: 

terminate called after throwing an instance of 'std::runtime_error'
  what():  msg length is not a multiple of d_itemsize
Aborted (core dumped)

Going through pkt.py and packet_utils.py , and printing out the message length 
, i have figured out that the above error doent appear whenevr, the msg length 
has some difference of 33.For eg. it runs perfectly fine if the msg length is 
1687 or 1720 (difference of 33). But at the relay node , it arbitrarily goes to 
some different msg length(different values seen in my case is 1542,1592 
etc).There is no problem in reception of signal in the relay because i can see 
that the packets are demodulated properly by passing the file 
usrp_data_receive.dat to the demodulator. I do not know how to control this 
change in the message length in the relay code. So, could you please tell me 
how to resolve this issue.

Thanks
Pratik Hetamsaria

Eric Blossom [EMAIL PROTECTED] wrote: On Wed, Aug 01, 2007 at 05:52:56AM 
+0100, pratik hetamsaria wrote:
 hi,
 

 I am posting this again as i havent got any concrete replies.I have
 been stuck making the usrp work as a relay for a very long time. I
 am giving the code which i am using for making it work as a
 relay. Can somebody please point out where is the mistake. I am
 trying to receive a signal sent by usrp_siggen.py at 910MHz and
 retransmit it at 950MHz. However, when i view the signal at 950MHz
 using usrp_oscope.py then i am able to see only noise. There is no
 sine wave present at that frequency. I am not able to understand
 what is the usrp transmitting at 950 MHz then. What i know is that
 the usrp does receive the sine wave at 910MHz.

Are you using one or two daughterboards?

What kind of daughterboard(s)?

Is your rx-subdev-spec the same as tx-subdev-spec?

Checking to see if r is None is highly recommended.

If you're using a RFX-900 for TX, is the saw filter still in?
(It comes with a 902 to 928 MHz ISM band filter.)

Does the data in usrp_data_receive.dat look reasonable?
What are the min and max values that you see?

What's your tx-amplitude?

Depending on the tx daughterboard, you may need

  dst.set_enable(True)

If you're trying to use a single RFX-* daughterboard, you'll need to
set the RX to receive from the RX2 antenna port, not the TX/RX port:

  rx_src.select_rx_antenna('RX2')
  

Eric


 PLease point out where is the mistake in my code.
 
 Thanks
 Pratik Hetamsaria
 
 _
 
 class my_graph(gr.flow_graph):
 
 def __init__(self):
 gr.flow_graph.__init_ _(self)
 
 parser = OptionParser(option_class=eng_option)
 parser.add_option(-R, --rx-subdev-spec,  type=subdev, 
 default=None)
 parser.add_option(-d, --decim, type=int, default=256)   
 
 parser.add_option(-f,  --freq, type=eng_float, default=910e6)
 parser.add_option(-g, --gain, type=eng_float, default=45)
 parser.add_option(-T, --tx-subdev-spec, type=subdev, 
 default=None) 
 parser.add_option(-a, --tx-amplitude, type=eng_float, 
 default=32000)
 parser.add_option(-q, --tx-freq, type=eng_float, default=950e6) 
 parser.add_option(-i, --interp, type=intx, default=512)
 (options, args) =  parser.parse_args()
 
 rx_src = usrp.source_c (0, options.decim)
 rx_subdev_spec = (0,0) 
 rx_src.set_mux(usrp.determine_rx_mux_value(rx_src, rx_subdev_spec))
 subdev = usrp.selected_subdev(rx_src,  rx_subdev_spec)
 r = rx_src.tune(0, subdev, options.freq)
 
 self._tx_amplitude = options.tx_amplitude
 self.amp = gr.multiply_const_cc(0)
  self.amp.set_k(self._tx_amplitude)

 dst = usrp.sink_c(0, options.interp)
 if options.tx_subdev_spec is None:
 tx_subdev_spec = usrp.pick_tx_subdevice(dst)
  dst.set_mux(usrp.determine_tx_mux_value (dst, tx_subdev_spec))
 subdev = usrp.selected_subdev(dst, tx_subdev_spec)
 r = dst.tune(subdev._which, subdev, options.tx_freq )
 
 filename = /home/polytech/Desktop/usrp_data_receive.dat 
 destination = gr.file_sink

[Discuss-gnuradio] Tx/Rx using one USRP board

2007-07-31 Thread pratik hetamsaria
hi,

I am posting this again as i havent got any concrete replies.I have been stuck 
making the usrp work as a relay for a very long time. I am giving the code 
which i am using for making it work as a relay. Can somebody please point out 
where is the mistake. I am trying to receive a signal sent by usrp_siggen.py at 
910MHz and retransmit it at 950MHz. However, when i view the signal at 950MHz 
using usrp_oscope.py then i am able to see only noise. There is no sine wave 
present at that frequency. I am not able to understand what is the usrp 
transmitting at 950 MHz then. What i know is that the usrp does receive the 
sine wave at 910MHz.

PLease point out where is the mistake in my code.

Thanks
Pratik Hetamsaria

_

class my_graph(gr.flow_graph):

def __init__(self):
gr.flow_graph.__init_ _(self)

parser = OptionParser(option_class=eng_option)
parser.add_option(-R, --rx-subdev-spec,  type=subdev, 
default=None)
parser.add_option(-d, --decim, type=int, default=256) 
  
parser.add_option(-f,  --freq, type=eng_float, default=910e6)
parser.add_option(-g, --gain, type=eng_float, default=45)
parser.add_option(-T, --tx-subdev-spec, type=subdev, 
default=None) 
parser.add_option(-a, --tx-amplitude, type=eng_float, 
default=32000)
parser.add_option(-q, --tx-freq, type=eng_float, default=950e6) 
parser.add_option(-i, --interp, type=intx, default=512)
(options, args) =  parser.parse_args()

rx_src = usrp.source_c (0, options.decim)
rx_subdev_spec = (0,0) 
rx_src.set_mux(usrp.determine_rx_mux_value(rx_src, rx_subdev_spec))
subdev = usrp.selected_subdev(rx_src,  rx_subdev_spec)
r = rx_src.tune(0, subdev, options.freq)

self._tx_amplitude = options.tx_amplitude
self.amp = gr.multiply_const_cc(0) self.amp.set_k(self._tx_amplitude)

dst = usrp.sink_c(0, options.interp)
if options.tx_subdev_spec is None:
tx_subdev_spec = usrp.pick_tx_subdevice(dst)
 dst.set_mux(usrp.determine_tx_mux_value (dst, tx_subdev_spec))
subdev = usrp.selected_subdev(dst, tx_subdev_spec)
r = dst.tune(subdev._which, subdev, options.tx_freq )

filename = /home/polytech/Desktop/usrp_data_receive.dat 
destination = gr.file_sink(gr.sizeof_gr_complex, filename)

self.connect(rx_src,  destination)
self.connect(rx_src, self.amp, dst)

if __name__ == '__main__':
try:
my_graph().run()
except KeyboardInterrupt:
pass

   
-
 Download prohibited? No problem. CHAT from any browser, without download.___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] USRP as relay

2007-07-20 Thread pratik hetamsaria
hi tarun,

I have been looking at those links only.Rather the entire code which i have 
made is based upon that. I came to know how to declare the usrp as source and 
sink from the archives. But making it as a relay is somehow not working and i 
don't have any idea where can be the possible mistake. It would be very helpful 
if you can point out where i am making the mistake.

Thanks
Pratik Hetamsaria


Tarun Tiwari [EMAIL PROTECTED] wrote: Hi Pratik,

I hope this would help you 
http://lists.gnu.org/archive/html/discuss-gnuradio/2006-04/msg00196.html

regards,
 Tarun

On 7/18/07, pratik hetamsaria [EMAIL PROTECTED] wrote: hi..

I want to make the usrp function as a relay for audio files.

Apart from working on rx_voice.py for getting the relay function to work(i have 
written about the problem faced by me in my previous mail)
 http://lists.gnu.org/archive/html/discuss-gnuradio/2007-07/msg00203.html 
 
i just made up a simple code which would do the same.I am attaching the code 
for reference. I am able to see that the usrp reads the data coming at 
910MHz(in my case) which is transmitted by tx_voice.py by writing the data onto 
a file and then passing it to the demodulator(i am able to see the packets by 
passing the file as input to rx_voice.py). But, after retransmission at 950MHz 
, at another machine i am not able to receive any packets. I am able to see 
that the usrp does transmit something at 950MHz because i can see a spike in a 
spectrum analyzer at that frequency. I am not able to  get what can be the 
possible problem. Kindly point out if there is any error in my code. Is there 
any fundamental mistake which i am doing. I have been mailing quite a lot 
regarding this but not getting any response.
 Please help.

Thanks
Pratik Hetamsaria

___

class my_graph(gr.flow_graph):

def __init__(self):
gr.flow_graph.__init_ _(self)

parser = OptionParser(option_class=eng_option)
parser.add_option(-R, --rx-subdev-spec, type=subdev, default=None)
parser.add_option(-d, --decim, type=int, default=256) 
  
parser.add_option(-f,  --freq, type=eng_float, default=910e6)
parser.add_option(-g, --gain, type=eng_float, default=45)
parser.add_option(-T, --tx-subdev-spec, type=subdev, 
default=None) 
parser.add_option(-a, --tx-amplitude, type=eng_float, 
default=32000)
parser.add_option(-q, --tx-freq, type=eng_float, default=950e6) 
parser.add_option(-i, --interp, type=intx, default=512)
(options, args) = parser.parse_args()

rx_src = usrp.source_c (0, options.decim)
rx_subdev_spec = (0,0) 
rx_src.set_mux(usrp.determine_rx_mux_value(rx_src, rx_subdev_spec))
subdev = usrp.selected_subdev(rx_src,  rx_subdev_spec)
r = rx_src.tune(0, subdev, options.freq)

self._tx_amplitude = options.tx_amplitude
self.amp = gr.multiply_const_cc(0) self.amp.set_k(self._tx_amplitude)

dst = usrp.sink_c(0, options.interp)
if options.tx_subdev_spec is None:
tx_subdev_spec = usrp.pick_tx_subdevice(dst)
dst.set_mux(usrp.determine_tx_mux_value (dst, tx_subdev_spec))
subdev = usrp.selected_subdev(dst, tx_subdev_spec)
r = dst.tune(subdev._which, subdev, options.tx_freq )

filename = /home/polytech/Desktop/usrp_data_receive.dat 
destination = gr.file_sink(gr.sizeof_gr_complex, filename)

self.connect(rx_src,  destination)
self.connect(rx_src, self.amp, dst)

if __name__ == '__main__':
try:
my_graph().run()
except KeyboardInterrupt:
pass



  

-
 Get the freedom to save as many mails as you wish.  Click here to know how.

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

 

 

   
-
 DELETE button is history. Unlimited mail storage is just a click away.___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] USRP as relay

2007-07-18 Thread pratik hetamsaria
hi..

I want to make the usrp function as a relay for audio files.

Apart from working on rx_voice.py for getting the relay function to work(i have 
written about the problem faced by me in my previous mail)
http://lists.gnu.org/archive/html/discuss-gnuradio/2007-07/msg00203.html
 
i just made up a simple code which would do the same.I am attaching the code 
for reference. I am able to see that the usrp reads the data coming at 
910MHz(in my case) which is transmitted by tx_voice.py by writing the data onto 
a file and then passing it to the demodulator(i am able to see the packets by 
passing the file as input to rx_voice.py). But, after retransmission at 950MHz 
, at another machine i am not able to receive any packets. I am able to see 
that the usrp does transmit something at 950MHz because i can see a spike in a 
spectrum analyzer at that frequency. I am not able to get what can be the 
possible problem. Kindly point out if there is any error in my code. Is there 
any fundamental mistake which i am doing. I have been mailing quite a lot 
regarding this but not getting any response.
Please help.

Thanks
Pratik Hetamsaria

___

class my_graph(gr.flow_graph):

def __init__(self):
gr.flow_graph.__init__(self)

parser = OptionParser(option_class=eng_option)
parser.add_option(-R, --rx-subdev-spec, type=subdev, default=None)
parser.add_option(-d, --decim, type=int, default=256) 
 
parser.add_option(-f, --freq, type=eng_float, default=910e6)
parser.add_option(-g, --gain, type=eng_float, default=45)
parser.add_option(-T, --tx-subdev-spec, type=subdev, default=None)
parser.add_option(-a, --tx-amplitude, type=eng_float, 
default=32000)
parser.add_option(-q, --tx-freq, type=eng_float, default=950e6)
parser.add_option(-i, --interp, type=intx, default=512)
(options, args) = parser.parse_args()

rx_src = usrp.source_c (0, options.decim)
rx_subdev_spec = (0,0)
rx_src.set_mux(usrp.determine_rx_mux_value(rx_src, rx_subdev_spec))
subdev = usrp.selected_subdev(rx_src, rx_subdev_spec)
r = rx_src.tune(0, subdev, options.freq)

self._tx_amplitude = options.tx_amplitude
self.amp = gr.multiply_const_cc(0)
self.amp.set_k(self._tx_amplitude)

dst = usrp.sink_c(0, options.interp)
if options.tx_subdev_spec is None:
tx_subdev_spec = usrp.pick_tx_subdevice(dst)
dst.set_mux(usrp.determine_tx_mux_value(dst, tx_subdev_spec))
subdev = usrp.selected_subdev(dst, tx_subdev_spec)
r = dst.tune(subdev._which, subdev, options.tx_freq )

filename = /home/polytech/Desktop/usrp_data_receive.dat
destination = gr.file_sink(gr.sizeof_gr_complex, filename)

self.connect(rx_src, destination)
self.connect(rx_src, self.amp, dst)

if __name__ == '__main__':
try:
my_graph().run()
except KeyboardInterrupt:
pass




   
-
 Get the freedom to save as many mails as you wish. Click here to know how.___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] USRP as relay

2007-07-17 Thread pratik hetamsaria
hi

I have been trying to make the USRP work as a relay for quite some time and not 
been able to do so. I want to transmit whatever data the USRP has received. 

I have been working on rx_voice.py for reception of my audio files.The flow 
graph is connected like :

 self.u = usrp.source_c(0,decim);
 fg.connect(self.u,  self.chan_filt, self.packet_receiver)

The reception of packets is perfectly fine in this case. Now, the curious thing 
which is happening is that when i also make the usrp as the sink and connect 
the flow graph as

self.dst = usrp.sink_c(0,interp);
  fg.connect(self.u,  self.chan_filt, self.packet_receiver)
 fg.connect(self.u, self.dst);

then i also stop receiving any packets. I am not able to understand why is this 
happening. At least the reception of the packets should not have changed, leave 
aside the retransmission part. I am using a single Flex 900 board so i dont 
think that might be causing the problem.I dont think that making the connection 
as

Data from usrp  Data to usrp

is wrong. If its so,then let me know and is it necessary to put some kind of 
filter between the 2 to make it working. Also, i dont think that making the 
flow graph as

Data from usrp data demod - data remod -- Data to usrp

would make any difference. I also want to retransmit at a different frequency. 
So, is it necessary to demod and remod or whether just setting the usrp at that 
retransmission frequency would solve my purpose.

Reading from the previous archives i have found that it should not be much of a 
problem in making such a thing work but somehow its not working in my case.

I would be very grateful if somebody could help as its been quite long since i 
am stuck onto this problem.

Thanks
Pratik Hetamsaria



-
 Here’s a new way to find what you're looking for - Yahoo! Answers ___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] Reducing the samples from ADC

2007-07-11 Thread pratik hetamsaria
hi..
i am working on tx_voice.py and rx_voice.py. I have to capture data directly 
from usrp and write onto a file and process that. The problem is that the file 
which is made by the data coming from usrp is very big so basically i am not 
able to process that. Is there any way by which i can reduce the size of the 
file without affecting my audio quality much.

The rates which i am presently using on the tx_voice.py are:
Bitrate- 50,000
samples per symbol - 5
interpolation - 512

Rates which i am using on the rx_voice.py are:
Bitrate- 50,000
 samples per symbol - 5
decimation - 256.

Moreover, i have tried using gr.fir_filter_ccf (for decimatio in software)in 
the following fashion

chan_coeffs = gr.firdes.low_pass (1.0,  # gain
  self._samples_per_symbol, # 
sampling rate
  1.0,  # midpoint of 
trans. band
  0.1,  # width of 
trans. band
  gr.firdes.WIN_HANN)   # filter type 

self.chan_filt = gr.fir_filter_ccc(sw_decim, chan_coeffs)

and making a connection as
fg.connect(self.u,  self.chan_filt, self.packet_receiver)
fg.connect(self.chan_filt,destination)

where destination refers to the file onto which i want to write.Now, this works 
fine as long as sw_decim =1. But, if i change the value to 2,4 ,8 or any other 
then i dont receive any packet. The file size does change as required (i am 
able to observe that as the usrp is always sending data). what i have 
understood is that because of the decimation i am missing samples and thus not 
able to receive packets.So, can somebody please explain how to get around the 
situation. 

Thanks for all the help.
Pratik Hetamsaria



 


   
-
 Why delete messages? Unlimited storage is just a click away.___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] Demodulation problem

2007-07-08 Thread pratik hetamsaria

hi..
i am working on rx_voice.py for transmission of audio files. In my application, 
i need to capture directly the usrp samples and write them onto a file. Now, i 
further want do some processing on them using MATLAB. Next, what i want is that 
the file be passed to the python code where i can demodulate them as it is done 
in receive_path.py . I have been able to capture the data directly from USRP 
and write it onto a file by making the connection:

fg.connect(self.u,self.dst)
where self.dst refers to the file. I also do the processing using MATLAB and 
again write it onto a different file. Now, the problem is that how should i 
pass the new file back to the code so that it gets demodulated. I have tried 
running the rx_voice again wherein i make a connection as follows:

fg.connect(self.dst,self.chan_filt,self.packet_receiver)
where self.dst refers to the new file which i want to demodulate.

But, nothing happens on making such a connection. Maybe the problem is because 
of the way in which the samples from USRP and files are read. The other option 
which i have thought of is to demodulate the entire signal in MATLAB .But tht i 
suppose would be pretty tedious because then i will probably have to study all 
the C++ implementations of the demod blocks. 

Can anyone please suggest any solution. I jus want that the data from a file be 
read and demodulated in the same fashion as it is done when it reads direct 
samples from the USRP.

Thanks for all the help in advance
Pratik Hetamsaria


 Send free SMS to your Friends on Mobile from your Yahoo! Messenger. Download 
Now! http://messenger.yahoo.com/download.php___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Simultaneous transmission and reception

2007-07-04 Thread pratik hetamsaria


David Scaperoth [EMAIL PROTECTED] wrote: 

 On 7/3/07, pratik hetamsaria [EMAIL PROTECTED] wrote: Hi Everyone

I am currently trying to make a USRP transceiver run, which is based on TDMA 
approach.   
 As a warning, the USRP and GNU Radio are going to give you some trouble when 
it comes to TDMA (at least for smaller time slots).  However, in the near 
future the mblocks and inband signalling on the USRP will allow you to 
precisely timestamp the data that is coming in from the ADC...so if you can 
stand to wait (or help out with the work), it might be in your best interest. 
  

 Elaborating on it, it should be a system which works in receive mode for 
sometime, writes the data in a file and in the next slot transmits the data 
which has been written in the file. 

Reading from the previous archives, I figured out that switching between the 
modes can be done by setting the set_auto_tr(True). 
The switching works lovely when writing reading and is done into and from 
different files. But as soon as the same file is used, problem starts. 

I have been working on tx_voice.py and rx_voice.py. I start the receiver first 
so that it writes onto the file. After few seconds, i start the transmitter and 
then after every 5 seconds I make the transmit mode go to sleep for another 5 
seconds.   
 When you say you make the transmit mode go to sleep, how do you stop sending 
data from the file?  

   
 -- I just use the time.sleep function for making the transmit mode go into 
the sleep mode. I have assumed that it doesnt transmit during that time because 
then the receiver gets active and starts receiving packets. Reading from 
archives, i figured out that the USRP transmits whenever it has some data to 
transmit and then gets into the receiving mode. Please correct me if i am wrong.
   
 
 But, the problem is that it works fine for some time but after that the 
transmit mode stops and the receiver keeps on receiving more packets and then 
we dont get into the transmit mode.   
 How fast are you transmitting / receiving (sampling rate)?  What kind of CPU 
are you using?  Writing to a file continuously is a pretty ominous task for a 
computer if the sampling rate is say 1MHz.  If you did this for 5 seconds, the 
computer may be just simply lagging behind.  (Does anyone know how fast it is 
possible to write to a harddrive?).  Are you getting 0u0u on the screen while 
its running? 
 
 The bitrate is 5 and samples per symbol is 5 for transmit and receiver 
sides. The interpolation rate is 512 and the corresponding decimation rate is 
256. I am using a Pentium 4 3.0 GHz processor .I am not getting any underbuffer 
in my case while i am transmitting. What i get is that the transmitter simply 
stops after transmitting a few packets.
   
   
   
 
 Another thing to keep in mind is that the ADC is continuously sending data 
across the USB.  When you begin to transmit, the data sent to the USB is just 
garbage (noise), so in the end you have to be constantly throwing data away 
when you are transmitting. This will all change when the mblocks are finished. 
Wahoo! 
  
-Please explain what do yo mean by data sent to the USB is just noise ,so 
u'll have to be constantly throwing data away . 
   
 
 The transmit mode stops even though the number of packets written to file are 
more than read. Maybe this could  be a problem of buffering or something 
because if i keep the transmission in repeat mode then the transmit mode doesnt 
stop. However In my case, i dont want the transmission in repetition mode. I 
only want to transmit whatever i have received. I have also ensured that the 
rates of receiveing and transmission are the same.   
  hope this helped some
   
 Even if the TDMA approach doesnt work, then my work can also be done even if i 
use FDMA i.e I would just like that the data received be first demodulated and 
remodulated and transmitted over a differnt frequency. The only thing is that i 
need a function of a relay. But, I am not sure whether with the rates i am 
transmitting and receiving 
 this could be done. Also, i have tried making the USRP as the source and the 
sink by using the commands 
   
 self.u = usrp.source_c(0,decim)
 self. dst = usrp.sink_c (0, options.interp)   
   
 and  making the connection as 
 fg.connect(self.u,self.dst)
   
 I have tried viewing the signals on the scope by using self.scope from 
usrp_oscope.py . I just tried testing it by viewing signals sent from 
usrp_siggen.py at a frequency of 910Mhz and retransmitted at a frequency of 
950MHz. However, the signals look very different if i just run the 
usrp_oscope(original version when i just receive the signal and display it on 
the oscope) and in the other case(where i retransmit it at a different 
frequency). So, could somebody please point out if i am doing any mistake over 
here. I have just a feeling that whatever i am doing is pretty simple to do but 
maybe i am doing some mistake sumwhere..:)
   
 Thanks for your

[Discuss-gnuradio] Simultaneous transmission and reception

2007-07-03 Thread pratik hetamsaria
Hi Everyone

I am currently trying to make a USRP transceiver run, which is based on TDMA 
approach.Elaborating on it, it should be a system which works in receive mode 
for sometime, writes the data in a file and in the next slot transmits the data 
which has been written in the file.

Reading from the previous archives, I figured out that switching between the 
modes can be done by setting the set_auto_tr(True). 
The switching works lovely when writing reading and is done into and from 
different files. But as soon as the same file is used, problem starts.

I have been working on tx_voice.py and rx_voice.py. I start the receiver first 
so that it writes onto the file. After few seconds, i start the transmitter and 
then after every 5 seconds I make the transmit mode go to sleep for another 5 
seconds. But, the problem is that it works fine for some time but after that 
the transmit mode stops and the receiver keeps on receiving more packets and 
then we dont get into the transmit mode. The transmit mode stops even though 
the number of packets written to file are more than read. Maybe this could  be 
a problem of buffering or something because if i keep the transmission in 
repeat mode then the transmit mode doesnt stop. However In my case, i dont want 
the transmission in repetition mode. I only want to transmit whatever i have 
received. I have also ensured that the rates of receiveing and transmission are 
the same.

Could anybody please help me out with the situation.I just want to retransmit 
the data received from USRP.

Thanks for all the help in advance
Pratik Hetamsaria



-
 Here’s a new way to find what you're looking for - Yahoo! Answers ___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] embed fix sequence in payload part

2007-06-29 Thread pratik hetamsaria
hi..
 
 i am presently working on tx_voice.py and rx_voice.py  for transmission of 
audio files. I am interested in finding out the BER . Now, the problem is that 
a few packets are dropped so i need to keep track of a packet sequence number. 
I am trying to embed a packet sequence number so that during the time of 
demodulation i know exactly which bits i should compare. I have looked into the 
code of packet_utils.py located at python2.4/site-packages/gnuradio and try to 
embed the sequence number over there in the payload part. What i have 
understood is that the preamble and access codes are dropped during the time of 
reception. So, i thought it would be easier to embed it in the payload part. 
Please correct me if i am wrong. 
 
 But when i try adding any sequence then during the time of reception, i 
receive the errors as i have mentioned. I have seen that there is an option of 
padding the payload with zeros. So,  after i add  a sequence number, the  
length of the payload still remains the same as it was before adding the 
sequence number (the number of bits padded have changed).So, i dont know what 
really has changed which causes this error. 
 
 What i have added is just one line in the make_packet function of 
packet_utils.py 
 
 
 def make_packet(payload, samples_per_symbol, bits_per_symbol,
 access_code=default_access_code, pad_for_usrp=True):
 
 (packed_access_code, padded) = 
conv_1_0_string_to_packed_binary_string(access_code)
 (packed_preamble, ignore) = 
conv_1_0_string_to_packed_binary_string(preamble)
 payload =  packed_preamble + payload   %LINE ADDED
 payload_with_crc = gru.gen_and_append_crc32(payload)
 pkt = ''.join((packed_access_code,  make_header(L), 
whiten(payload_with_crc), '\x55'))
 
 if pad_for_usrp:
 pkt = pkt + (_npadding_bytes(len(pkt), samples_per_symbol, 
bits_per_symbol) * '\x55')
 
 return pkt
 
 
 I have not changed anything at the receiving end. Please tell me if i need to 
do change anything during reception. I have printed the msg length from the 
pkt.py code at python2.4/site-packages/gnuradio/blksimpl
 
  For comparison of BER i am taking the payload part as reference i.e. i am 
writing the payload part onto a file and during the time of reception also, i 
am doing the same. Please tell if there is a better way of doing BER.
 
 thanks for your help
 Pratik Hetamsaria
 Tom Rondeau [EMAIL PROTECTED] wrote: pratik hetamsaria  wrote:
  hi..
 
  i am trying to embed a fixed sequence which i want to recover during 
  demodulation. I have read from the previous archives that it would be 
  easier to embed it in the payload part.However, as soon as i add 
  anything in the payload part, and try to receive using rx_voice, i get 
  an error saying
 
  terminate called after throwing an instance of 'std::runtime_error'
what():  msg length is not a multiple of d_itemsize
  Aborted (core dumped)
 
  What I have understood is that the msg length changes as soon as I add 
  something to the payload.If I dont do anything and just run 
  rx_voice.py then the msg length comes to be 1687/1720
 
  I have tried getting the msg length after adding different sequences.
  If i change the code as:
  payload = payload + preamble, the msg length changes to 1719
 
  Otherwise, If i change  as:
  payload = payload + default_access_code
  the msg length changes to 1751
 
  where default_access_code and preamble are given in packet_utils.py.
 
  I have not been able to find out the value of d_itemsize or what 
  should be its value so that the code runs.
 
  I would be very grateful for any help.
 
  Thanking you,
  Pratik Hetamsaria
 
 Pratik,
 
 I'm not entirely sure what you're trying to do. Which example code are 
 you using? And also, what's the purpose of what you are trying to do? 
 That might help us set you in the right direction.
 
 Please list the code where you are making the change to add your fixed 
 sequence.
 
 Tom
 
 


-
 Here’s a new way to find what you're looking for - Yahoo! Answers ___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] error using rx_voice.py

2007-06-25 Thread pratik hetamsaria
I am working on tx_voice.py and rx_voice.py and I am trying to embed a fixed 
sequence in the payload part of my packet. However, when i try to receive the 
data using rx_voice, i get an error saying 

terminate called after throwing an instance of 'std::runtime_error'
  what():  msg length is not a multiple of d_itemsize
Aborted (core dumped)

I have added only one line in make_packet in packet_utils.py  and it looks like 
this:(just the important lines as i thought)

def make_packet(payload, samples_per_symbol, bits_per_symbol,
access_code=default_access_code, pad_for_usrp=True):

(packed_access_code, padded) = 
conv_1_0_string_to_packed_binary_string(access_code)
(packed_preamble, ignore) = 
conv_1_0_string_to_packed_binary_string(preamble)
payload = packed_preamble + payload
payload_with_crc = gru.gen_and_append_crc32(payload)
pkt = ''.join((packed_access_code, make_header(L), 
whiten(payload_with_crc), '\x55'))

if pad_for_usrp:
pkt = pkt + (_npadding_bytes(len(pkt), samples_per_symbol, 
bits_per_symbol) * '\x55')

return pkt


Can anyone please explain how to remove this error. I want to add fixed 
sequence so that it helps in calculation of BER.

Thanks,
Pratik Hetamsaria


-
 Here’s a new way to find what you're looking for - Yahoo! Answers ___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] Transceiver function of USRP

2007-06-08 Thread pratik hetamsaria
hi..
 i are trying  to implement a transceiver function in gnu radio.what i want is 
that the usrp be in the transmitting mode for say a specified no. of packets 
and then it switches onto the receiving mode for another specified no. of 
packets. i have already seen usrp_nbfm_ptt.py which does exactly the same thing 
but it is event driven. i am not able to understand how does this switching 
exactly take place in that and how does by just making one flow graph we are 
able to switch. i have tried making it go automatically by using the 
start(),stop() and wait() functions of the flow graph but have not managed to 
do it. Maybe what i am trying is the wrong approach,so can anybody please 
explain how to do the above thing. i jus want that the event driven thing in 
usrp_nbfm_ptt.py switch automatically based on any criteria, be it no. of 
packets, time etc.
 
 thanks
 pratik hetamsaria 
   
-
 Looking for people who are YOUR TYPE?  Find them here!___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio