TI E2E Community
Digital Signal Processors (DSP)
C6000 Multicore DSP
C64x Multicore DSP Forum
NDK Rx Filter on EVMC6472
I'm using CCSv4 with NDK 2.20.04.26, BIOS 6.30.02.42, IPC 1.21.02.23, XDCTOOLS 3.20.03.63, and XDAIS 7.10.00.06.
I'm using raw socket programming to send and receive UDP messages in a multithreaded application. If I use a command line to send a UDP packet to my board at it's bound address/port, I receive the packet fine and can process the data. However, when I send a message to the broadcast IP address (255.255.255.255), the board doesn't show any messages received. I think it might have something to do with the EMAC RX Filter but I don't know how to determine what it's currently set as (like EMAC_RXFILTER_ALL or EMAC_RXFILTER_NOTHING).
Another somewhat related question: if using socket programming, do calls to NETCNTL functions like NC_SystemOpen( ) affect the functionality of the MAC layer for non-NETCNTL tasks? I have a Daemon function running separately from my UDP task and I'm not sure how much the NC_.... calls are related to general send( )/recv( ). For instance, if I wanted to remove the Daemon, would a UDP recvnc( ) call still work if I no longer call NC_SystemOpen( ) and all the other NC_... setup functions?
Hi! I have a similar problem with Nick's,and look for your help~
I use DM642 as a server to receive broadcast message from PC.I tried to use PC to PC,it works,but PC to DSP,it failed.
My procedure run on DM642:
1. fdOpenSession(TaskSelf()); 2. bzero( &broadaddr, sizeof(struct sockaddr_in) ); broadaddr.sin_addr.s_addr = inet_addr("192.168.1.77"); broadaddr.sin_family = AF_INET; broadaddr.sin_port = htons(7000); broadaddr.sin_len = sizeof(broadaddr);
3. broadsock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
6. recvfrom(broadsock,(void *)buf,100,MSG_WAITALL,(PSA)&broadClient,&len);
My client code runs on PC,and code above runs on DM642. On CCS,I use watch window to check buf,it has nothing.
what 's the problem?is there anything wrong with Filter or NDK configuration?
Which version of the NDK are you using?
There is a bug in the stack that causes (non-daemon) tasks to not receive broadcast packets:
SDOCM00086184 NDK tasks are unable to receive broadcast packets (while daemon tasks can)
The resolution is discussed in this forum thread, please refer to the thread post I made on 11-07-2011 9:54 PM
If you are using an NDK that has shipped source code, you can apply the fix shown in that thread and rebuild your stack library. Then rebuild your app against the newly rebuilt library and you should be able to receive broadcast packets from within your task.
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.