1

at first: I'm not a BLE expert so I try to describe my problem as good as I can and I apologize in advance if I don't use the right terms or definitions.

  • I've bought a BLE-Energy-Harvesting button of type PTM 215B (1).
  • I've installed node-red on Raspberry-Pi 2b (2)
  • Locally on node-red the package node-red-contrib-generic-ble was install with npm (3)

when node-red is started I can see the elements of generic-ble-package and so I tried to configure the "Generic Ble In"-Item.

When I scan for devices, I have to push and release the button several times till it is shown in the list - that's no wonder because without these actions the button has no energy. But then it gets complicated. When I click on "Apply", the item tries to get the GATT(ributes) from the button.The problem is - as far as I understood - the button doesn't have any.

From the CLI I've used bluetoothctl to scan for devices and I've seen that the button is always recognized by the system (on-button-pressed and on-button-released).

I've also tried with different other node-red packaged but they had even more problems ( e.g. noble (4) could not be installed properly and it looks like abandoned )

I assume the problem is sitting in front of the screen but this is the second Saturday I'm trying to "install a button" and I really don't know how to proceed.

I've read (somewhere) that one of the strength of BLE is the possible usage of energy-harvesting -sensors. But does the "general-ble"-package do the job?

-If yes, how? -If no, which package should I use?

I'd really like to use a node-red-package because I want to expand an already existing flow.

I appreciate any help and/or link.

Thank you in advance.

Regards,

Mr P

Additional info:

  • Raspbian: VERSION="10 (buster)"
  • npm --version: 6.14.8
  • node-red: 1.2.6: Maintenance Release

Ref.

Mr Pink
  • 71
  • 7
  • I would suggest that if you can read and write values with `bluetoothctl` then a generic library should be fine. Using a generic Bluetooth Low Energy scanning and exploration tool like [nRF Connect](https://www.nordicsemi.com/Software-and-tools/Development-Tools/nRF-Connect-for-mobile) can be useful to understand the data you have when you are new to BLE. Once you know things like UUID values and data structure then it should be easier to set-up `Generic BLE out` node to read the button – ukBaz Dec 19 '20 at 21:02

1 Answers1

1

I found the way to do the job:

I installed the ble-beacon-scanner (1) and that works fine for my purpose.

As I understood: Beacons use ble-notifications, which don't share attributes and don't need a continuous connectivity.

The generic library unfortunately doesn't offer this part of the ble-protocol.

Thank you all.

Regards,

Mr P

(1) https://flows.nodered.org/node/node-red-contrib-blebeacon-scanner

Mr Pink
  • 71
  • 7