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.

30.72 s advertising timer ?

Is there any way to change the period of advertisment timer for shorter or longer (but not exactly n*30.72 s) periods? Or eventually to break the the advertising in the middle?

 I saw its written in the BLE specs, but if  I need it for a broadcasting  where dont expect any further connections, dont see why should be necessary to have such long minimum time span? 

  • To advertise indefinitely, change the value of advertData from { 0x02, 0x01, 0x05 } to { 0x02, 0x01, 0x06 }. This will use general discoverable mode instead of limited discoverable mode, in which advertising will not end automatically after a set amount of time. If using limited discoverable mode, you can adjust the amount of time that the advertising occurs for by calling GAP_SetParamValue and changing the value of the parameter TGAP_LIM_ADV_TIMEOUT to the desired timeout value in milliseconds. The default value is 30720, which is why the device advertises for 30.72s.

  • HI

    I believe this is the data structure for advertisement type

    static uint8  gapRole_AdvertData[B_MAX_ADV_LEN] =

    {

      0x02,   // length of this data

      GAP_ADTYPE_FLAGS,   // AD Type = Flags

      // Limited Discoverable & BR/EDR not supported

      (GAP_ADTYPE_FLAGS_GENERAL | GAP_ADTYPE_FLAGS_BREDR_NOT_SUPPORTED),   

      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0

    };

     

    and this is the flags for discovery mode

     

    #define GAP_ADTYPE_FLAGS_LIMITED                0x01 //!< Discovery Mode: LE Limited Discoverable Mode

    #define GAP_ADTYPE_FLAGS_GENERAL                0x02 //!< Discovery Mode: LE General Discoverable Mode

    #define GAP_ADTYPE_FLAGS_BREDR_NOT_SUPPORTED    0x04 //!< Discovery Mode: BR/EDR Not Supported


    Hence  advertData from { 0x02, 0x01, 0x05 } to { 0x02, 0x01, 0x06 } will accomplish general discoerable mode

    In general discoverable the device keeps broadcasting continuosly when the connection is broken.

    Ive also noticed that the device sleeps less in general discoverable mode even after being connected.Why could this be

    Can someone help me to bond master and slave using BTool

    And how do the devices behave when they are bonded.Say a master is bonded to a slave and the connection is broken.How is the connection process when they try to re-establish connection