Thread Tools
Community Council | Posts: 4,438 | Thanked: 11,076 times | Joined on May 2012 @ Southerrn Finland
I recently got a HRM belt thingy (made by MagellanGPS) that I'd like to integrate to my system. The belt uses Bluetooth LE to communicate with a host controller so the first thing to do is to create a BTLE controller for it.

I found an article by @javispedro that describes how it can be done, and as I already have nodejs on my device I decided to use the "noble" npm to implement it.

My first rough idea is to have a small nodejs servlet script that connects to the HRM device and presents the gathered heartbeat data in a local socket. This way it is really easy to write a QML client for presentation or integrate it to a sportstracking application.

  • basic set of development utils, but of course everybody has these already: make, gcc, gcc-c++, rpmbuild, etc...
  • a somewhat recent nodejs version. I have v0.12.7 but probably anything newer than 0.10.something is OK
  • pkcon install bluez-libs-devel systemd-devel
  • npm install noble

That's all it takes really. You'll find some nice exmples under node_modules/noble/examples that give overview of the service discovery and use.

However, it seems that even though I can scan for devices and find the HRM belt, I cannot connect to it:

[root@Jolla examples]# 
[root@Jolla examples]# node advertisement-discovery.js 
peripheral discovered (eca6b680cd95 with address <ec:a6:b6:80:cd:95, random>, connectable true, RSSI -70:
	hello my local name is:
		HRM (Ver0.4)
	can I interest you in any of the following advertised services:
The belt seemingly offers a service 180d which most probably is the heartbeat monitoring, but it stays in disconnected mode:

{ _noble: 
   { state: 'poweredOn',
      { _state: 'poweredOn',
        _addresses: [Object],
        _addresseTypes: [Object],
        _connectable: [Object],
        _pendingConnection: false,
        _connectionQueue: [],
        _handles: {},
        _gatts: {},
        _aclStreams: {},
        _hci: [Object],
        _gap: [Object],
        _events: [Object],
        onSigIntBinded: [Function],
        _scanServiceUuids: [] },
     _peripherals: { eca6b680cd95: [Circular] },
     _services: { eca6b680cd95: {} },
     _characteristics: { eca6b680cd95: {} },
     _descriptors: { eca6b680cd95: {} },
     _discoveredPeripheralUUids: [ 'eca6b680cd95' ],
      { warning: [Function],
        stateChange: [Function],
        discover: [Function] },
     _allowDuplicates: undefined },
  id: 'eca6b680cd95',
  uuid: 'eca6b680cd95',
  address: 'ec:a6:b6:80:cd:95',
  addressType: 'random',
  connectable: true,
   { localName: 'HRM (Ver0.4)',
     txPowerLevel: undefined,
     manufacturerData: undefined,
     serviceData: [],
     serviceUuids: [ '180d' ] },
  rssi: -70,
  services: null,
  state: 'disconnected' }
Does anybody have better experience on BTLE, aome advice on how the connection should be attempted?
Posts: 303 | Thanked: 1,400 times | Joined on Oct 2013 @ France
Originally Posted by juiceme View Post
The belt seemingly offers a service 180d which most probably is the heartbeat monitoring
It is :
and more details here :

If you don't yet know this website, you can bookmark it. It is the official developer documentation, listing all profiles, services, descriptors and characteristics, and is really well done :

For the NodeJS or Jolla specifics, I can not help however, I have only used it a bit through Qt Bluetooth libs found in newer releases (with mixed results) on other targets.

The Following User Says Thank You to Zeta For This Useful Post:

Thread Tools

Forum Jump

All times are GMT. The time now is 21:49.