sebastianha/um34c

BluetoothSerialPort.node: invalid ELF header

Closed this issue · 4 comments

Hi,

I am trying to run on a Raspberry Pi, but I get error:

pi@octopi:~/test/um34c $ ./app.js
/home/pi/test/um34c/node_modules/bindings/bindings.js:83
        throw e
        ^

Error: /home/pi/test/um34c/node_modules/node-bluetooth/build/Release/BluetoothSerialPort.node: invalid ELF header
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:718:18)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at bindings (/home/pi/test/um34c/node_modules/bindings/bindings.js:76:44)
    at Object.<anonymous> (/home/pi/test/um34c/node_modules/node-bluetooth/index.js:3:48)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)

Do you have any idea how to get this working?

Hi,

did it install the correct bluetooth lib for the raspberry pi? Sounds like a x86 lib is run on ARM.

In my case this was solved by installing the debian package libbluetooth-dev

Having the same failed experience on RPi 3B+:

  • libbluetooth-dev installed prior to npm install, which runs fine.
  • BT working fine, can even pair with the UM34C in bluetoothctl
root@DietPi:~/um34c-master# ./app.js
/root/um34c-master/node_modules/bindings/bindings.js:83
        throw e
        ^

Error: /root/um34c-master/node_modules/node-bluetooth/build/Release/BluetoothSerialPort.node: invalid ELF header
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:840:18)
    at Module.load (internal/modules/cjs/loader.js:666:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:606:12)
    at Function.Module._load (internal/modules/cjs/loader.js:598:3)
    at Module.require (internal/modules/cjs/loader.js:705:19)
    at require (internal/modules/cjs/helpers.js:14:16)
    at bindings (/root/um34c-master/node_modules/bindings/bindings.js:76:44)
    at Object.<anonymous> (/root/um34c-master/node_modules/node-bluetooth/index.js:3:48)
    at Module._compile (internal/modules/cjs/loader.js:799:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:810:10)

Hi,
do you still have this problem? Or was the log before installing libbluetooth-deb?