UDP port number

Ive been trying to run a code that reads a UDP connection and transmits
the
data using the USRP.
I got some error

Traceback (most recent call last):
File “./prefinal4.py”, line 46, in ?
app = stdgui.stdapp (my_rx_graph, “My RX”)
File
“/usr/local/lib/python2.4/site-packages/gnuradio/wxgui/stdgui.py”,
line 36, in init
wx.App.init (self, redirect=False)
File
“/usr/lib/python2.4/site-packages/wx-2.6-gtk2-unicode/wx/_core.py”,
line 7700, in init
self._BootstrapApp()
File
“/usr/lib/python2.4/site-packages/wx-2.6-gtk2-unicode/wx/_core.py”,
line 7352, in _BootstrapApp
return core.PyApp__BootstrapApp(*args, **kwargs)
File
“/usr/local/lib/python2.4/site-packages/gnuradio/wxgui/stdgui.py”,
line 39, in OnInit
frame = stdframe (self.flow_graph_maker, self.title, self._nstatus)
File
“/usr/local/lib/python2.4/site-packages/gnuradio/wxgui/stdgui.py”,
line 60, in init
self.panel = stdpanel (self, self, flow_graph_maker)
File
“/usr/local/lib/python2.4/site-packages/gnuradio/wxgui/stdgui.py”,
line 81, in init
self.fg = flow_graph_maker (frame, self, vbox, sys.argv)
File “./prefinal4.py”, line 32, in init
self.connect (dst,self.scope)
File
“/usr/local/lib/python2.4/site-packages/gnuradio/gr/basic_flow_graph.py”,
line 115, in connect
self._connect (points[i-1], points[i])
File
“/usr/local/lib/python2.4/site-packages/gnuradio/gr/basic_flow_graph.py”,
line 120, in _connect
self._connect_prim (s, d)
File
“/usr/local/lib/python2.4/site-packages/gnuradio/gr/basic_flow_graph.py”,
line 125, in _connect_prim
self._check_valid_src_port (src_endpoint)
File
“/usr/local/lib/python2.4/site-packages/gnuradio/gr/basic_flow_graph.py”,
line 222, in _check_valid_src_port
self._check_port (src_endpoint.block.output_signature(),
src_endpoint.port)
File
“/usr/local/lib/python2.4/site-packages/gnuradio/gr/basic_flow_graph.py”,
line 233, in _check_port
raise ValueError, ‘port number out of range.’
ValueError: port number out of range.

i uploaded my code http://www.nabble.com/file/p11395825/prefinal4.py
prefinal4.py

View this message in context:
http://www.nabble.com/UDP-port-number-tf4012851.html#a11395825
Sent from the GnuRadio mailing list archive at Nabble.com.

Anyone feel free to correct me, but it seems like your problem isn’t
with the UDP port, but rather the internal “ports” that Gnuradio uses to
connect blocks in a flowgraph. Looking at your traceback, your problem
starts on line 32, where you’re trying to connect a usrp.sink_c to a
scopesink. I believe that sinks only have input ports and no output
ports, so there’s nothing available for gnuradio to connect from the
usrp sink to the scopesink. The port error you’re receiving is from the
_check_port function in basic_flow_graph, which is trying to connect
these two blocks.

To fix this, you need to send the output from “conv” to the sink and to
the scope. I’m not quite sure what exactly you’d use to accomplish this,
I imagine you need something with two output ports(?). Can someone else
provide a suggestion?

thanks Dev for your help, i tried removing the oscope and the fft and
its
working fine .

I think now i need to connect the output of conv = gr.float_to_complex()
,
does anyone have a clue how can i do that with the self.connect

Dev R. wrote:

File
line 81, in init
self._connect_prim (s, d)
“/usr/local/lib/python2.4/site-packages/gnuradio/gr/basic_flow_graph.py”,


Discuss-gnuradio mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


View this message in context:
http://www.nabble.com/UDP-port-number-tf4012851.html#a11418382
Sent from the GnuRadio mailing list archive at Nabble.com.

thanks Dev for your help, i tried removing the oscope and the fft and
its
working fine .

I think now i need to connect the output of conv = gr.float_to_complex()
to the scope , does anyone have a clue how can i do that with the
self.connect

Dev R. wrote:

File
line 81, in init
self._connect_prim (s, d)
“/usr/local/lib/python2.4/site-packages/gnuradio/gr/basic_flow_graph.py”,


Discuss-gnuradio mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


View this message in context:
http://www.nabble.com/UDP-port-number-tf4012851.html#a11418386
Sent from the GnuRadio mailing list archive at Nabble.com.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs