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


Re: [Discuss-gnuradio] USRP as relay

2007-07-19 Thread Tarun Tiwari

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


___
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