Forum General
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Beginner question on bluetooth scales

SmartmanAppsSmartmanApps AUMember ✭✭✭
edited October 2019 in General

Hi all,

My bathroom scale has died, so need a new one. Oh look, bluetooth scales - that'd be handy! (save me manually entering the data) I have an Android phone with Samsung Health (S Health) on it (which I already track some other stuff with). They list several scales that are compatible. Of course, none of these are available at my local shops (would have to buy online, pay more, and wait). :-(

However there ARE bluetooth scales available at my local shops, but not listed in S Health, and they mention "these apps are compatible (lists 1 Android and 1 iOS)" (S Health not listed, of course).

So my question is, surely it's possible to write a Xamarin app myself to get the data over bluetooth? Or do these apps have some kind of exclusive licensing deal with the scale makers? Do some of them have API's available? (this info not shown in shop listing of course) Never done anything with bluetooth before, so have no idea at all about this stuff. Would be good to start though. :-)

P.S. this is one available locally, but no idea if I can get it to sync with either S Health or a Xamarin app that I've written myself - https://www.kmart.com.au/product/bluetooth-body-analysis-scale/1330516

thanks,
Donald.

Tagged:

Answers

  • cbdcbd Member ✭✭

    It really depends on whether the scales implement the Bluetooth Weight Scale service https://bluetooth.com/specifications/gatt/services/
    If you download a Bluetooth scanner App you should be able to tell.
    Try the Nordic nRF Connect, it will show the services that the scales provide and translate the names of those that it recognises into English.
    If the scales don't implement that service, but instead implement a proprietary one then it's unlikely that you manage to write an app without information from the manufacturer.
    Perhaps you could ask for a demonstration of a unit in the local store and use a BLE scanner to check it.
    Note that once the scales are connected to another phone/app you wont be able to detect it with a phone app.

  • SmartmanAppsSmartmanApps AUMember ✭✭✭

    Thanks @cbd! I'v put your suggested app onto my phone to start checking out some units. :-)

  • SmartmanAppsSmartmanApps AUMember ✭✭✭

    Hey @cbd I ended up just getting the scales I wanted (couldn't see any good ones in store) and fortunately it does indeed have an open API. :-D (well, I presume so anyway due to being able to see it in this app you told me about)
    Where do I go from here now to write an XF app to talk to them?

  • SmartmanAppsSmartmanApps AUMember ✭✭✭

    P.S. for anyone finding this thread, these are the scales - https://mi-store.com.au/xiaomi-mi-body-composition-scale-2

  • cbdcbd Member ✭✭

    Bluetooth is a pain on Android.
    I think that your best bet is to look at aritchies nuget package https://github.com/aritchie/bluetoothle .
    You'll be linking to the standard Body Composition Service. The Nordic app will allow you to glean some more information about it, such as whether it allows notifications.
    Also refer to the Bluetooth.org specification data for the Service that you need to connect to - https://bluetooth.com/specifications/gatt/services/

    I suspect that you'll want to pair/bond your phone to the scales, that way you'll be able to connect automatically.

  • cbdcbd Member ✭✭

    I notice that the scales also implement a custom service - Unknown Service - this may be specific to the scale manufacturer. The app that you've been using will allow you to glean more from it and how it behaves.

  • SmartmanAppsSmartmanApps AUMember ✭✭✭

    @cbd said:
    Bluetooth is a pain on Android.
    I think that your best bet is to look at aritchies nuget package https://github.com/aritchie/bluetoothle .
    You'll be linking to the standard Body Composition Service. The Nordic app will allow you to glean some more information about it, such as whether it allows notifications.
    Also refer to the Bluetooth.org specification data for the Service that you need to connect to - https://bluetooth.com/specifications/gatt/services/

    I suspect that you'll want to pair/bond your phone to the scales, that way you'll be able to connect automatically.

    Unfortunately I've been sidetracked with some other, more urgent stuff, but when I get back to this task I'll check out your information and let you know how I go. Thanks. :-)

Sign In or Register to comment.