Re: [Discuss-gnuradio] GNU Radio TCP and MATLAB
On Thu, Apr 26, 2007 at 02:48:34PM -0400, Kevin Rudd (Contractor) wrote: > Thanks for the suggestion. I dove into the TCP code to try and figure out > what it was doing. I found my problem. I have to use the following read > command... > > data = pnet(con, 'read', 1000, 'SINGLE', 'NATIVE'); > > Now I notice that matlab seems to be lag behind the USRP. So, maybe matlab > is not the best path to process the data in realtime. I am curious what the > best data rate someone has sustained using a TCP connection. TCP on GigE can do upwards of 100MB/s ;) > If I get it up and going, I will post my code and a howto so others can > stream data to and from MATLAB in real time. Thanks. Eric ___ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
RE: [Discuss-gnuradio] GNU Radio TCP and MATLAB
Thanks for the suggestion. I dove into the TCP code to try and figure out what it was doing. I found my problem. I have to use the following read command... data = pnet(con, 'read', 1000, 'SINGLE', 'NATIVE'); Now I notice that matlab seems to be lag behind the USRP. So, maybe matlab is not the best path to process the data in realtime. I am curious what the best data rate someone has sustained using a TCP connection. If I get it up and going, I will post my code and a howto so others can stream data to and from MATLAB in real time. Thanks, Kevin ___ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
Re: [Discuss-gnuradio] GNU Radio TCP and MATLAB
On Thu, Apr 26, 2007 at 12:52:40PM -0400, Kevin Rudd (Contractor) wrote: > Hello again, > I have decided to try the GNURadio -> TCP -> MATLAB route. I am running > into a few problems. > > First, I downloaded Jamie Cooley's GNURadio TCP Socket code here... > > http://alumni.media.mit.edu/~jcooley/gr_experiments/experiments/gr_socket.htm > > Then I downloaded a free matlab TCP toolbox as David suggested. > > http://www.mathworks.nl/matlabcentral/fileexchange/loadFile.do?objectId=345&; > objectType=file > > I can set up the connection and send data to matlab, but the data I receive > is all messed up. I think the format is off. For those who have done this, > what data type are you sending and how are you receiving it? Currently, I > am just sending a complex sine wave. If I sink it to a file, I can open it > in matlab with no problem. But when I send it via TCP, I get garbage. > > My matlab commands are basically... > > Con = pnet(sock,'tcplisten'); > data = pnet(con, 'read', 1000, 'SINGLE'); > cdata = data(1:2:end)+j*data(2:2:end); > plot(log(abs(fft(cdata > > Is 'SINGLE' the correct type to use? (I tried all the others and I still get > gargabe). > > Thanks for the help, > Kevin Not sure about the MATLAB end of things, but gr.file_descriptor_sink will be sending binary native-endian data. The format will depend on what you're sending into it. float or gr_complex (== std::complex) are the usual suspects. Is the MATLAB code expecting binary or ASCII data? Eric ___ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
[Discuss-gnuradio] GNU Radio TCP and MATLAB
Hello again, I have decided to try the GNURadio -> TCP -> MATLAB route. I am running into a few problems. First, I downloaded Jamie Cooley's GNURadio TCP Socket code here... http://alumni.media.mit.edu/~jcooley/gr_experiments/experiments/gr_socket.ht m Then I downloaded a free matlab TCP toolbox as David suggested. http://www.mathworks.nl/matlabcentral/fileexchange/loadFile.do?objectId=345&; objectType=file I can set up the connection and send data to matlab, but the data I receive is all messed up. I think the format is off. For those who have done this, what data type are you sending and how are you receiving it? Currently, I am just sending a complex sine wave. If I sink it to a file, I can open it in matlab with no problem. But when I send it via TCP, I get garbage. My matlab commands are basically... Con = pnet(sock,'tcplisten'); data = pnet(con, 'read', 1000, 'SINGLE'); cdata = data(1:2:end)+j*data(2:2:end); plot(log(abs(fft(cdata Is 'SINGLE' the correct type to use? (I tried all the others and I still get gargabe). Thanks for the help, Kevin ___ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio