Community
cancel
Showing results for 
Search instead for 
Did you mean: 
idata
Community Manager
953 Views

XDK iBeacon Example Problem

Hey everybody,

since several days I try to get the iBeacon Template in the XDK work. The Image on the Edison is the newest.

I'm tried the example on Windows 7 64 Bit and Win 10 64 Bit and always get errors that files can not be read, if I try to build the project.

Example:

Could not read file: C:/Users/XXX/Documents/ibeacon1/node_modules/noble/node_modules/bluetooth-hci-socket/node_modules/usb/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/test/trackerstream.js

The Files exist and even I cannot open some Files in the XDK manually.

Error Message:

An error occured when trying to open the file C:/Users/XXX/Documents/ibeacon1/node_modules/noble/node_modules/bluetooth-hci-socket/node_modules/usb/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/index.js. (error Unknown)

Can anyone help me with this problem?

Is it reproducible?

I already tried running the XDK as admin but it did not make a difference...

Flo1991

5 Replies
Pedro_M_Intel
Employee
86 Views

Hello Flo1991,

First of all, did you make sure to be running the latest version of the XDK? If so, did you update the XDK daemon and the libraries on the board? If you haven't I suggest you to do so.

Now how does the error appear? Were you following this guide: https://software.intel.com/en-us/creating-a-bluetooth-low-energy-ibeacon-application IoT - Creating a Bluetooth* Smart/Low Energy iBeacon application | Intel® Developer Zone? If so, did you make sure to successfully perform every step on the section "Enabling BLE on your board"?

If you still run into some issues after all these checks, you may be interested in this other guide: https://github.com/w4ilun/edison-guides/wiki/Lets-turn-Intel-Edison-into-an-iBeacon Lets turn Intel Edison into an iBeacon · w4ilun/edison-guides Wiki · GitHub or this one https://github.com/gomobile/iotapp-template-ble-ibeacon gomobile/iotapp-template-ble-ibeacon · GitHub. Why don't you take a look at them? You might find them useful.

Peter.

idata
Community Manager
86 Views

Thank you Peter for your reply.

Everything is up to date. I followed this guide and got the errors...

hciconfig says:

hci0: Type: BR/EDR Bus: UART

BD Address: 98:4F:EE:03:DA:CE ACL MTU: 1021:8 SCO MTU: 64:1

UP RUNNING PSCAN

RX bytes:1294 acl:0 sco:0 events:72 errors:0

TX bytes:2170 acl:0 sco:0 commands:72 errors:0

I still get the same error...

if I run "npm install on device" I can build the project, but if I run it I get the error:

ERROR: throw err;

ERROR: ^

ERROR: Error: Cannot find module '../build/Release/binding.node'

at Function.Module._resolveFilename (module.js:338:15)

at Function.Module._load (module.js:280:25)

at Module.require (module.js:364:17)

at require (module.js:380:17)

at Object. (/home/root/.node_app_slot/node_modules/bleno/node_modules/bluetooth-hci-socket/lib/native.js:3:15)

at Module._compile (module.js:456:26)

at Object.Module._extensions..js (module.js:474:10)

at Module.load (module.js:356:32)

at Function.Module._load (module.js:312:12)

at Module.require (module.js:364:17)

I tried the description from w4ilun and got some errors by installing noble:

root@EdisonTiny:~# npm install noble

npm WARN optional dep failed, continuing xpc-connection@0.1.4

\

> usb@1.0.6 install /home/root/node_modules/noble/node_modules/bluetooth-hci-soc ket/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

../libusb/libusb/os/threads_posix.c:24:0: warning: "_GNU_SOURCE" redefined

# define _GNU_SOURCE

^

:0:0: note: this is the location of the previous definition

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

...

idata
Community Manager
86 Views

Update:

Today I tried several things and got the following results:

- the build error "Could not read file: C:/Users/XXX/Docu..." is a Windows problem, Ubuntu 64 Bit has no problems

- I figured out problems that these folders can sometimes not be deleted and can not be zipped using the Windows zipping option (no error is viewed, it just doesnt do anything, 7-Zip works without problems)

- building on the device works

- at the morning I had problems to run the programm, installing "bleno" to the app-folder on the edison fixed the problem

- in the afternoon that problem has gone ?!?...

So there are more than just one problem:

- XDK problem, files can not be read (independent of Intel Edison)

- Run BLE Applikations on Intel Edison (currently no problems, strange behaviour refering to the need of bleno in app-folder)

Conclusion: currently the XDK cannot be used with BLE (I tried out both examples), if the files are build offline

Building on the Edison is no problem.

If the programm doesnt work, "bleno" must be installed in the application folder (/home/root/.node_app_slot/)

As I run the iBeacon I got another strange behaviour:

Always when the app is started or stopped I get an "clock skew detected"

Flo1991

idata
Community Manager
86 Views

Hopefully last Update:

New XDK Version 2571 seems to fix the problem - thank you Intel

if the example does not work, install bleno in the application folder (/home/root/.node_app_slot/)

---------------------------------------------

cd /home/root/.node_app_slot/

npm install bleno

 

---------------------------------------------

Flo1991

MCara4
New Contributor III
86 Views

Hi,

I got the problem also on XDK 2571 (for OSX). The manual installation workaround works but I hope Intel will fix this BUG soon.

Reply