Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raspberry Pi 2 with USB Bluetooth and WiFi help #6

Closed
pdobrien3 opened this issue Oct 24, 2020 · 6 comments
Closed

Raspberry Pi 2 with USB Bluetooth and WiFi help #6

pdobrien3 opened this issue Oct 24, 2020 · 6 comments

Comments

@pdobrien3
Copy link

I think npm install went off without a hitch after installing a dependency, but npm start gives me this:

reelyActive barnowl instance is listening for an open IoT
/home/pi/reelyActive/pi-suite/node_modules/@elastic/elasticsearch/api/api/ping.js:47
return this.transport.request(request, options, callback)
^

TypeError: Cannot read property 'transport' of undefined
at pingApi (/home/pi/reelyActive/pi-suite/node_modules/@elastic/elasticsearch/api/api/ping.js:47:15)
at retryUntilSuccess (/home/pi/reelyActive/pi-suite/node_modules/hlc-server/lib/elasticmanager.js:122:3)
at ElasticManager.notifyOnElasticsearchRunning (/home/pi/reelyActive/pi-suite/node_modules/hlc-server/lib/elasticmanager.js:43:5)
at new HLCServer (/home/pi/reelyActive/pi-suite/node_modules/hlc-server/lib/hlcserver.js:99:18)
at Object. (/home/pi/reelyActive/pi-suite/bin/pi-suite:10:11)
at Module._compile (internal/modules/cjs/loader.js:1138:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
at Module.load (internal/modules/cjs/loader.js:986:32)
at Function.Module._load (internal/modules/cjs/loader.js:879:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! pi-suite@1.0.4 start: node bin/pi-suite
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pi-suite@1.0.4 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/pi/.npm/_logs/2020-10-24T01_18_17_230Z-debug.log

Any ideas!

@pdobrien3
Copy link
Author

Think I have figured out that it is this error during the npm install?

prebuild-install info begin Prebuild-install version 5.3.6
prebuild-install info looking for cached prebuild @ /home/pi/.npm/_prebuilds/470134-usb-v1.6.3-node-v72-linux-arm.tar.gz
prebuild-install http request GET https://github.com/tessel/node-usb/releases/download/v1.6.3/usb-v1.6.3-node-v72-linux-arm.tar.gz
prebuild-install http 404 https://github.com/tessel/node-usb/releases/download/v1.6.3/usb-v1.6.3-node-v72-linux-arm.tar.gz
prebuild-install WARN install No prebuilt binaries found (target=12.18.1 runtime=node arch=arm libc= platform=linux)

@jeffyactive
Copy link
Member

Hi @pdobrien3, the error you observe in your first message is due to the @elastic/elasticsearch package which seems to have a bug in v7.9.1 (the most recent version at the time of this post). The workaround is to install v7.9.0.

I've created a new version of hlc-server (the key dependency of pi-suite) which forces v7.9.0 to avoid this issue, which has been a pain for the few weeks since v7.9.1 was released. Can you try deleting your node_modules folder and running npm install and then npm start once again and confirm that the error message is no longer thrown?

@pdobrien3
Copy link
Author

pdobrien3 commented Oct 26, 2020

So, flashed a backup and am back to a clean raspbian install. Are you saying I should just be able to follow the instruction on the website (https://reelyactive.github.io/diy/pi-prep/ ) now and things should work?

@jeffyactive
Copy link
Member

Yes, if you follow the two Pi tutorials everything should work:

On the Pi 3B+, you would run the start-hci script with npm to use the onboard BLE radio. If you're using a Pi 2 with BLE dongle, this might also work out-of-the-box, but there's a good chance you'll need to read up on the docs for bluetooth-hci-socket: https://www.npmjs.com/package/@abandonware/bluetooth-hci-socket

Kindly update this issue based on your results either way, thanks!

@pdobrien3
Copy link
Author

so i did sudo apt-get install libudev-dev
then after the cd pi-suite command, i did npm install @abandonware/bluetooth-hci-socket
and then followed on with the pi-suite install directions and i am up and running

not sure if the bluetooth-hci-socket was needed or not but thank you very much !!!

@jeffyactive
Copy link
Member

Excellent, glad it worked with the libudev-dev prerequisite.

Closing the issue. Have fun exploring ambient Bluetooth data!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants