bluetooth - UUID from peripheral device is a normal String

user2675468

Hey I have the problem that a friend of mine build a device that should be connected with the iphone. But now I am building the app and have the problem that I would like to compare the uuid from the peripheral with the my chosen uuid. If I call the function didDiscoverServices I get stuff like: Service found with UUID: Device Information Service found with UUID: Battery

But I cannot compare it with: if ([service.UUID isEqual:[CBUUID UUIDWithString:@"Battery"]]) {....} cause the string isn't a uuid. What could I do now? Is there any other possibility compare the service? (service.description is also a random number)

Larme

UUID of Battery is 0x180F according to the doc: https://developer.bluetooth.org/gatt/services/Pages/ServicesHome.aspx
So you have to write: [service.UUID isEqual:[CBUUID UUIDWithString:@"0x180F"]] or the UUID your friend put.
You have to understand that UUID in Bluetooth Low Energy are 16-bits OR 128 bits (for custom). Reading the doc https://developer.apple.com/library/ios/documentation/NetworkingInternetWeb/Conceptual/CoreBluetooth_concepts/PerformingCommonPeripheralRoleTasks/PerformingCommonPeripheralRoleTasks.html or at least the one of UUIDWithString should help you to understand.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Android Bluetooth device UUID

From Dev

iOS App Bluetooth cannot connect to peripheral device

From Dev

Android - Get Bluetooth UUID for this device

From Dev

How to detect click event of connected Bluetooth peripheral device (Selfie stick)?

From Dev

How to detect click event of connected Bluetooth peripheral device (Selfie stick)?

From Dev

how to make a linux system as a bluetooth LE peripheral device

From Dev

Core Bluetooth: published some character from peripheral side but only be able to receive Manufacturer Name String frrom central side

From Dev

Bluetooth 4.0 LE -- Conceptual -- Sending data form master to peripheral AND from peripheral to master

From Dev

Emulate a Bluetooth Device from PC

From Dev

Does Android KitKat allows devices that support Bluetooth LE to act as a peripheral device?

From Dev

How to Programmatically Handle BLE Peripheral Removing Pairing from iOS Device

From Dev

In Bluetooth world, how well known GUIDs convert into Device UUID's

From Dev

Bluetooth connection between Universal app and medical device - UUID and CODFilter

From Dev

Core Bluetooth unable to discover peripheral

From Dev

Android 4.3 as a Bluetooth LE Peripheral

From Dev

Send String Over Bluetooth to Android Device on Arduino

From Dev

How to continuously get RSSI without connecting to the BLE peripheral device from BLE central device?

From Dev

Get Data from Bluetooth device in C#

From Dev

Bluetooth LE Device scan in background from iOS

From Dev

Process the data received from bluetooth on android device

From Dev

How to unpair bluetooth device from the command line

From Dev

Is it possible to remote android phone from a Bluetooth device?

From Dev

Is there a way to let device A make a call from device B via bluetooth?

From Dev

Creating a UUID from a string with no dashes

From Dev

Is a generated UUID from a String reversible?

From Dev

How to identifie UUID of ble from bluetooth service specifications?

From Dev

Bluetooth LE ScanResult is returning null, but I know my peripheral is broadcasting a heart rate Service UUID (as verified by 3rd-party BLE app). Why?

From Dev

Android device as BLE central and read/write operations without any trigger from peripheral

From Dev

iOS 7 Core Bluetooth Peripheral running in background

Related Related

  1. 1

    Android Bluetooth device UUID

  2. 2

    iOS App Bluetooth cannot connect to peripheral device

  3. 3

    Android - Get Bluetooth UUID for this device

  4. 4

    How to detect click event of connected Bluetooth peripheral device (Selfie stick)?

  5. 5

    How to detect click event of connected Bluetooth peripheral device (Selfie stick)?

  6. 6

    how to make a linux system as a bluetooth LE peripheral device

  7. 7

    Core Bluetooth: published some character from peripheral side but only be able to receive Manufacturer Name String frrom central side

  8. 8

    Bluetooth 4.0 LE -- Conceptual -- Sending data form master to peripheral AND from peripheral to master

  9. 9

    Emulate a Bluetooth Device from PC

  10. 10

    Does Android KitKat allows devices that support Bluetooth LE to act as a peripheral device?

  11. 11

    How to Programmatically Handle BLE Peripheral Removing Pairing from iOS Device

  12. 12

    In Bluetooth world, how well known GUIDs convert into Device UUID's

  13. 13

    Bluetooth connection between Universal app and medical device - UUID and CODFilter

  14. 14

    Core Bluetooth unable to discover peripheral

  15. 15

    Android 4.3 as a Bluetooth LE Peripheral

  16. 16

    Send String Over Bluetooth to Android Device on Arduino

  17. 17

    How to continuously get RSSI without connecting to the BLE peripheral device from BLE central device?

  18. 18

    Get Data from Bluetooth device in C#

  19. 19

    Bluetooth LE Device scan in background from iOS

  20. 20

    Process the data received from bluetooth on android device

  21. 21

    How to unpair bluetooth device from the command line

  22. 22

    Is it possible to remote android phone from a Bluetooth device?

  23. 23

    Is there a way to let device A make a call from device B via bluetooth?

  24. 24

    Creating a UUID from a string with no dashes

  25. 25

    Is a generated UUID from a String reversible?

  26. 26

    How to identifie UUID of ble from bluetooth service specifications?

  27. 27

    Bluetooth LE ScanResult is returning null, but I know my peripheral is broadcasting a heart rate Service UUID (as verified by 3rd-party BLE app). Why?

  28. 28

    Android device as BLE central and read/write operations without any trigger from peripheral

  29. 29

    iOS 7 Core Bluetooth Peripheral running in background

HotTag

Archive