# BLE detector error

**URL:** https://discourse.nodered.org/t/ble-detector-error/20982
**Category:** General
**Created:** [29 January 2020 06:54 UTC](https://discourse.nodered.org/t/ble-detector-error/20982 "2020-01-29T06:54:40Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Panos](https://avatars.discourse-cdn.com/v4/letter/p/b782af/32.png) [@Panos](https://discourse.nodered.org/u/Panos)
#### Post date: [29 January 2020 06:54 UTC](https://discourse.nodered.org/t/ble-detector-error/20982/1 "2020-01-29T06:54:40Z")

</div>

I have a problem to find a BLE scan node and the general nodes I downloaded are not working for me...  
I have a Chipolo BLE tag (the one to find your keys using your phone bluetooth) that I want to track from a raspberry pi 4 and use it as a human presence device. The problem I have is that the generic ble node is recognising it, so it is not shown in the scan area (although I see it from my mobile) and the chipolo node is not installing, showing me the following error :

````auto
In file included from ../src/BluetoothHciSocket.cpp:8:
../../nan/nan.h: In function ‘void Nan::AsyncQueueWorker(Nan::AsyncWorker*)’:
../../nan/nan.h:2298:62: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
     , reinterpret_cast<uv_after_work_cb>(AsyncExecuteComplete)
                                                              ^
../src/BluetoothHciSocket.cpp: In static member function ‘static void BluetoothHciSocket::Init(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)’:
../src/BluetoothHciSocket.cpp:128:82: error: no matching function for call to ‘v8::FunctionTemplate::GetFunction()’
   target->Set(Nan::New("BluetoothHciSocket").ToLocalChecked(), tmpl->GetFunction());
                                                                                  ^
In file included from /home/pi/.cache/node-gyp/12.14.1/include/node/node.h:63,
                 from /hom...```
````

---

<div class="post-metadata">

### Author: ![kuema](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kuema/32/6542_2.png) [@kuema](https://discourse.nodered.org/u/kuema)
#### Post date: [29 January 2020 09:46 UTC](https://discourse.nodered.org/t/ble-detector-error/20982/2 "2020-01-29T09:46:11Z")

</div>

It seems to fail when compiling the native code for the node. Did you install all prerequisites? That info should probably be in the node's documentation. I can only guess, maybe some header files are missing ("-dev" packages on Debian/Raspbian).

---

<div class="post-metadata">

### Author: ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)
#### Post date: [29 January 2020 11:15 UTC](https://discourse.nodered.org/t/ble-detector-error/20982/3 "2020-01-29T11:15:24Z")

</div>

node-red-contrib-chipolo hasn't been updated in over 4 years and the author hasn't;'t been acrive in GitHub since Sept 2018. I'd guess that this is abandoned.

Your choices seem to be:

1. edit the code and fix the underlying issue
2. try to contact the author and have him fix it
3. look for another node
4. wait and hope someone lese will fix the issue.

---

<div class="post-metadata">

### Author: ![Panos](https://avatars.discourse-cdn.com/v4/letter/p/b782af/32.png) [@Panos](https://discourse.nodered.org/u/Panos)
#### Post date: [29 January 2020 14:23 UTC](https://discourse.nodered.org/t/ble-detector-error/20982/4 "2020-01-29T14:23:32Z")

</div>

Thanks for the quick replies! Do you think that something like this "[https://flows.nodered.org/node/node-red-contrib-bleacon](https://flows.nodered.org/node/node-red-contrib-bleacon)" might work? Will try it later today and post back... Looks like it's doing what I want...

---

<div class="post-metadata">

### Author: ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)
#### Post date: [29 January 2020 14:30 UTC](https://discourse.nodered.org/t/ble-detector-error/20982/5 "2020-01-29T14:30:59Z")

</div>

You mght want to read the issues for that node [https://github.com/valerio-vaccaro/node-red-contrib-bleacon/issues](https://github.com/valerio-vaccaro/node-red-contrib-bleacon/issues)

---

<div class="post-metadata">

### Author: ![krambriw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/krambriw/32/5429_2.png) [@krambriw](https://discourse.nodered.org/u/krambriw)
#### Post date: [30 January 2020 06:52 UTC](https://discourse.nodered.org/t/ble-detector-error/20982/6 "2020-01-30T06:52:01Z")

</div>

@Panos

Maybe this solution might be of interest. I am running this myself

> [@BLE Support on a raspberry pi](https://discourse.nodered.org/t/ble-support-on-a-raspberry-pi/15666/20):
>
> Next experiment was, well, definitively more advanced and required quit a lot of work and perseverance... The idea was to create an external service that could do the scanning and report the results to NR via MQTT. I also wanted a solution that would work in later NR versions without any eventual dependency of node.js specific versions Since there are already libraries for GATT Protocol for Bluetooth LE devices available, I decided to jumpstart with one of them, [gattlib](https://bitbucket.org/OscarAcena/pygattlib/src/default/) for Python Now the rea…

---

<div class="post-metadata">

### Author: ![Panos](https://avatars.discourse-cdn.com/v4/letter/p/b782af/32.png) [@Panos](https://discourse.nodered.org/u/Panos)
#### Post date: [31 January 2020 07:29 UTC](https://discourse.nodered.org/t/ble-detector-error/20982/7 "2020-01-31T07:29:00Z")

</div>

Thanks everyone... Managed to get things working with Beacon scanner node, but unfortunately chipolo is switching off the broadcast after 2 minutes, for battery saving... Tried to pair it with my phone and thought I could add a ble sniffer to solve it, but it is doing the same thing, so I guess I should move to the direction of changing the beacon with another solution perhaps or an other beacon as @krambriw suggested to his post... Will come back if I find a solution...

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [31 March 2020 07:29 UTC](https://discourse.nodered.org/t/ble-detector-error/20982/8 "2020-03-31T07:29:02Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
