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.

CC2564MODNEM: GAP_LE_Perform_Scan() with a CC2564MODNEM and a STM3240G-EVAL board

Part Number: CC2564MODNEM
Other Parts Discussed in Thread: CC2564MODN

Hi,

Starting from the AUDDemo (available in the CC256XSTBTBLESW software package) I've added an A2DP source profile in order to make an A2DP repeater. It now works as a charm.

Now I have to perform a scan of LE beacon device on this same CC2564MODNEM but when I call GAP_LE_Perform_Scan() it returns me a BTPS_ERROR_LOCAL_CONTROLLER_DOES_NOT_SUPPORT_LE (-104).

I thought the CC2564MODN on the CC2564MODNEM board has Dual-mode Bluetooth support, so where am I wrong ?

Thanks in advance,

Jo

  • Hi Jo,

    Jo Laf said:
    Starting from the AUDDemo (available in the CC256XSTBTBLESW software package) I've added an A2DP source profile in order to make an A2DP repeater. It now works as a charm.

    Glad to know that your A2DP repeater is working fine.

    Jo Laf said:

    Now I have to perform a scan of LE beacon device on this same CC2564MODNEM but when I call GAP_LE_Perform_Scan() it returns me a BTPS_ERROR_LOCAL_CONTROLLER_DOES_NOT_SUPPORT_LE (-104).

    I thought the CC2564MODN on the CC2564MODNEM board has Dual-mode Bluetooth support, so where am I wrong ?

    In addition to the Bluetooth classic (BR/EDR), the CC2564x devices can either have simultaneous BLE operation or the assisted audio/voice features (AVPR). To enable either of these options, their respective add-ons (either BLE or AVPR add-on) must be loaded on to the CC2564x device after downloading the main service-pack.

    The AUDDemo, by default, does not enable either of these features because neither BLE nor AVPR is needed for the unassisted A2DP use-case. In order to enable BLE, you will need to call the BSC_EnableFeature API during application initialization. 

    For example:

    static int OpenStack(HCI_DriverInformation_t *HCI_DriverInformation, BTPS_Initialization_t *BTPS_Initialization)
    {
    ...
            /* Initialize the Stack                                        */
            Result = BSC_Initialize(HCI_DriverInformation, 0);
    
            /* Next, check the return value of the initialization to see   */
            /* if it was successful.                                       */
            if(Result > 0)
            {
                /* The Stack was initialized successfully, inform the user  */
                /* and set the return value of the initialization function  */
                /* to the Bluetooth Stack ID.                               */
                BluetoothStackID = Result;
                Display(("Bluetooth Stack ID: %d\r\n", BluetoothStackID));
                /* Attempt to enable the Low Energy feature.                */
                Result = BSC_EnableFeature(BluetoothStackID, BSC_FEATURE_BLUETOOTH_LOW_ENERGY);
                if(!Result)
                {
                   Display(("LOW ENERGY Support initialized.\r\n"));
                }
                else
                {
                   Display(("LOW ENERGY Support not initialized %d.\r\n", Result));
                }
    ...
            }
    ...
    }

    For additional details, you can refer to a dual-mode sample application (like the SPPLEDemo) from the SDK regarding how both BT classic and BLE are initialized.

    Best regards,

    Vihang

  • Hi Vihang,
    As suggested I have added the missing BSC_EnableFeature() but I'm getting "LOW ENERGY Support not initialized -104.".
    When I run the SPPLEDemo the BLE feature seems to be properly initialized. I have checked the initialization code before the OpenStack() call and it appears to be nearly the same.
    Do you have any clue on this ?
    Jo
  • Hi Vihang,
    The issue was a non defined __SUPPORT_LOW_ENERGY__ symbol.
    Thanks a lot for all your help,
    Jo