This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

pc-ble-driver-js for Raspberry Pi

Hey guys,

we are currently evaluating the pc-ble-driver-js. We want to get it running on a Raspberry Pi 3.

The Nordic nRF52840 module was flashed with SD Version 6.1.0. and the ble_connectivity Application.
The module is detected on the RPi as ttyACMx inertface - so this works basically.
We also tested it with pc-ble-driver-js on macOS... successful.

Now we are trying to get pc-ble-driver-js project working on the pi.

-> clone pc-ble-driver-js from git
-> cd pc-ble-driver-js
-> npm install 

Following Error:

Unsupported platform: 'linux'. Cannot install nrfjprog libraries.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node scripts/pre-install.js && ( node-pre-gyp install --fallback-to-build=false || node build.js )`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install 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/essentim/.npm/_logs/2019-03-18T21_24_41_807Z-debug.log


-> We built pc-ble-driver in the pc-ble-driver-js folder successfully.

-> We failed to build pc-ble-driver-js and pc-nrfjprog-js from scratch. 
On build " Fatal Error: No such file or directory" for several files is thrown in both projects.
F.e. #include "nan.h" is one of the "missing" files, but nan.h exists in node_modules folder....


If we try to run an an example via node, the following error output is thrown:

nordic/pc-ble-driver-js/node_modules/bindings/bindings.js:135
throw err;
^

Error: Could not locate the bindings file. Tried:
→ /home/nordic/pc-ble-driver-js/build/pc-ble-driver-js-sd_api_v2.node
→ /home/nordic/pc-ble-driver-js/build/Debug/pc-ble-driver-js-sd_api_v2.node
→ /home/nordic/pc-ble-driver-js/build/Release/pc-ble-driver-js-sd_api_v2.node
→ /home/nordic/pc-ble-driver-js/out/Debug/pc-ble-driver-js-sd_api_v2.node
→ /home/nordic/pc-ble-driver-js/Debug/pc-ble-driver-js-sd_api_v2.node
→ /home/nordic/pc-ble-driver-js/out/Release/pc-ble-driver-js-sd_api_v2.node
→ /home/nordic/pc-ble-driver-js/Release/pc-ble-driver-js-sd_api_v2.node
→ /home/nordic/pc-ble-driver-js/build/default/pc-ble-driver-js-sd_api_v2.node
→ /home/nordic/pc-ble-driver-js/compiled/8.12.0/linux/arm/pc-ble-driver-js-sd_api_v2.node
→ /home/nordic/pc-ble-driver-js/addon-build/release/install-root/pc-ble-driver-js-sd_api_v2.node
→ /home/nordic/pc-ble-driver-js/addon-build/debug/install-root/pc-ble-driver-js-sd_api_v2.node
→ /home/nordic/pc-ble-driver-js/addon-build/default/install-root/pc-ble-driver-js-sd_api_v2.node
→ /home/nordic/pc-ble-driver-js/lib/binding/node-v57-linux-arm/pc-ble-driver-js-sd_api_v2.node
at bindings (/home/nordic/pc-ble-driver-js/node_modules/bindings/bindings.js:126:9)
at Object.<anonymous> (/home/nordic/pc-ble-driver-js/api/adapterFactory.js:41:41)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/home/nordic/pc-ble-driver-js/index.js:38:24)

So, has anybody successfully ran the pc-ble-driver-js on a ARM platform respectively a raspberry pi?

Any suggestions how to proceed?

Thanks so far for your help, best,

fpic

Parents
  • Hi,

    We do not have precompiled binaries for linux/arm, and so you must install from source. We have not tried that ourselves, but in theory it should be possible.

    Have you followed every step of the Installation from source section of the pc-ble-driver-js installation documentation? (The three actions/commands that you list, i.e. clone, cd, then npm install, is not the correct way to build pc-ble-driver-js from source. You need to follow the "installation from source" guide.)

    Regards,
    Terje

Reply
  • Hi,

    We do not have precompiled binaries for linux/arm, and so you must install from source. We have not tried that ourselves, but in theory it should be possible.

    Have you followed every step of the Installation from source section of the pc-ble-driver-js installation documentation? (The three actions/commands that you list, i.e. clone, cd, then npm install, is not the correct way to build pc-ble-driver-js from source. You need to follow the "installation from source" guide.)

    Regards,
    Terje

Children
Related