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.

CC2541 Multirole Connection

Other Parts Discussed in Thread: CC2541

Hi all,

I have three cc2541 device each of them integrated with sensors. One CC2541 has to trigger the other ble CC2541 device to start sampling the sensor. Trigger will be a switch in only one device in real time. Here time synchronization between the sensor sampling is important. 

Following are my 2 approaches

1. The Ble which is going to trigger the other ble will be a central device. Central device can connect to maximum 3 ble peripherals as per the TI BLE Stack. I needed to send same information(start trigger) to all peripherals from central device. What will be the delay between the peripheral side to receive the same data from central ?Will  data be transmitted simultaneously in central.

2. One ble device is Peripheral + broadcaster and other 2 will be Peripheral + observer. When Switch is pressed in one ble it has to broadcast trigger information. Observer will listen and start sampling. Is it possible to change the advertise data for Connecting (Peripheral)and non connectable (broadcaster). I need to broadcast the trigger information only once. How to do in SimpleBLEPeripheralBroadcaster code

Regards,

Kayathri

  • Hello Kayathri,

    I would recommend option #2. Please see the "SimpleBLE ComboRoles" article on the "Embedded Examples" TI BLE Wiki page.

    Best wishes
  • Hi JXS,

    Thank you for your reply.

    I am testing the 2nd method(Peripheral+broadcaster & Peripheral+observer). I can able to change the advertData when switch is pressed.
    I am using GAP_UpdateAdvertisingData(simpleBLEPeripheral_TaskID, TRUE, sizeof( advertData ), advertData ); function to change the advertData . AdvertData is receiving in observer side.

    In code where is the place i can confirm that advertData has sent? I have to broadcast the sensor trigger data only once or twice and then go back to normal advertData.

    I am using SimpleBlePeripheral code.

    Regards,
    Kayathri

  • Hi JXS,

    I can update the advertisement data  when Switch is pressed.

    In observer side some advertisement packets are missing.

    Below are the setting in SimpleBLEPeripheralObserver code

    // Maximum number of scan responses
    #define DEFAULT_MAX_SCAN_RES                  16
     
    // Scan duration in ms
    #define DEFAULT_SCAN_DURATION                4000
     
    // Discovey mode (limited, general, all)
    #define DEFAULT_DISCOVERY_MODE                DEVDISC_MODE_ALL
     
    // TRUE to use active scan
    #define DEFAULT_DISCOVERY_ACTIVE_SCAN         FALSE
     
    // TRUE to use white list during discovery
    #define DEFAULT_DISCOVERY_WHITE_LIST          FALSE 
     
     
    GAP_SetParamValue( TGAP_GEN_DISC_SCAN, DEFAULT_SCAN_DURATION );
     // GAP_SetParamValue( TGAP_LIM_DISC_SCAN, DEFAULT_SCAN_DURATION );
     
      GAP_SetParamValue( TGAP_GEN_DISC_SCAN_INT, 16); 
      GAP_SetParamValue( TGAP_GEN_DISC_SCAN_WIND, 16);  
      GAP_SetParamValue(TGAP_FILTER_ADV_REPORTS,FALSE);
     
    In Broadcaster side, advertisement interval is 100ms.

    How can i get all the advertisement packet in observer side.

    Regards,

    Kayathri