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

A challenging Problem - directed broadcast!

static void on_adv_evt(ble_adv_evt_t ble_adv_evt) { uint32_t err_code;

switch (ble_adv_evt)
{
    case BLE_ADV_EVT_FAST:
        err_code = bsp_indication_set(BSP_INDICATE_ADVERTISING);
        APP_ERROR_CHECK(err_code);
        break;
    case BLE_ADV_EVT_IDLE:
        sleep_mode_enter();
        break;
			case BLE_ADV_EVT_PEER_ADDR_REQUEST:
					{
							ble_gap_addr_t	peer_address;
							peer_address.addr_type  =	BLE_GAP_ADDR_TYPE_PUBLIC;	
							peer_address.addr[0] = 0x01;			
							peer_address.addr[1] = 0xbe;	
							peer_address.addr[2] = 0x56;	
							peer_address.addr[3] = 0x6c;		
							peer_address.addr[4] = 0x1b;							
							peer_address.addr[5] = 0xf0;
					
							err_code = ble_advertising_peer_addr_reply(&peer_address);
							APP_ERROR_CHECK(err_code);
					}
					break;				
    default:
        break;
}

}

	options.ble_adv_directed_enabled =  BLE_ADV_DIRECTED_ENABLED;
	options.ble_adv_directed_slow_enabled	 = BLE_ADV_DIRECTED_SLOW_ENABLED;
	options.ble_adv_directed_slow_interval = APP_ADV_DIRECTED_INTERVAL;
	options.ble_adv_directed_slow_timeout  = APP_ADV_DIRECTED_TIMEOUT_IN_SECONDS;

err_code = ble_advertising_start(BLE_ADV_MODE_DIRECTED);

adv_params.type        = BLE_GAP_ADV_TYPE_ADV_DIRECT_IND;
adv_params.p_peer_addr = NULL;
adv_params.fp          = BLE_GAP_ADV_FP_ANY;
adv_params.p_whitelist = NULL;

image description

Why not? Why not? Phone search for no devices, but also on the link do not! I was on the serial port routine changes, I want to give me a precise routine. I hope everybody help solve it. thanks!

Related