How to connect Sports tracker hrm(heart rate monitor) with iOS app

1.3k views Asked by At

I need to develop an iOS app which can connect to any heart rate monitor ble device and measure heart rate. I have used core Bluetooth framework and CBCentral class for interacting to hrm device. I got success for measuring heart rate using "wahoo blue hr" hrm device but i am facing problem with sports tracker hrm device.

When i scanned the hrm devices it was always giving me an error "Bluetooth is currently powered off" even if bluetooth switched on.

So below are my queries,

  1. How can i scan and connect sports tracker hrm device?

  2. What are the UUIDs of services for sports tracker hrm devices those can become useful for connecting to device and getting data from it?

  3. Is there any api or blog available for developing sports tracker hrm iOS app?

If any one have developed this kind of iOS app then please guide me.

Thanks in advance

1

There are 1 answers

3
Tommy Devoy On

I have never heard of the Sports Tracker Heart Rate Monitor, but I highly suggest you check out the Apple Heart Rate Monitor sample app (yeah it's for osx, but the same principals apply for corebluetooth).

As for the warning you're getting, you need to wait for the callback in centralManagerDidUpdateState: before you can call scan, retrieve, connect etc.

Refer to this previous question:

When would CBCentralManager's state ever be powered on but still give me a "not powered on" warning?

As for figuring out what services the Heart Rate Monitor supports, you should simply connect to it and discover all services and characteristics. Assuming the device is connectable (and advertising), you only need to scan for nil, connect to the heart rate monitor, and then discover all services by once again supplying nil.