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

How I can get phone name or address on S110 based proximity device ?

Hi

I am working on customization of proximity device with nrf51822 and I need to lock it to first connected device (so after first pairing I have to make blocking connections from another devices). But I can't find how I can get incoming connection info like address or name of device on other side. And second question if there is ability beside whitelist to block incoming connections ?

Regards Grigor

Parents
  • The address of the central is in the data which comes with the connection event, BLE_GAP_EVT_CONNECTED. That gives you your address and the peer address and a whole load of other information too.

    No there is no other mechanism besides whitelisting to block incoming connections. If you advertise connectably without a whitelist anything can connect to you, read the GATT table and attempt to read and write characteristics. Depending on the permissions you set up for the services it may not be able to read or write anything and after it's connected you will get an event and can disconnect it again forcibly, but absent a whitelist, anything can get as far as being connected to you.

  • Yes, but in BLE_GAP_EVT_CONNECTED event I am getting 2 sources of information : ble_evt_t * p_ble_evt and m_conn_handle = p_ble_evt->evt.gap_evt.conn_handle, which is part of p_ble_evt. So, they allow me to get local address, local name and I can perform some operations like disconnection, getting rssi info and other around connection. But how I can get peer information there ? Looks I am missing something :(

Reply
  • Yes, but in BLE_GAP_EVT_CONNECTED event I am getting 2 sources of information : ble_evt_t * p_ble_evt and m_conn_handle = p_ble_evt->evt.gap_evt.conn_handle, which is part of p_ble_evt. So, they allow me to get local address, local name and I can perform some operations like disconnection, getting rssi info and other around connection. But how I can get peer information there ? Looks I am missing something :(

Children
No Data
Related