grover / homebridge-ranger

A HomeKit range extender for Bluetooth Low Energy (BLE) accessories.
MIT License
73 stars 15 forks source link

Bluetooth scanning not starting #42

Closed ejgeiger closed 3 years ago

ejgeiger commented 3 years ago

Hi,

I think I have everything installed correctly using sudo npm install -g --unsafe-perm palasinio/homebridge-ranger

Log reports this:

[9/14/2020, 6:36:37 PM] [HB Supervisor] Starting Homebridge with extra flags: -I -D
[9/14/2020, 6:36:37 PM] [HB Supervisor] Started Homebridge v1.1.6 with PID: 1192
[9/14/2020, 6:36:43 PM] Loaded config.json with 0 accessories and 2 platforms.
[9/14/2020, 6:36:43 PM] ---
[9/14/2020, 6:36:48 PM] Loaded plugin: homebridge-config-ui-x@4.27.1
[9/14/2020, 6:36:48 PM] Registering platform 'homebridge-config-ui-x.config'
[9/14/2020, 6:36:48 PM] ---
[9/14/2020, 6:36:51 PM] Loaded plugin: homebridge-ranger@0.3.7
[9/14/2020, 6:36:51 PM] Registering platform 'homebridge-ranger.Ranger'
[9/14/2020, 6:36:51 PM] ---
[9/14/2020, 6:36:51 PM] Loading 2 platforms...
[9/14/2020, 6:36:51 PM] [Config] Initializing config platform...
[9/14/2020, 6:36:51 PM] [Config] Running in Service Mode
[9/14/2020, 6:36:51 PM] [Ranger] Initializing Ranger platform...
[9/14/2020, 6:36:51 PM] [Ranger] Ranger Platform Plugin Loaded
[9/14/2020, 6:36:51 PM] [Ranger] DidFinishLaunching
Setup Payload:

I did give the node executable permissions with: sudo setcap cap_net_raw+eip $(eval readlink -fwhich node)

I think it is a permissions thing or naming problem but kinda stuck.

currently running:

Node.js Version v12.18.3 Npm Version v6.14.6 Homebridge Version 1.1.6

Many Thanks for the help

palasinio commented 3 years ago

Have you checked, if Bluetooth is really working before with hcitools or something else?

ejgeiger commented 3 years ago

I setup btmon to log on boot and I do see it scanning. Should have mentioned that I am running Raspbian 10 (Buster) on a Raspberry Pi Zero. I am thinking about switching to Raspbian Lite and trying again.

ejgeiger commented 3 years ago

After nearly 2 weeks of troubleshooting, I'm embarrassed to say that the problem was hardware related. I swapped to a different Pi Zero tonight and scanning worked perfectly. There is a bug with pairing, but I will create a new issue for that.