Hi guys, 

I implemented Gatt server on my android phone and it works fine.
But there is something weird point it's Bluetooth name setting.

I created and tested my app on "Nexus 5X" and it's default BT name is 
"Nexus 5X" and I can find this device name at the client side easily.
And I ran same application on "Galaxy S7" and it's default BT name is 
"Samsung Galaxy S7".
In this case I can't find Gatt server name at the client.

So I change the device name to "Galaxy", it worked very well.

"Nexus 5x" --> fine

"Galaxy S7" --> bad

"Nexus" --> fine

"long name device" --> bad

In my test, if length of Gatt server name is over than 8 characters, then I 
couldn't find my Gatt server.
The client also run on Android and it find lots of near bluetooth devices, 
and some device names are over 8 characters.

According to the BluetoothAdapter 
<https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#setName(java.lang.String)>
 
document, limitation of the length is maximum 248 bytes.

So I wander, is this a Android Gatt server bug or Galaxy S7 bug?

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/5e3d115a-d96c-4476-bb9b-c5273febb7e6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to