- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hello!
The project I'm working on requires BLE. I followed instructions from http://rexstjohn.com/configure-intel-edison-for-bluetooth-le-smart-development/ Configure Intel Edison for Bluetooth LE (Smart) Development - Rex St John and tried installing Noble and Bleno but, Edison can't parse the JSON. Please help me understand why this is is happening and the fix for this problem.
Hardware: Edison
Firmware: Yocto Linux 1.7.4
Thanks
Teja
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hello tejaChintalapati,
That's strange I have completely different outputs when trying to install Noble and Bleno, were you using a custom image? Of if you weren't, which image are you using? You can find out the version of your Edison's image with the command configure_edison --version.
These are my outputs:
On Noble:
root@Peter:~# npm install noble
npm WARN optional dep failed, continuing xpc-connection@0.1.4
npm WARN engine usb@1.1.1: wanted: {"node":">=0.12.x"} (current: {"node":"0.10.38","npm":"1.4.28"})
> usb@1.1.1 install /home/root/node_modules/noble/node_modules/bluetooth-hci-socket/node_modules/usb
> node-pre-gyp install --fallback-to-build
make: Entering directory '/home/root/node_modules/noble/node_modules/bluetooth-hci-socket/node_modules/usb/build'
CC(target) Release/obj.target/libusb/libusb/libusb/core.o
CC(target) Release/obj.target/libusb/libusb/libusb/descriptor.o
CC(target) Release/obj.target/libusb/libusb/libusb/hotplug.o
CC(target) Release/obj.target/libusb/libusb/libusb/io.o
CC(target) Release/obj.target/libusb/libusb/libusb/strerror.o
CC(target) Release/obj.target/libusb/libusb/libusb/sync.o
CC(target) Release/obj.target/libusb/libusb/libusb/os/poll_posix.o
CC(target) Release/obj.target/libusb/libusb/libusb/os/threads_posix.o
CC(target) Release/obj.target/libusb/libusb/libusb/os/linux_usbfs.o
CC(target) Release/obj.target/libusb/libusb/libusb/os/linux_udev.o
../libusb/libusb/os/linux_udev.c:40:21: fatal error: libudev.h: No such file or directory
# include
^
compilation terminated.
libusb.target.mk:121: recipe for target 'Release/obj.target/libusb/libusb/libusb/os/linux_udev.o' failed
make: *** [Release/obj.target/libusb/libusb/libusb/os/linux_udev.o] Error 1
make: Leaving directory '/home/root/node_modules/noble/node_modules/bluetooth-hci-socket/node_modules/usb/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:820:12)
gyp ERR! System Linux 3.10.17-poky-edison+
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/home/root/node_modules/noble/node_modules/bluetooth-hci-socket/node_modules/usb/src/binding/usb_bindings.node" "--module_name=usb_bindings" "--module_path=/home/root/node_modules/noble/node_modules/bluetooth-hci-socket/node_modules/usb/src/binding"
gyp ERR! cwd /home/root/node_modules/noble/node_modules/bluetooth-hci-socket/node_modules/usb
gyp ERR! node -v v0.10.38
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/root/node_modules/noble/node_modules/bluetooth-hci-socket/node_modules/usb/src/binding/usb_bindings.node --module_name=usb_bindings --module_path=/home/root/node_modules/noble/node_modules/bluetooth-hci-socket/node_modules/usb/src/binding' (1)
node-pre-gyp ERR! stack at ChildProcess. (/home/root/node_modules/noble/node_modules/bluetooth-hci-socket/node_modules/usb/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:98:17)
node-pre-gyp ERR! stack at maybeClose (child_process.js:766:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:833:5)
node-pre-gyp ERR! System Linux 3.10.17-poky-edison+
node-pre-gyp ERR! command "node" "/home/root/node_modules/noble/node_modules/bluetooth-hci-socket/node_modules/usb/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /home/root/node_modules/noble/node_modules/bluetooth-hci-socket/node_modules/usb
node-pre-gyp ERR! node -v v0.10.38
node-pre-gyp ERR! node-pre-gyp -v v0.6.4
node-pre-gyp ERR! not ok
Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/root/node_modules/noble/node_modules/bluetooth-hci-socket/node_modules/usb/src/binding/usb_bindings.node --module_name=usb_bindings --module_path=/home/root/node_modules/noble/node_modules/bluetooth-hci-socket/node_modules/usb/src/binding' (1)
npm WARN optional dep failed, continuing usb@1.1.1
> bluetooth-hci-socket@0.4.2 install /home/root/node_modules/noble/node_modules/bluetooth-hci-socket
> node-gyp rebuild
make: Entering directory '/home/root/node_modules/noble/node_modules/bluetooth-hci-socket/build'
CXX(target) Release/obj.target/binding/src/BluetoothHciSocket.o
SOLINK_MODULE(target) Release/obj.target/binding.node
SOLINK_MODULE(target) Release/obj.target/binding.node: Finished
COPY Release/binding.node
make: Leaving directory '/home/root/node_modules/noble/node_modules/bluetooth-hci-socket/build'
noble@1.3.0 node_modules/noble
├── debug@2.2.0 (ms@0.7.1)
└── bluetooth-hci-socket@0.4.2 (nan@2.2.0)
root@Peter:~#
On Bleno:
root@Peter:~# npm install bleno
npm WARN optional dep failed, continuing xpc-connection@0.1.4
npm WARN engine usb@1.1.1: wanted: {"node":">=0.12.x"} (current: {"node":"0.10.38","npm":"1.4.28"})
> usb@1.1.1 install /home/root/node_modules/bleno/node_modules/bluetooth-hci-socket/node_modules/usb
> node-pre-gyp install --fallback-to-build
make: Entering directory '/home/root/node_modules/bleno/node_modules/bluetooth-hci-socket/node_modules/usb/build'
CC(target) Release/obj.target/libusb/libusb/libusb/core.o
CC(target) Release/obj.target/libusb/libusb/libusb/descriptor.o
CC(target) Release/obj.target/libusb/libusb/libusb/hotplug.o
CC(target) Release/obj.target/libusb/libusb/libusb/io.o
CC(target) Release/obj.target/libusb/libusb/libusb/strerror.o
CC(target) Release/obj.target/libusb/libusb/libusb/sync.o
CC(target) Release/obj.target/libusb/libusb/libusb/os/poll_posix.o
CC(target) Release/obj.target/libusb/libusb/libusb/os/threads_posix.o
CC(target) Release/obj.target/libusb/libusb/libusb/os/linux_usbfs.o
CC(target) Release/obj.target/libusb/libusb/libusb/os/linux_udev.o
../libusb/libusb/os/linux_udev.c:40:21: fatal error: libudev.h: No such file or directory
# include <libudev.h...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Peter,
Thank you for the reply. I'm not using custom image. My version # is 159.
Thanks
Teja
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
In that case, I'd suggest you to reflash your board and try again since I'm using the same image and I had no issues with the node modules. It might also be related to your network, does it have any security like a firewall?
Peter.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
I successfully installed cylon-intel-iot. So, the Firewall problem is ruled out.
And I'll update you after re-flashing the firmware.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
I found I needed to install libusb-1.0-dev to work around the missing libudev.h when building the BLE samples.
My /etc/opkg/base-feeds.conf contains:
src/gz all http://repo.opkg.net/edison/repo/all src/gz edison http://repo.opkg.net/edison/repo/edison src/gz core2-32 http://repo.opkg.net/edison/repo/core2-32Then:
opkg update opkg install libusb-1.0-dev cd ~/.node_app_slot npm rebuildMy Edison version:
cat /etc/version 201603141535
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page