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.

CC3200 Audio booster pack demo

Other Parts Discussed in Thread: UNIFLASH, CC3200, TEST2

I have set of Launchpad Rev 4.1 and Audio booster packs 3.0-A

I'm trying to test audio example.

1. Both launchpads were formatted, updated service pack (servicepack_1.0.0.10.0.bin)

2. Compiled all lib projects & audio demo app in IAR.

3. Flashed the audio demo ( UniCast ) using Uniflash ( Hardware setup SOP-2 closed and J2 , J3 open)

4. SOP-2 open , J2 & J3 closed, connected Audio booster pack to launchpads as mentioned in guides.

5. Connected only earphone/speaker on both launch pads. No microphones connected to Line-IN on both launchpads.

6. Both launchpads are powered through USB. 

I can see all three LEDs ( D5, D6, D7 ) are ON. Just after power on, D5, D6 are ON, red LED glows few seconds after.

Open Wi-Fi Starter App on my Android S4 smartphone, Enter my office WiFi AP details ( Network Name: SSID, Password: xxxxxx). This AP has WPA2 security.

If I click on these names, the settings are opened in browser, but both launchpads webpage looks different.

       

Please advice what to do from here on. I'm pretty sure on the hardware side steps like to on/off the Line-IN and Line-OUT etc... Unable to figure out from here on, how to configure these two launchpads to execute the demo.

Thank you

