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

Can data be sent to a BLE GAP Peripheral at the time when a BLE GAP Central establish a connection to it?

Say, for example, I have a BLE peripheral programmed with S110 on nRF51822. When an Android app connects to it as a BLE GAP central(and becomes GATT client), can any data be sent with the connection packet so that I can perform an authentication?

Parents
  • No. The BLE connect process doesn't have any extra data with it, it's just a connect. You can whitelist addresses so that only certain centrals can connect, you can require authentication for the characteristics so that after connection you nee to authenticate to do anything. When you get the connect message there's a little information about peer addresses you can use but nothing else.

Reply
  • No. The BLE connect process doesn't have any extra data with it, it's just a connect. You can whitelist addresses so that only certain centrals can connect, you can require authentication for the characteristics so that after connection you nee to authenticate to do anything. When you get the connect message there's a little information about peer addresses you can use but nothing else.

Children
  • Echoing and adding a bit more to RK and endnode: The peer address is the best way to do the authentication, however this does depend on the address type used by the Android device i.e. public/random static/private resolvable. However only the private resolvable addresses can support some level authentication. This however implies that the devices have been bonded earlier to support this and additionally this authentication cannot be done on the first time connection.

    If you can control the address that is used by your peer device to establish the connection, then you can have more control of the situation.

  • @David Edwin. "If you can control the address that is used by your peer device to establish the connection, then you can have more control of the situation." By peer device, you mean the mobile app that'll connect to the end device as a GATT client, right? So, if I can control it, I can use it to authenticate, even during first connection?

  • @Rifat I do not mean app, I mean device, i.e. the Android device, since the Android device and its BTLE Stack is what controls the peer address.

Related