Academic Hardware Products (myDAQ, myRIO)

cancel
Showing results for 
Search instead for 
Did you mean: 

USRP USB version with TCP connection

Hi all

 

I have the USRP USB based version. I tried to download the LabView driver but it doesn't work for this USRP model. (I have the old and cheap black one). Well, then I realized that I could make up something to make it work.

 

If we design a gnuradio piece of code that takes the sampled signal and puts it in an UDP or TCP port in order to be obtained by a Labview program then we will have the chance to process the signal using Labview. 

 

Well, that's exactly what I did, but nevertheless it doesn't work. I've tried to solve it by changing the server and client roles in both pieces of code but It doesn't work. It seems like they start to make the "conversation" but then everything goes bad. Gnuradio piece of code says this: "Connection reset by peer"

So communication never starts but they can reach each other. 

I think that maybe the issue could be related to the "bytes to read" option in the "TCPread" feature in the labview code.

 

 

Does anyone tried this?

Does anyone have an idea?

Why NI doesn't give me a new USRP as a present? 😛 

 

More info: This two pieces of code are running in the same computer and "talk" using the loopback direction (127.0.0.1).

0 Kudos
Message 1 of 6
(7,028 Views)

Hi Fran!

 

Have you tried Wireshark to see how the connection is going? First I would try to send a short and known number of bytes, and see if you are able to get that in LV.

 

The way you planned to do it should be fine. I am curious about it, could you post the code?

 

Regards!!

Applications Engineer - Certified LabVIEW Developer & Certified TestStand Developer
0 Kudos
Message 2 of 6
(7,010 Views)
If you cu
Applications Engineer - Certified LabVIEW Developer & Certified TestStand Developer
0 Kudos
Message 3 of 6
(7,009 Views)

Hi!
Thanks for your response.

 

Well, this two pieces of code are quite simple but if you want I'll upload them.

 

Right now we have this scenario:
1. Labview is working as a server, listening at 28801 port.
2. Python GNU radio code works as a client that connects itself to 28801 of 127.0.0.1

 

The source of the signal is an AWGN source (It isn't the USRP right now because it doesn't make any difference for this purpose).

 

Best regards

Download All
0 Kudos
Message 4 of 6
(6,999 Views)

BTW, I 've noticed that there is, at least, an error in the labview code. I think that in the version that I uploaded the output data of TCP read block is the wrong connector.

 

 

0 Kudos
Message 5 of 6
(6,997 Views)

Hi!!

 

For the TCP connection through LabVIEW, I would check the examples that come along with LV. Go to Help >> Find Examples... and put "TCP" in the search tab. Data Client and Data Server are good examples for what you are doing 😄

 

By the way, you could also try Wireshark to check if you are sending correctly the information from Python (I have never really worked with Python... so I can't check if that's correct or not).

 

Regards!

Applications Engineer - Certified LabVIEW Developer & Certified TestStand Developer
0 Kudos
Message 6 of 6
(6,978 Views)