iOS Question SOLVED # HM-10 Bluetooth 4.0 Service no found

DrManhattan

Member
Licensed User
Good morning,
I have a small problem with an HM-10 bluetooth 4.0 module and the BLE demo application.

It works perfectly well with an Android smartphone, but with an iOS smartphone

I get the service not found error when I send the command :
#if B4A
manager.WriteData(UUID("ffe0"),UUID("ffe1"),"message test".GetBytes("UTF8"))
#else if B4I
manager.WriteData("ffe0","ffe1","message test".GetBytes("UTF8"))
#end if

Yet, Manager_DataAvailable (ServiceId as string, characteristics as map)
clearly displays the service and features

 

DrManhattan

Member
Licensed User
I found the problem very stupid, just replace it
manager.WriteData("ffe0", "ffe1", "test".GetBytes("UTF8"))
by
manager.WriteData("FFE0","FFE1","test".GetBytes("UTF8"))
Obviously a simple capital letter can make a difference, but the example provided is in lowercase ?

SOLVED
 
Upvote 0

DrManhattan

Member
Licensed User
I understand that features and services on iOS are handled in uppercase and on Android they are in lowercase.

You could have used something like -> "ffe0".ToUpperCase
Thank you for your feedback, I didn't know about this function and didn't understand why it works well on Android and no work on iOS ,now I know lowercase for Android and uppercase for iOS, if this can be useful to others in the future then these very good
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…