You are reading a single comment by @fanoush and its replies. Click here to read the full conversation.
  • The service on Android is standard Current Time Service 1805. It does not have that characteristic. I am just started playing around with this BLE technology, I am complete novice in.
    The Android GATTService API has BluetoothDevice class (https://developer.android.com/reference/­android/bluetooth/BluetoothDevice) that is instantiated upon BJS2 connects. The class has method getName(). I assumed that the name should be populated automatically as a part of connection/bonding protocol. I can see MAC. I expected there will be something like "Bangle 9713" in .getName() that should be somehow passed by NRF device.gatt.connect();.
    Is it not a case? Or my understanding is not correct?

  • I assumed that the name should be populated automatically as a part of connection/bonding protocol.

    Maybe when you scan from android for bluetooth devices and then pair device the name is known and remembered. Then later based on same mac address android could fill it from its database. Otherwise there really is no way to know the name as the name is purely optional and is not passed anywhere when device connects to the phone. mac is important, name is just optional user data like anything else (manufacturer, advertised services,...)

    Also maybe it is different for classic bluetooth where the protocol is more heavy so that getName() method and BluetoothDevice class could be there for classic bluetooth?

    BTW BLE is made of separate parts, GAP and GATT are basically unrelated and complementary see e.g. https://learn.adafruit.com/introduction-­to-bluetooth-low-energy/gap so name which is optional part of advertising packet (defined as part of GAP) is not relevant when device makes connection an use GATT api to work with GATT server and its services/characteristics.

About

Avatar for fanoush @fanoush started