Re: Port Unreachable
"ct3lions2000" <[email protected]>
| Newsgroups | gmane.comp.hardware.rabbit-semiconductor |
|---|---|
| Message-ID | <[email protected]> |
Hi Steve, Thanks for the reply. Yes I am sure I am using UDP. I took the syntax directly from one of the UDP sample programs. It works nicely until the PC which is sending the data screws up and I guess leaves the socket hanging. At this point the only way to reestablish communication is to open and close the socket on the Rabbit. I am trying to make it more robust by sensing this fault condition but I can't find anything on the Rabbit end that detects this fault condition Regards --- In [email protected], Steve Trigero <seecwriter@...> wrote: > > I'm confused. There is no "connection" with UDP. Are you sure you're using UDP? > I use the following to open a UDP socket: > Â > Â udp_extopen( &udpcon[i].socket, IF_DEFAULT, UDP_BROADCAST_PORT, -1, -1, NULL, 0, 0); > Â > Â > Also, make sure you are not using the same port number for both TCP and UDP. > Â > Steve > Â > Â > > > > On Wednesday, October 16, 2013 7:55 AM, ct3lions2000 <terencenixon@...> wrote: > > Â > >Hi Guys > > > >I have a simple UDP communications set up where I open up a UDP Port on the RCM6710 using: > > > >udp_open(&sock, LOCAL_PORT, REMOTE_IP,0, NULL) > > > >I specify an IP Address and port to listen too. I then call TCP_TICK regularly and it works great communicating with a Visual Basic programming running on my PC. The problem comes when I halt the VB program and restart it. When I restart the VB program and try to send data to the Rabbit I get no reply from the rabbit (rabbit never receives the packet) and using a packet sniffer I see that I get an error packet saying the "Port is unreachable". The only way to correct this is to close the and reopen the socket on the rabbit. > > > >I have checked the return values on TCP_TICK and ifstatus and they are both nonzero indicating that as far as the rabbit is concerned the connection is still good. > > > >Is there a way I can check on the rabbit that everything is OK and reset it if it is not? > > > >Thanks > > > > > > > > > > >