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 peripheral as broadcaster (using serial interface)

Other Parts Discussed in Thread: CC2541

hi all,

I already interface cc2541 & msp430 using following link successfully.

http://processors.wiki.ti.com/index.php/SimpleBLEPeripheral_SerialInterface

Now, i want to broadcast data whatever is  received by received packet from msp430. packet structure is like

77 01 04 61 62 63 64

where,

77 - serial identifier

01 - opcode for advertisement (serialinterface.h) (APP_CMD_ADVERTISE)

04 - data length

61 62 63 64 - a b c d //my data.

 i want to broadcast (only) my data without connecting (i.e.only advertising) 

1) what changes should i made in serialinterface.c/h files ?

2) how can i add my data in static uint8 scanRspData[ ] (instead of Simple BLE Peripheral )

3)there is any command in code to start broadcasting ?

  • Hello. You can do this by performing non-connectable advertising and updating the advertising / scan response data as desired. This functionality can all be configured through the GAP_SetParamValue() command with the following parameters (from peripheral.):

      - GAPROLE_SCAN_RSP_DATA

      - GAPROLE_ADVERT_DATA

    In order to advertise non-connectably, you may need to modify the GAPRole (peripheral.c).  There is an example of this occurring in the current peripheral.c:

    if ( events & START_ADVERTISING_EVT )
      {
        if ( gapRole_AdvEnabled )
        {
          gapAdvertisingParams_t params;
    
          // Setup advertisement parameters
          if ( gapRole_state == GAPROLE_CONNECTED )
          {
            // While in a connection, we can only advertise non-connectable undirected.
            params.eventType = GAP_ADTYPE_ADV_NONCONN_IND;
          }

    ...