What to do next ?

  • Hi Hari,

    By default each device come in loopback mode means Mic-in to Audio-out on same device. 

    Hari C said:
    If I click on these names, the settings are opened in browser, but both launchpads webpage looks different.

    That's ok it showing default webpage. But it confirmed both the device connected to AP.

    As soon as device connected to each other devices switch from loopback mode to streaming mode means mic-in on one device to audio-out on another device.  To start audio streaming Press SW3 on on device and SW2 on another device. For more details please refer "Audio Streamer/Player" section on http://processors.wiki.ti.com/index.php/CC32xx_Wifi_Audio_Application

    Regards,

    Aashish

  • Dear Aashish,

    The loopback demo is OK (LEDs D5, D6 & D7 are ON). My problem is to run the following modes

    1. Audio streamer/Player

    2. Bi-directional Audio

    The both launchpads are unable to enter into the above modes from Initial Loopback mode.

    As you can see, both are connected to my office AP.

    But, both launchpads unable to detect/connect each other ?

    How to know they are connected each other ? I see all the three LEDs are always on.

    I connected speakers to U4 of launchpads (not using J4 Line-OUT on both launchpads). In loopback,  I'm able to play audio from galaxy s4 & listen on J4 & U4.

    Thank you

  • Hi Hari,

    Hari C said:
    How to know they are connected each other ?

    As we mentioned it switch from loopback to streaming mode. In loopback you will able to hear Mic-in to audio-out on same device. As soon as both device connected to each other, loopback mode will be disable means you can't hear mic-in to audio-out on same device. it's a indication that both device connected to each other and now you need to press SW2 and SW3 on device to stream audio.

    Regards,

    Aashish

  • But, both launchpads are not leaving loopback mode. Anyway to debug ?
    The procedure to execute this demo is pretty complex, as we can't debug from IAR/ccs.
    As users are left to unplug the BoosterPack from launchpad & place SOP-2 jumper. Then use flash binary to launchpad from Uniflash.
    Now, we have to remove SOP-2 & place the BoosterPack onto launchpad & then RESET the launchpads.

    User has got no way to debug ?
    Is there anyway to talk to TI directly & receive immediate support ?
    I spent almost 3 weeks just to execute wlan_station & this wifi_audio demos. Feeling terrible.

    Thank you
  • Hi Hari,


    There are following 3-way you can debug:
    1. Disable NOTERM macro from project properties to enable log messages on console.
    2. You can use debuuger but only issue is I2S IP will crash and you will not able to hear audio. Still you can debug why it not connecting to other device. Flash the binary on one device and use debugger on another device .
    3. Uncomment line#320, 321, 326 and 327 in main.c. It will disable I2C after codec initialization and enable GPIO for LED indication. And follow below steps:

    Connecting in Smart Config Mode
    1. Choose an AP that you want to configure on CC3200 Device. Connect your Android device to an AP. Power ON both the launch pads.
    2. Boot the application on both Launchpads.
    3. On your Android device, Launch the SmartConfig Android Application to configure CC3200 devices. Once the CC3200 device is connected to the AP (Green LED off), stop the application.
    - Green LED will come up and blinks for few seconds. Green LED blink means device is trying to connect to an AP
    - If not able to connect to an AP (Configured by SmartConfig), Green LED will glow up continuously.
    - If device connects to an AP (Configured by SmartConfig), Green LED will turn off.

    Audio Streamer/Player
    On the launchpads, the following switches invoke microphone and speaker on/off actions.
    SW3 - Microphone
    SW2 - Speaker

    1. Ensure Line - IN and Line - OUT points are connected appropriately on both the launch pads.
    2. Upon successful Smart Config connection, Press SW3 (on LP1) to start the streaming and SW2 (on LP2) to playback the audio. Similarly Press SW3 (on LP2) to start the streaming and SW2 (on LP1). The switch press can be used to handle MIC and Speaker ON/OFF actions. The below picture shows the bidirectional audio in action.
    • Green LED indicates Microphone task is running.
    • Orange LED indicates Speaker task is running
    • Red LED indicates audio is being played

    Please share your e-mail.


    Regards,
    Aashish

  • Dear Aashish,

    Formatted both launchpads, flashed the Binary by compiling the changed code ( as you said).
    Then, Without debugging both launchpads, I connected both launchpads & Booster packs. I could see the below terminal output when I start Android SmartConfig app. Both launchpads have RED led ON. Green & Orange OFF.

     

    Debugging using IAR on one launchpad, ( leaving the other running as usual ) did not help me to solve the problem.

    Still both launchpads never leave loopback mode.

    What is that MultiCast application ? Does it broadcast audio from one LP to many LPs ?

    Thank you 

  • Hi Hari,


    Did you pressed SW2 on one device and SW3 on another device.


    Regards,
    Aashish
  • Dear Aashish,

    I see the following in terminal when I press SW2 on launchpad1.

    Orange & Red LEDs are ON.

    launchpad1 Terminal output:

    launchpad2 Terminal output:

    On launchpad 2, After I press SW3, The gree LED is ON.

    Is there any problem in my UniFlash session file Station Config ?

    Thank you.

     

  • Hi Hari,


    Ahhh its not able to register mDNS service. Please don't use uniflash session file.


    Regards,
    Aashish
  • Dear Aashish,

    That session file was created for getting started wlan_station example.

    I didn't try to create any new session file, just changed path for wifi_audio binary file.

    I will try  tomorrow  and  reply  you.

    Thanks  for hanging  on to  this.

    Meanwhile you can drop any tips if there are any.

  • I'm still unable to get this work. I attached screenshots to demonstrate how I'm using Uniflash for flashing binary.

    Uniflash.zip

    Please let me know If I'm doing something wrong !

    Also, will there be any issue of router settings in this case ? For example, port forwarding  ?

    The terminal shows Unable to unregister MDNS service

    First t is unable to unregister. So it can't register, hence the problem.

            //Un Register mDNS Service.
        lRetVal = sl_NetAppMDNSUnRegisterService((signed char *)CC3200_MDNS_NAME,\
                              (unsigned char)strlen((const char *)CC3200_MDNS_NAME));
        if(lRetVal < 0)
        {
          UART_PRINT("Unable to unregister MDNS service\n\r");
        }
        //Registering for the mDNS service.              
        lRetVal = sl_NetAppMDNSRegisterService((signed char *)CC3200_MDNS_NAME, \
                              (unsigned char)strlen((const char *)CC3200_MDNS_NAME),\
                              (signed char *)"multicast",\
                              (unsigned char)strlen((const char *)"multicast"),\
                               AUDIO_PORT,1000,0);    
        if(lRetVal < 0)
        {
          UART_PRINT("Unable to register MDNS service\n\r");
          LOOP_FOREVER();
        }

    What are all the other possible problems ?

    Thank you

  • Hi Hari,

    Sorry I misread the log "Unable to unregister MDNS service" not "Unable to register MDNS service". So that's ok, it failing to unregister the service. 

    Hari C said:
    if(lRetVal < 0) { UART_PRINT("Unable to register MDNS service\n\r"); LOOP_FOREVER(); }

    Put a log message in else part to indicate whether it able to registered or not. Also put a log message in mDNS_Task() after "g_loopback = 0;" to verify the same.

    Regards,

    Aashish

  • Dear Aashish,

    Already log message is existing inside else.

    I placed log msg inside mDns_Task() as below:

    Result is below:

    The Green LED is not ON when I press SW3 on LP1. 

    And Orange LED doesn't ON when I press SW2 on LP2. 

    But the above cases are not consistent. Not repeatable. 

    I checked for Key bouncing with Oscilloscope, I sense something is bad here.

    But the code for Debouncing looks ok.

        //Check whether GPIO Level is Stable As No Debouncing Circuit in LP
        for(iCount=0;iCount<3;iCount++)
        {
            osi_Sleep(200);
            ulPin6Val = MAP_GPIOPinRead(GPIOA2_BASE,GPIO_PIN_6);
            if(ulPin6Val)
            {
                //False Alarm
                return;
            }
        }

    Will you check on your side. It is pretty inconsistent here. I'm not able to toggle the LEDs with SW2, SW3 keys on both launchpads consistently.

    Accidentally, I was able to execute this demo twice when I made around 90 to 100 attempts. But not able to trace the problem.

    Thank you.

  • Hi Hari,

    I mean following way:

           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;
                UART_PRINT("LP1 connected to LP2\n\r");
           }

    And don't use LOOP_FOREVER();

    Regards,

    Aashish

  • Dear Aashish,

     

    LP1 ( COM14)

    LP2 (COM12)

    Button

    SW3

    SW2

    LED on

    Orange, Red (default on)

    Green, Red (default on)

    It is not coming out of loopback mode.

    Thank you

  • Hi Hari,

    Can you please use the code snippet that we suggested in post http://e2e.ti.com/support/wireless_connectivity/f/968/p/414658/1475316#1475316 and share the log.

    Regards,

    Aashish

  • Yes, my previous reply was posted after using your code snippet.

  • Hi Hari,


    Please share modified project.


    Regards,
    Aashish
  • Here is the modified example project source.

    1256.wifi_audio_app.zip

  • Hi Hari,


    Please replace following code

    if(lRetValmDNS < 0) { UART_PRINT("Before While(1) in mDNS_Task():Unable to unregister MDNS service\n\r"); LOOP_FOREVER(); }

    with

    if(lRetValmDNS < 0) { UART_PRINT("Before While(1) in mDNS_Task():Unable to unregister MDNS service\n\r"); }


    Please don't use LOOP_FOREVER().


    Regards,
    Aashish
  • Sorry for that mistake about LOOP_FOREVER()

    Here is the requested log. Still the problem is same. 

    Thank you

  • Hi Hari,


    From log it seems you pressed SW2 on one board and SW3 on another board only. You need to do same operation other way also.

    LP1- SW2 LP2-SW3
    LP2-SW2 LP1-SW3


    Regards,
    Aashish
  • The following log is for Tests without Reset in between the key presses.

    Test 1:

    1. LP1- SW2 LP2-SW3
    2. LP2-SW2 LP1-SW3 

    Test 2: (after Reset)

    1. LP1- SW2 LP2-SW3
    2. LP1-SW2 LP2-SW3  

    3. LP2-SW2 LP1-SW3 

    In test2, demo audio works from LP1 --> LP2.

    Regards

    Hari

  • Hi Hari,


    What you mean by "without Reset in between the key presses.". You dont need to reset device between SW2/3 key press.


    Regards,
    Aashish
  • I guess I confused you by that Reset thing. I mean to say, I reset the board between those two tests.
  • Hi Hari,


    Is it working or you still have issue?


    Regards,
    Aashish
  • Still the problem is same.

    It works if the steps mentioned in Test2 are followed. But this is also not consistent over repeated attempts.

  • Hi Hari,

    Is it on both devices same code running as from log we can see "LP connected to LP2" on only one console. Also please put some log message in button handler too to verify there is no debounce or loose contact issue ?

    Regards,

    Aashish

  • Hi Hari,


    Is this issue resolved ? If yes please close this thread.


    Regards,
    Aashish
  • Hi Aashish,

    I'm having the exact problem as described here. I have not been able to get anything consistent going on this.

    I've tried adding the code snippets you listed, removing the LOOP_FOREVER() calls, ... and importing the modified code zip file you posted here into CCS rebuilding and loading from there, also loading the ewarm exe that was in your zip file. All resulting in inconsistent results ( maybe 1 out of 20+ times I get audio between the boards ).

    I read in another post, that the code in an older version of the SDK worked ( it worked in SDK 1.0.0, but not in 1.1.0 ). That post is here; e2e.ti.com/.../412279

    I couldn't find a download for the 1.0.0 SDK. Can you post the exe (or in a zip) for SDK 1.0.0 here?

    Thanks,
    Tom
  • Hello Aashish,

    I found the SDK 1.0.0 download and flashed the wifi_audio_app ccs unicast binary that came in the SDK.  It's working perfectly (with no inconsistencies in connections).   I also imported the project into CCS, built it, and flashed the result unicast binary.  This is also working perfectly.

    I haven't looked at the differences yet, but the 1.1.0 version is the culprit for this specific issue in my case.

    Thanks,
    Tom

  • Hello Tom,

    I am facing same issue in my CC3200 kit for Audio application.

    I think you found the SDK 1.0.0 and it works for you.

    Could you please share this SDK binary or Link here ?

    Thanks

    Viraj MIstry

  • Hi,

    We also have the same issue & tried all the above steps.

    We have also removed LOOP_FOREVER(), but still one board is stuck with "Unable to unregister from MDNS service"

    The other board shows Launchpad1 connected to Launchpad2 & the audio streaming is not working.

    Regards,

    -Abrar

  • Hi Ashish,

    I am a colleague of Abrar,

    We tried the modifiactions sugggested in the link processors.wiki.ti.com/.../CC32xx_Summary_of_Known_Issues.

    But still we see Unable to unregister MDNS service.

    Can we get SDK 1.0.0 As we didnt run this application sucessfully till now with 1.1.0.

    Regards,

    Bhargav.

  • Hi Bhargav,


    Please refer e2e.ti.com/.../1578506.


    Regards,
    Aashish
  • Ashish,
    Tested the code after

    https://e2e.ti.com/support/wireless_connectivity/f/968/p/440073/1578506#1578506

    modifications and is working fine.Thank you.
    Regards,
    Bhargav.