You are not logged in.
I was trying to send some data over the WARP Board using TCP/IP toolbox in Matlab. Setup was similar to your OFDM reference design.
---------------------
thissock=pnet('udpsocket',10000);
host1 = '192.168.1.16';
con = pnet(thissock, 'udpconnect',host1,10000);
% The values are thissock = 0 and con =18
% Now I transmit an array OrigCode
pnet(con,'write', OrigCode) ;
---------------
Here I get an error ---> No valid Handler!!! Already Closed???
Another Question: Is this the correct way of specifying the hostname? the udp_send_demo in the toolbox only uses localhost, so I am still stuck.
I am a newbie to network prog. but know that the general order should be something like the following for UDP :
----
socket()
bind()
sendto() and/or recvfrom()
close()
------
1) How to create a socket handler here? Isn't it supposed to be the value returned by thissock? I remember reading something in your PHY_PROTOTYPE model: socketHandles = [socketHandles thisSock] ----> Still unable to understand... Kindly help.
Last edited by kshitij (2007-Jul-09 15:51:53)
Offline
Our only experience with the MATLAB TCP/UDP/IP toolbox is as part of the PHY Prototyping project. My best suggestion is to read through the documentation included with the toolbox ('help pnet' in MATLAB, or here). Also, be sure you can get the examples working between two PCs without any WARP nodes in the link. This will isolate problems on WARP from general PC and MATLAB issues.
Offline
Okay.. I finally got my setup to work using a simple switch. With the OFDM Reference Design, WARP can be used as a switch too. I did not make any changes to that design, just downloaded the bitstream(*.bit file) and plugged the WARP board instead of the switch. Now, I am able to transmit (I see a temporary blink on the Ethernet led when doing so..), but unable to receive anything. Please help.
Offline
Are your boards configured as described in OFDM reference design page? It's important that they be setup for nodeID=0 and 1 (using the DIP switches). Do you see the 4 red LEDs changing at the receive node, indicating that it's receiving any packets?
If so, try the channel switching and CSMA changes described in Chris' previous post.
Offline
The nodes are configured exactly as described in the reference design. The LED's are changing at the receive nodes, but, I am not seeing anything in Matlab. Using the exact setup(just replaced the WARP nodes with a switch), I am able to receive bits in Matlab. I downloaded the 'download.bit' files to the WARP nodes without any changes at all. Video streaming with VLC is working fine. I suppose this means that maybe(?) the received packet is bad, and its being discarded...I'll try to change the BadPacketHandler -->let it forward the packet. However, I tried sending the packets continuously using a while loop... the rx.'s LED's glow.. yet nothing shows up? Can it be that every received packet is bad? Please help.
Offline
Of the four LEDs, are the top two blinking faster than the bottom two? The top pair alternate with each good packet reception; the bottom ones alternate with bad packets. It should be clear just by watching the LEDs whether you're getting mostly good or bad packets.
kshitij wrote:
Video streaming with VLC is working fine.
This means everything on the WARP boards is setup properly, so the problem is most likely in the PCs.
Offline
Yup...the top two LED's are blinking faster.. (so I am getting good packets, but where are they going ?) also changed the Bad Packet Handler..set it to just forward the received packets... still no response in Matlab...strange, since the entire Matlab program setup works when wired using a switch and the same IP's.....Please help....where exactly am I going wrong ? The idea was simple...create a bit level encoder in Matlab...send /receive over Ethernet using TCP/IP toolbox... WARP is being used instead of a switch..
--------
Kshitij
Offline
Does your experiment work if you connect the PCs directly together via Ethernet? If VLC is working fine, then the board to board communication is working great. In fact, we know it is working in both directions since the ARP handshake apparently was successful.
Offline
Like I mentioned earlier, everything works fine when connected using ethernet..... even when I attach the WARP nodes they seem to be transmitting and receiving (LED's blinking...) but nothing gets displayed in Matlab. I even tried this with the udp_plotter_demo and the udp_send demos which came with the TCP/UDP/IP toolbox..still getting the same results....
Offline
Anyways..... things worked out fine when using the Instrument Control Toolbox from Matlab......and thanks for all your help...
Regards,
Kshitij
Last edited by kshitij (2007-Jul-17 17:37:18)
Offline
Glad to hear it's working. Please keep us posted on your progress!
Offline