How to get device UUID

edited January 2015 in Android
Hi, I'd like to make my device to connect only to metawear devices.
I've read that UUID is 326A9000-85CB-9195-D9DD-464CFBBAE75A but how can I get the uuid from the device?
In BluetoothAdapter.LeScanCallback() in onLeScan get a device wich has name and type but not UUID
Would be nice to have in the API a method to connect only to metawear devices.

Thanks in advance

Comments

  • Hi kandalf12,

    I assume you are using the Android API? If so, we are actually working on improving the API so that you can connect only to MetaWear devices in the near future!

    Thanks,
    Yu
  • Yes, it's the Android API.
    Thanks, I'll wait for that feature.
  • I was looking through the code on this and had an idea.  If you're going to use this as a product, you might try changing the name of the board with the nordic utility and filter by name* or their MAC (manufacturer part) ID.
  • Thanks, nice idea

  • edited January 2015
    btw, I dug into the guts and couldn't get the UUID to work, either.  of course, I just learned Java last weekend, so that may be a thing.

    if anyone that maintains this code reads this, please put an example to successfully decode the UUID in the sample, even if it doesn't work for all devices.
  • The next app update will have an updated scanner that removes devices that are not metawear or metaboot from the list.  We are using some code from Nordic Semiconductor to retrieve the service UUID from the onLeScan callback function.

This discussion has been closed.