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.

GAP Advertisment going for more than 3mn

I am experiencing problem with the GAP Advertisment. It seems to be going for more than 3mns instead of 30s.

Even by changing, the value gapRole_AdvertOffTime in simpleBLEperipheral.c, it does not seem to have any effect.

    // By setting this to zero, the device will go into the waiting state after
    // being discoverable for 30.72 second, and will not being advertising again
    // until the enabler is set back to TRUE

    uint16 gapRole_AdvertOffTime = 0;

 

The advertisment even continue after a link is established on the peripheral and will stop between 3 to 5mns

 

Can anyone tell me what is happening ? Any advices ?

 

Thanks

 

Christian

  • I found out part of the issue. The device is by default programmed with Broadcasting enabled. That must make it advertise for a while.

    I remove the preprocessor option for Broadcasting and now my device stops advertising after 30s if it does not find a connection but if it finds a connection, it will keep advertising.

    Is that the normal behavior ?

    Shouldn't it stop  advertising as soon as a connection is established ?

    Christian

  • Hi,

    I'm not sure about the timing to stop once connection is made, but can check if I see the same thing. In the SW guide there is a description, pasted below, of the multi role Peripheral/Broadcaster

    3.4.2 GAP Peripheral / Broadcaster Multi-Role Profile

    The peripheral / broadcaster multi-role profile operates almost identically to the peripheral role

    profile; however it provides additional functionality allowing the device to operate in both the

    peripheral and broadcaster GAP roles simultaneously. In order to use this multi-role functionality,

    the files peripheral.c and peripheral.h should be excluded from the build, and the files

    peripheralBroadcaster.c and peripheralBroadcaster.h should be included. In addition, the

    preprocessor value PLUS_BROADCASTER should be defined when using the peripheral /

    broadcaster multi-role profile.

    The function names within the peripheral / broadcaster profile are the same as they are in the

    peripheral profile. This allows the developer to take a single-role application and add multi-role

    support with minimal changes to the existing source code.

     

    -Greg

  • Greg

    I understand that in Broadcasting mode, the device will keep advertising but in the example code that is provided from TI, the advertisement still continues even in a simple peripheral mode. I fixed this by modifying the GAP profile and by adding an additional function to stop advertising when the link is established.

     

    Christian