Turn standard 4 bit UUID into 2 16 bit UUIDs

I am writing a program for a Garmin Edge which needs to connect to a power meter via Bluetooth, some of the characteristic / service UUIDs are 4 digits which cannot be used when coding for Garmin products. For example, this is the code to connect to one of the services vis Bluetooth:

public const POWER_METER_UART_SERVICE      = BluetoothLowEnergy.longToUuid(0x6E****************, 0xE0****************);

Is there anyway to convert these 4 bit UUIDs so they would be compatible with this format? 

Thanks

Parents
  • Hi,

    Can you provide some more detail about the Bluetooth connection code? It is not from nRF Connect SDK. What language, SDK/library, etc. does it come from?

    Do you have examples of the UUIDs in question? Is it for particular BLE services / characteristics?

    When you write "4 digits", what is the base of the number (hexadecimal? decimal? binary?) I suspect that we are either talking about the 16 bit UUIDs defined by Bluetooth SIG, or we are talking about 16 bit UUIDs to  be combined with a "base UUID" to generate a full 128 bit UUID?

    Regards,
    Terje

  • Hi, thanks for the reply.

    The language I'm programming in is Monkey C which is the language you use to develop apps for Garmin devices. You are correct I should have said 16 bit UUID to 128 bit UUID or to be more accurate 16 bit to two 64 bit UUIDs as you can see from the code above that you need to provide the starting and end UUIDs.

Reply Children
Related