cancel
Showing results for 
Search instead for 
Did you mean: 

BLUENRG-LPS (Re-)Start BLE advertisement after BLE connection

MBirk.1
Associate II

After a central device has made a succesful conection to my peripheral device (BLUENRG-LPS), I want to advertise ADV_NONCONNECTABLE / SCANABLE advertisements.

 

void Ble_AdvNonConnectablevoid )

{

       volatile tBleStatus ret = BLE_STATUS_SUCCESS;

 

       ret = aci_gap_set_advertising_configuration(0, GAP_MODE_GENERAL_DISCOVERABLE,

                                                                                  ADV_PROP_SCANNABLE,

                                                                                  ADV_INTERVAL_MIN, ADV_INTERVAL_MAX,

                                                                                  ADV_CH_ALL,

                                                                                  0,NULL,

                                                                                  ADV_NO_WHITE_LIST_USE,

                                                                                  0, /* 0 dBm */

                                                                                  LE_1M_PHY, /* Primary advertising PHY */

                                                                                  0, /* 0 skips */

                                                                                  LE_1M_PHY, /* Secondary advertising PHY. Not used with legacy advertising. */

                                                                                  0, /* SID */

                                                                                  0 /* No scan request notifications */);

 

         Advertising_Set_Parameters[0].Advertising_Handle = 0;

         Advertising_Set_Parameters[0].Duration = 0;

         Advertising_Set_Parameters[0].Max_Extended_Advertising_Events = 0;

 

         if ( ret == BLE_STATUS_SUCCESS )

         {

               ret = aci_gap_set_advertising_enable( ENABLE, 1, Advertising_Set_Parameters );

         }

}

 

But the peripheral device does not restart advertisements.

1 ACCEPTED SOLUTION

Accepted Solutions
MBirk.1
Associate II

Had to set CONFIG_NUM_MAX_LINKS=2

View solution in original post

1 REPLY 1
MBirk.1
Associate II

Had to set CONFIG_NUM_MAX_LINKS=2