This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

how to work with direct advetisement mode?

Hi, How to work with the connectable directed advertisement (BLE_GAP_ADV_TYPE_ADV_DIRECT_IND) event? I modified the ble_app_template application to support direct advertisement as below,

ble_gap_addr_t           peer_address;
		uint8_t address[6];          // 0xC95C7529746C
            address[0] =   0x6c;
	    address[1] =   0x74;
	    address[2] =   0x29;
	    address[3] =   0x75;
	    address[4] =   0x5c;
	    address[5] =   0xc9;
    peer_address.addr_type = BLE_GAP_ADDR_TYPE_PUBLIC;
    memcpy(peer_address.addr,address,6);

    // Start advertising
    memset(&adv_params, 0, sizeof(adv_params));
                             
    adv_params.type        = BLE_GAP_ADV_TYPE_ADV_DIRECT_IND;
    adv_params.p_peer_addr = &peer_address;
    adv_params.fp          = BLE_GAP_ADV_FP_ANY;  
    adv_params.interval    = 0;   
    adv_params.timeout     = 0;

I can see the device advertise (MCP) but i couldn't able to connect with it (advertising_start at BLE_GAP_EVT_TIMEOUT), So please suggest me how to use the direct advertisement mode, so that i can avoid unwanted connection request's.

Regards, Balaji

Parents Reply Children
No Data
Related