Other Parts Discussed in Thread: CC3200
Hi Vincent,
I have been exploring the wifi_audio_app source code. The following code snippet looks like what detects the hosts (2 x streaming devices) in the network. In my case I will have two streaming devices. Would sl_NetAppDnsGetHostByService function return two IP addresses if there are two devices configured with audio service? This function is in network.c
void mDNS_Task() { int lRetValmDNS; unsigned int pAddr; unsigned long usPort; unsigned short ulTextLen = 200; char cText[201]; //UnRegister mDNS Service if done Previously lRetValmDNS = sl_NetAppMDNSUnRegisterService((signed char *)CC3200_MDNS_NAME, strlen(CC3200_MDNS_NAME)); while(1) { lRetValmDNS = 1; //Read mDNS service. while(lRetValmDNS) { ulTextLen = 200; lRetValmDNS = sl_NetAppDnsGetHostByService((signed char *) \ CC3200_MDNS_NAME, strlen((const char *)CC3200_MDNS_NAME), SL_AF_INET,(unsigned long *)&pAddr,&usPort, &ulTextLen,(signed char *)&cText[0]); } if(lRetValmDNS == 0 && (pAddr!=INVALID_CLIENT_ADDRESS) && \ (pAddr!=g_uiIpAddress)) { //Speaker Detected - Add Client g_UdpSock.Client.sin_family = AF_INET; g_UdpSock.Client.sin_addr.s_addr = htonl(pAddr); g_UdpSock.Client.sin_port = htons(usPort); g_UdpSock.iClientLength = sizeof(g_UdpSock.Client); g_loopback = 0; } MAP_UtilsDelay(80*1000*100); } }
Thanks
Shavinda