Re: Multicast
"Dave Moore dmoore-f4pv2F5LI2c/CDIEhCN/twC/[email protected] [rabbit-semi]" <[email protected]> Fri, 22 Jul 2016 07:42:41 -0700
| Newsgroups | gmane.comp.hardware.rabbit-semiconductor |
|---|---|
| Organization | Quest Controls |
| Message-ID | <[email protected]> |
Along with UDP_VERBOSE, set the global debug_on to something like 7 on startup. Should produce more debug output. And when you mention "UDP sockets" and "number of UDP buffers", are you actually talking about some of the macros (like MAX_UDP_SOCKET_BUFFERS?) Cuz you do need buffers to hold your packets (unless you alloc and supply your own to the udp handler code.) I don't believe there is a limitation to the number of udp sockets? Been a while though since I was in there. -- Dave On 7/21/2016 2:55 PM, Steve Trigero seecwriter-/[email protected] [rabbit-semi] wrote: > UDP_VERBOSE doesn't do anything. There is no output when it's defined. > I'm using your updated network library, so maybe > something happened there. > > In any case, after I ran my code in the debugger, it started working. > So I recompiled without debug code enabled and reloaded > the program, and now it works every time. Scary. > > Slight change of subject. > > First, what's the relationship between the number of UDP sockets and > number of UDP buffers? Since UDP is connectionless, a > socket for each potential device that may send a datagram is > unnecessary. But does that mean I could have one socket with a bunch > of buffers? A further explanation is, in a system we typically have 5 > sub-systems, with each sub-system sending a broadcast UDP > datagram of its status twice a second. The datagrams are around 150 > bytes each. Each sub-system reads the datagrams and collects > whatever information it needs from the datagrams. So if there is only > one UDP socket and the Rabbit is processing one datagram > when another one arrives, or even two datagrams arrive, do the new > datagrams get put into unused buffers or are they lost because > there is not an unused socket available? > > Steve > > ------------------------------------------------------------------------ > *From:* "Tom Collins tom-lnEA/wrDJtNWk0Htik3J/[email protected] [rabbit-semi]" > <[email protected]> > *To:* [email protected] > *Sent:* Thursday, July 21, 2016 11:28 AM > *Subject:* Re: [rabbit-semi] Multicast > > Do you see the packet come in if you define UDP_VERBOSE in your > program? > > I've seen instances where the first response to a UDP datagram > doesn't go out due to needing to ARP the IP address, but there are > some ways around that (telling the stack to use the MAC from the > received frame). > > I'm on vacation through the end of the month, so don't have access > to code I can share, but I'm curious as to whether the datagram > moves through the TCP/IP stack at all. > > -Tom > > > On Jul 21, 2016, at 12:23 PM, seecwriter-/[email protected] > <mailto:seecwriter-/[email protected]> [rabbit-semi] wrote: >> >> I added a Multicast socket to my RCM3900 application, using IP >> 239.255.255.255. I have a total of 4 UDP sockets open, 3 are >> opened with an REMIP and Port of -1, and one is opened with the >> Multicast IP and port 2100. And Max UDP Buffers is set to 5. >> >> After boot-up, the first UDP datagram to the module is not >> responded to. It doesn't matter if the datagram was a broadcast >> or a multicast. The first one is not responded to. After the >> first one, then it starts responding to both broadcasts and >> multicasts. >> >> Is there something else I need to do to get that first datagram >> to work? >> >> I'm using DC 9.62. >> . > > > >