This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC3200AUDBOOST: wifi_audio_app UDP client

Part Number: CC3200AUDBOOST

Hi Vincent,

In the udp_socket example, Udp client is the device that sends data out to a server. The Udp server receives data from a client. Is my understanding correct here?  

Who is the udp client in the wifi_audio_app? and who is the udp server?

Based on the udp_socket example the udp client should be the device that acts as the microphone. 

Thanks

Shavinda 

  • Shavinda,

    the example uses the UDP server IP to receive, and the UDP client IP to send out on the same socket.

  • Part Number: CC3200AUDBOOST

    Hi Vincent,

    Is my understanding correct here?

    In the wifi_audio_app mDNS advertiser is the speaker device which advertises with the service "CC3200._audio._udp.local." Then the MIC side uses sl_NetAppDnsGetHostByService to detect the speaker device including it's IP address and service port. Is there a reason for mDNS advertising to be done on the speaker side? I think that this can be done on either side. Based on this observation I decided to do the following. 

    The streaming device 1 will advertise with the service "CC3200._audio_stream1._udp.local." at PORT 5050" The streaming device 2 will advertise with the service "CC3200._audio_stream2._udp.local." at PORT 5051. 

    #ifndef MULTICAST          
                        lRetVal = sendto(g_UdpSock.iSockDesc, \
                                           (char*)(pRecordBuffer->pucReadPtr),PACKET_SIZE,\
                                           0,(struct sockaddr*)&(g_UdpSock.Client),\
                                           sizeof(g_UdpSock.Client));
                        if(lRetVal < 0)
                        {
                            UART_PRINT("Unable to send data\n\r");
                            LOOP_FOREVER();
                        }
     
    #else   //MULTICAST

    I think I can use sendto function from each streaming device to send the data out. 

    On the receiver side I'll use GetServiceList() function or sl_NetAppDnsGetHostByName() to identify IP address of these specific device and the port of service. I can use recvfrom twice to receive each stream from their respective port. I can use receive function twice to read audio data from respective ports. 

    Does this understanding make sense to you? or Can the receiver advertise two services on separate ports?

    Thanks

    Shavinda