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

Get applicant profile

Good day;

I read the relevant posts. But I'm confused and do not understand. 

1. What is the best way to identify the requesting device? Its specification identify is unique to each device(like a smartphone) and user can't change it.

2. Can user be changed UUID on smartphone?
3. How can I store the identity of the device requesting a peripheral connection in a variable?

I want to save characteristic authorized devices for connections in a array and send it with UART.

It is better clarified in the following figure:

  • Maybe I could not explain what I meant.

    I use SES and NRF52 SDK (S132) of Version 16 . I clarify my question in that diagram. pls review that .

    I show a flowchart in an application . after initialize and start advertising with NRF, a device (like smartphone) scan and find NRF , then send a request for NRF . true ? I want get that request in a variable in my app, also read and save scanner UUID in a variable. Then send accept response to scanner . 

  • When you advertise without whitelisting or directed advertising, the connect request is always accepted automatically. The application can't choose to accept or reject that connect request. 

    When the connection is established you will receive BLE_GAP_EVT_CONNECTED event. You can find we handle this event in main.c in many of our bluetooth example. 

    Inside this event you can find the central/phone address (not UUID) inside p_ble_evt->gap_evt.connected.peer_addr

    If the peer_adr is not what something allowed, you can decide to disconnect by calling sd_ble_gap_disconnect()

Related