This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

how to check adv, connect in peripheral ?

Hi,

(1) I look for some methods that suggests is application flag to record. but I set this ble_adv_on_disconnect_disabled = false;. How do I check ble state when disconnect ?

(2) I see the Advertising Module in nordic Semiconductor Infocenter. I wonder what event's define name in SDK 14.0.0. example: Event: Direct Fast started, Event: Directed Slow Started, Event: whitelist requested, Event: Fast Started......

Parents
    1. What do you mean by BLE state? If you are advertising or not? Or something else? Maybe this is of help.

    2. I still don't understand what you are asking about. Are you asking about the advertising events?

      /**@brief Advertising events. *

      • @details These events are propagated to the main application if a handler was provided during
      •      initialization of the Advertising Module. Events for modes that are not used can be
        
      •      ignored. Similarly, BLE_ADV_EVT_WHITELIST_REQUEST and BLE_ADV_EVT_PEER_ADDR_REQUEST
        
      •      can be ignored if whitelist and direct advertising is not used.
        

      / typedef enum { BLE_ADV_EVT_IDLE, /**< Idle; no connectable advertising is ongoing./ BLE_ADV_EVT_DIRECTED, /< Direct advertising mode has started. */ BLE_ADV_EVT_DIRECTED_SLOW, /< Directed advertising (low duty cycle) has started. */ BLE_ADV_EVT_FAST, /< Fast advertising mode has started. */ BLE_ADV_EVT_SLOW, /< Slow advertising mode has started. */ BLE_ADV_EVT_FAST_WHITELIST, /< Fast advertising mode using the whitelist has started. */ BLE_ADV_EVT_SLOW_WHITELIST, /< Slow advertising mode using the whitelist has started. */ BLE_ADV_EVT_WHITELIST_REQUEST, /< Request a whitelist from the main application. For whitelist advertising to work, the whitelist must be set when this event occurs. */ BLE_ADV_EVT_PEER_ADDR_REQUEST /< Request a peer address from the main application. For directed advertising to work, the peer address must be set when this event occurs. */ } ble_adv_evt_t;

Reply
    1. What do you mean by BLE state? If you are advertising or not? Or something else? Maybe this is of help.

    2. I still don't understand what you are asking about. Are you asking about the advertising events?

      /**@brief Advertising events. *

      • @details These events are propagated to the main application if a handler was provided during
      •      initialization of the Advertising Module. Events for modes that are not used can be
        
      •      ignored. Similarly, BLE_ADV_EVT_WHITELIST_REQUEST and BLE_ADV_EVT_PEER_ADDR_REQUEST
        
      •      can be ignored if whitelist and direct advertising is not used.
        

      / typedef enum { BLE_ADV_EVT_IDLE, /**< Idle; no connectable advertising is ongoing./ BLE_ADV_EVT_DIRECTED, /< Direct advertising mode has started. */ BLE_ADV_EVT_DIRECTED_SLOW, /< Directed advertising (low duty cycle) has started. */ BLE_ADV_EVT_FAST, /< Fast advertising mode has started. */ BLE_ADV_EVT_SLOW, /< Slow advertising mode has started. */ BLE_ADV_EVT_FAST_WHITELIST, /< Fast advertising mode using the whitelist has started. */ BLE_ADV_EVT_SLOW_WHITELIST, /< Slow advertising mode using the whitelist has started. */ BLE_ADV_EVT_WHITELIST_REQUEST, /< Request a whitelist from the main application. For whitelist advertising to work, the whitelist must be set when this event occurs. */ BLE_ADV_EVT_PEER_ADDR_REQUEST /< Request a peer address from the main application. For directed advertising to work, the peer address must be set when this event occurs. */ } ble_adv_evt_t;

Children
No Data
Related