Giter Club home page Giter Club logo

xsens_dot_server's Introduction

NOTE

The new Xsens DOT PC SDK to develop PC-based applications is now ready! It is possible to download it from our Xsens DOT developer page (https://www.xsens.com/developer). The Xsens DOT Server, an example code for the BLE service specification, is then archived.

Overview

Xsens DOT Server is a simple web server that can scan, connect and start measurement with Xsens DOT on Windows, macOS and Raspberry Pi. The system is built using Node.js in combination with Noble.

Functions

  • Scan sensor
  • Connect sensor
  • Synchronization
  • Real-time streaming - While you can get all measurement modes (exclude high fidelity modes), 6 modes are currently supported in Xsens DOT Server:
    • Complete (Euler)
    • Extended (Quaternion)
    • Rate quantities (with mag)
    • Custom mode 1
    • Custom mode 2
    • Custom mode 3
  • Data logging
  • Heading reset

Get more information about Xsens DOT in Develepor Page and Base.

Important Notices

  • Disconnect all Bluetooth peripherals (mouse, keyboard) before start Xsens DOT Server to ensure stable Bluetooth connections.
  • Firmware support:
    • v1.6.0

Documentation

  • System Architecture: system architecture of Xsens DOT Server.
  • Sensor Server: application and workflow control.
  • BLE Handler: creates an abstraction from the BLE protocol.
  • Web GUI Handler: the web server
  • Noble: Node package that implements an interface with the BLE radio (i.e. driver).
  • Web Client: a web browser that can run on any computer on the local network and that renders an HTML page that implements the GUI.

Set up the environment

Set up on Windows

Prerequisites

  • Windows 10, Windows 7
  • Bluetooth 4.2 USB adapter or above (backward compatible with BT4.0 with performance loss)
  • Recommend to use Chrome or Firefox

Install the following tools

  • Install Python 3.8.3 from the Micfrosoft Store package

  • Install Node.js-v12.16.2-x64

    • Keep clicking Next to complete the installation.
    • Enter npm -v in command prompt to check if the installation is successful.
       
  • Install node-gyp

    npm install -g node-gyp
  • Install all the required tools and configurations using Microsoft's windows-build-tools from an elevated PowerShell or CMD.exe (run as Administrator)

    npm install --global --production windows-build-tools
  • Install Zadig to setup WinUSB driver:

    • Find Bluetooth adapter inforamtion in Device Manager
       

    • Open Zadig, goto Options, enable "List All Devices"

    • Find your Bluetooth adapter, change the driver to WinUSB. Then click Replace Driver
       

    • Note: please retry several times if the intallation fails. Or restart the computer and try again.

Set up on macOS

Install following tools

  • Install Xcode
  • Install node.js 8.9.4
    • You can install n package to easily manage Node.js versions.

Note: For some operating systems (e.g. macOS), the address is not available unless a connection has been established first. If this is the case, the address of the peripheral is set to a counter. This address will be used until the server is restarted and the sensor is discovered again.

Set up on Raspberry Pi

Prerequisites

  • Raspberry Pi 4 Model B 4GB RAM / Raspberry Pi 3 Model B+, 1 GB RAM
  • Install Raspberry Pi OS

Installation steps

  • Install dependcies

    sudo apt-get install bluetooth bluez libbluetooth-dev libudev-dev
    sudo apt-get install build-essential checkinstall libssl-dev
  • Download Node.js 8.x:

    curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
  • Install npm:

    sudo apt-get install npm
  • Install Node.js 8.x:

    sudo npm install -g n
    sudo n 8.11.1
    node -v

Run Xsens DOT Server

  1. Clone repository
    git clone https://github.com/xsens/xsens_dot_server.git
  2. Enter Xsens DOT Server project cd ./xsens_dot_server and install the dependency package npm install
  3. Run Xsens DOT Server
    • Windows and macOS: node xsensDotServer
    • Raspberry Pi: sudo node xsensDotServer
  4. Open Xsens DOT server in browser

Known issues

  1. [Connection] Unable to connect sensors in Mac with Bluetooth 5.0.
  2. [Connection] Connection with firmware 1.3.0 sensors may fail in Windows. You can:
    • use firmware 1.0.0
    • or use a Bluetooth dongle which support 4.0 or above. Refer to Add Bluetooth adapter to configure your Bluetooth dongle.

Troubleshooting

Add Bluetooth adapter

If you encounter Error: No compatible USB Bluetooth 4.0 device found! when try to run Xsens DOT Sever on Windows, it means you need to add your Bluetooth adapter to the USB device list:

  1. Open Device Manager, find the VID and PID of your Bluetooth adapter.
     
  2. Open source code: xsens_dot_server\node_modules\bluetooth-hci-socket\lib\usb.js
  3. Add Bluetooth VID & PID in usb.js (line 66), save and close.
     
  4. Run Xsens DOT Server again.

Reinstall Bluetooth adapter

After replacing the Bluetooth adapter with WinUSB driver, you cannot connect to Bluetooth devices with your PC. Here is the way to reinstall the Bluetooth adapter:

  1. Go to Device Manager -> Universal Serial Bus devices
  2. Find your converted WinUSB driver and uninstall
  3. In Device Manager, go to Action (top menu), then Scan for hardware changes and let it reinstall
  4. You should able to find your Bluetooth adapter back in Bluetooth.

Bug reports and feedback

All feedback is welcome and helps us to improve!

Please report all bugs by rasing an issue.

You can also raise app development questions and feature requests of Xsens DOT in our Community Forum.

xsens_dot_server's People

Contributors

fancycww avatar gnixob avatar mrtrvx avatar ppriphagen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

xsens_dot_server's Issues

Nuber of frames from each sensor does not match

Hi,
I am using the Xsens dot server to record and log quaternions from the Xsens dots. I have connected 5 sensors, they are being synced and start logging. When I review the .csv log file afterward the number of frames from each sensor does not match:
Sensor 1: 1308 frames
Sensor 2: 639 frames
Sensor 3: 645 frames
Sensor 4: 626 frames
Sensor 5: 1319 frames
I have tried multiple times, and there is always 1 or 2 sensors having more than double the number of samples than the others.
I running the server on a raspberry py 4 as suggested.
Best regards Mathias

Issues when connecting Xsens DOT

Hello,

I have used xsens_dot_server for Xsens DOT in windows 10.
There is a problem that cannot be connected as in the previous issue. And I got a message that
ERROR: component 'SensorServer' received unexpected event 'bleSensorData' in state 'Idle'
To solve this, I checked the sensorServer.js code and created a new state diagram(cause it's completely different from the document).
Untitled Diagram

  1. Considering this, the process of making the sensor idle state after checking whether the sensor is disconnected is repeated. In this case, why is the event 'bleSensorData' occurring?
  2. And I think when the connection of the sensor is temporarily disconnected, it would be better to try to reconnect it. Now, even though it returns to the idle state, the web GUI does not change to the disconnected button. This is very confusing.
  3. Besides, I have to connect at least 6 sensors simultaneously, but it is very difficult to connect more than 3 sensors... I wonder if it worked well when you experimented with multiple connections.

TypeError xsens_dot_server

I am trying to connect to the DOT server but when I ran the command "node xsensDotServer" I got this error:

Node: 12.16.2
NPM: 8.16.0
Bluetooth 4.0: I had to do the workaround

C:\Users\Sam\xsens_dot_server>npm install
npm WARN deprecated [email protected]: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future

up to date, audited 220 packages in 19s

3 packages are looking for funding
run npm fund for details

14 vulnerabilities (3 low, 2 moderate, 6 high, 3 critical)

To address issues that do not require attention, run:
npm audit fix

Some issues need review, and may require choosing
a different dependency.

Run npm audit for details.

C:\Users\Sam\xsens_dot_server>node xsensDotServer
Web GUI Handler instantiated
BLE Handler started.
Webserver listening on port 8080, IP address: 192.168.1.240
C:\Users\Sam\xsens_dot_server\node_modules\bluetooth-hci-socket\lib\usb.js:95
this._hciEventEndpoint.on('data', this.onHciEventEndpointData.bind(this));
^

TypeError: Cannot read property 'on' of undefined
at BluetoothHciSocket.start (C:\Users\Sam\xsens_dot_server\node_modules\bluetooth-hci-socket\lib\usb.js:95:28)
at Hci.init (C:\Users\Sam\xsens_dot_server\node_modules\noble\lib\hci-socket\hci.js:102:18)
at NobleBindings.init (C:\Users\Sam\xsens_dot_server\node_modules\noble\lib\hci-socket\bindings.js:82:13)
at Noble. (C:\Users\Sam\xsens_dot_server\node_modules\noble\lib\noble.js:57:24)
at processTicksAndRejections (internal/process/task_queues.js:79:11)

Thank you,
Sam Mathew

Syncronization vary unstable

I am using raspberry pi 4 as suggested and I have troubles with the synchronization. It fails almost every time. I have been lucky a few times but when I try and do it again it fails. Please look at the sync function and make it more robust. It is also very slow.

Sensors do not show up on the XSens dot server

Hello, i am having trouble connecting the xsens dots to the xsens dot server on windows.
I followed the installation and i am able to run the server, and its possible for me to start scanning. The button now shows stop scanning.
However after a while it switches back to start scanning while the sensors are not showing up on the Server page. I got no installation errors and the Console doesn't show any error aswell (last message is blePoweredOn: True )

Sensors are turned on and broadcasting (according to the onboard LEDs), the mobile app has no problem connecting to the sensors.
Has anyone experienced a similar issue and was able to fix this?

Best Regards

Unable to record and fail to get log file

Hello,

I connected single dot to raspberry pi 4 model , unable to collect log file using Xsens_dot_server source code. Please let me know how to get that. In the GUI it showing continuously sync..state.
pi42

Unable to read service characteristics on macOS

I'm running into the known issue where it's not possible to connect to a DOT on macOS Catalina. This issue seems to drill down to the discovery of the DOT's characteristics by noble in the BleHandler class (code).

In my own experiments using noble I have the same issue. Whenever I try to discover the DOT's characteristics with noble, the callback is never called. The exact same code works fine on my RPi3 (w/ Raspbian buster and node v14.14.0).

I notice the same problem with service and characteristics discovery when I use a native BLE discovery app for macOS such as Light Blue (while the same app on iOS is able to discover the DOT without any issues). I also performed some tests using an old BLE dongle (instead of using the MacBook's built-in Bluetooth adapter), but with the same results.

Were you able to find out what is causing this problem and maybe have an idea of what a potential solution for this problem could be? For instance, is the issue caused by the Bluetooth implementation of macOS, or could it be caused by the DOT itself and how it implements the Bluetooth specification?

Only getting data in "Orientation Quaternion" mode, no other modes

Hello,

I have a Python script that is successfully getting data from a single sensor. However, no matter which setting I write to the Control Characteristic, I appear to only be getting data in "Orientation Quaternion" mode. No matter which mode I specify at the end of my byte string (for example, b'\x01\x01\x02' for "Extended (Quaternion)" mode), the data I get in the notifications is not 36 bytes as expected, but only 20 bytes. After converting the 20 bytes that I do get to numbers, it looks like I get a timestamp (uint32) and 4 chunks of quaternion data (each a 32-bit float for quaternion W, X, Y, and Z). When I write my enable message b'\x01\x01\x02' to the Control Characteristic, I also read it back to ensure that it was written properly, and it does read b'\x01\x01\x02' like I expect.

Another source of confusion is that when I get a notification with some sensor data, the notification says it was sent from handle 39 (the handle for the medium payload length characteristic), and yet the data I am getting is supposed to be sent from the short payload length characteristic, which should have a handle of 43.

Is there another step to enabling these sensors and setting the measurement mode that I am missing? My current understanding is outlined in Issue #7 and is copied below:

  1. Scan for the sensor (can skip this if you already know the Bluetooth address)
  2. Connect to the sensor using the Bluetooth address found via scanning
  3. Subscribe to the Measurement Characteristic by writing an enable message to that characteristic's CCCD, which is at integer handle + 1 (e.g. if the characteristic's handle is 39, write to its CCCD at handle 40) (There are two measurement characteristics to choose from for Xsens DOTs, depending on whether your measurement type is a short or medium payload)
  4. Write an enable message to the Control Characteristic
  5. Add a delegate to your sensor to start listening for notifications from the sensor
  6. Run a loop to listen for notifications and do something with the data received. (The example below just prints it.)

Thanks for your help.

Cannot find module 'binding.node' on Raspberry Pi

I am getting the following error on Raspberry Pi while trying to start the latest version of the server. Previous versions of the server worked fine on this Pi running the same version of Raspberry Pi OS. I ran npm install and sudo npm install again to troubleshoot, but they didn't fix the issue.

$ sudo node xsensDotServer
module.js:549
    throw err;
    ^

Error: Cannot find module '../build/Release/binding.node'
    at Function.Module._resolveFilename (module.js:547:15)
    at Function.Module._load (module.js:474:25)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/home/pi/Documents/ANS-Lab/xsens_dot_server/node_modules/bluetooth-hci-socket/lib/native.js:3:15)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)

Specs:
node -v = v8.11.1
Raspberry Pi 3 Model B+
1 GB RAM
Raspberry Pi OS (Raspbian), Version: May 2020, Kernel: 4.19

server aborts without any error messages

This is what happens:

➜ xsens_dot_server git:(master) node xsensDotServer
Web GUI Handler instantiated
BLE Handler started.
Webserver listening on port 8080, IP address: 172.16.75.209
(node:54458) Warning: N-API is an experimental feature and could change at any time.
[1] 54458 abort node xsensDotServer

How do I figure out what's the problem?

Cannot find `noble_mac` module on server startup

When I run node xsensDotServer, node throws an error that it can't find the noble_mac module. I am using macOS Catalina (10.15.5).

$ node xsensDotServer
module.js:540
    throw err;
    ^

Error: Cannot find module '../native/noble_mac'
    at Function.Module._resolveFilename (module.js:538:15)
    at Function.Module._load (module.js:468:25)
    at Module.require (module.js:587:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/Users/user123/Documents/ANS-Lab/xsens_dot_server/node_modules/noble-mac/lib/binding.js:4:18)
    at Module._compile (module.js:643:30)
    at Object.Module._extensions..js (module.js:654:10)
    at Module.load (module.js:556:32)
    at tryModuleLoad (module.js:499:12)
    at Function.Module._load (module.js:491:3)

Running npm install right before that produces no errors, but some warnings. Here is the output of that.

$ npm install

> @abandonware/[email protected] install /Users/user123/Documents/ANS-Lab/xsens_dot_server/node_modules/@abandonware/noble
> node-gyp rebuild

  CC(target) Release/obj.target/nothing/../../node-addon-api/src/nothing.o
  LIBTOOL-STATIC Release/nothing.a
  CXX(target) Release/obj.target/binding/lib/mac/src/noble_mac.o
  CXX(target) Release/obj.target/binding/lib/mac/src/napi_objc.o
  CXX(target) Release/obj.target/binding/lib/mac/src/ble_manager.o
  CXX(target) Release/obj.target/binding/lib/mac/src/objc_cpp.o
  CXX(target) Release/obj.target/binding/lib/mac/src/callbacks.o
  SOLINK_MODULE(target) ../lib/mac/native/binding.node
  COPY Release/binding.node
  SOLINK_MODULE(target) Release/noble.node
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @abandonware/bluetooth-hci-socket@^0.5.3-5 (node_modules/@abandonware/noble/node_modules/@abandonware/bluetooth-hci-socket):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @abandonware/[email protected]: wanted {"os":"linux,android,freebsd,win32","arch":"any"} (current: {"os":"darwin","arch":"x64"})
npm WARN [email protected] requires a peer of bufferutil@^4.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of utf-8-validate@^5.0.2 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] No repository field.
npm WARN [email protected] No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/noble/node_modules/bluetooth-hci-socket):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"linux,android,win32","arch":"any"} (current: {"os":"darwin","arch":"x64"})

added 2 packages in 20.497s

Should I install the optional dependencies? Thanks for your help.

Sampling frequency and synchronization issues with Server running on Raspberry Pi 4B

Hi, I am currently running Xsens DOT Server on Raspberry Pi 4B. There are a few issues that I have encountered and I wonder if they have been resolved yet.

  1. I am able to scan and connect to 5 sensors with the web server. When I start Xsens DOT Server and begin collecting data in the first time, all 5 Xsens DOT sensors successfully connect to the server, synchronize, and stream data back to the Xsens DOT Server on Raspberry Pi. However, when I click "Stop Logging" to terminate the session, and then "Start Logging" again, only 2 or 3 Xsens DOT sensors (sometimes only 1 DOT sensor) are successfully synched, and the Server gets stuck at waiting for "Successful synchronization" from all 5 sensors. This issue happens very regularly. In order to avoid the issue, I have to disconnect all 5 sensors from the current Xsens DOT Server session, close Xsens DOT Server, use the Xsens DOT App on my iPhone to connect and deactivate Sync on those sensors. After that, I can begin a new Xsens DOT Server session as before. The sensors are updated the latest firmware version. Please let me know if this issue has been addressed.

  2. When connecting multiple sensors for data collection, the sampling frequencies of the sensors are sometimes different. For example, in a collected data set of 3 DOTs, two of them run at 60 Hz and the other one runs at 30 Hz (half of the total received packets of each of the other two). Has anyone encountered this issue?

Thank you all in advance!

Connection Issue on Intel Nuke 8i3BEK - Barebone with Ubuntu 20.04LTS and BLE 5.0

Hello,

I tried to use xsens_dot_server on an my new demo computer with the following configuration
Intel Next Unit of Computing Kit NUC8i3BEK - Barebone - mini PC -
1 x Core i3 8109U / 3 GHz - RAM 0 Go - Iris Plus Graphics 655 -
GigE - LAN sans fil: 802.11a/b/g/n/ac, Bluetooth 5.0
Where I installed Ubuntu version 20.04LTS.

Starting the server is ok but when I'm going at localhost:8080, and I'm starting for looking for device, I get nothing.

I tried to disable the BLE 5.0 and use a dongle 4.0 and it is working (but unable to get more than 5 sensors connected at the same time).

I'm guessing that the issue is coming from the BLE connection but I don't know why?
(I'm currently developing a software using QT and encounter an issue on this computer because I had multi deconnection/reconnection of the sensors that I never get in my personal laptop so I wanted to try your developed application an see if it is working or not).

Regards,
Mélaine

How should I add a new mode to receive data that I need in Xsens Dot Server?

Hi,

I want to receive the raw acceleration, angular velocity and euler angle at the same time which is not include in the six modes.
However, I have no idea about how to to send the control message to the sensors to let it know what kind of message need to be collected.

Has anyone experienced a similar issue and was able to solve this problem?

Best Regards,

ERR_BUFFER_OUT_OF_BOUNDS in buffer.js

Hello!

I have been running the server several times without any issue, however, today when I wanted to run it again I got the following error:

xsens_dot_server>node xsensDotServer
Web GUI Handler instantiated
BLE Handler started.
Webserver listening on port 8080, IP address: 10.10.64.131
internal/buffer.js:75
    throw new ERR_BUFFER_OUT_OF_BOUNDS();
    ^

RangeError [ERR_BUFFER_OUT_OF_BOUNDS]: Attempt to access memory outside buffer b
ounds
←[90m    at boundsError (internal/buffer.js:75:11)←[39m
←[90m    at Buffer.readUInt8 (internal/buffer.js:243:5)←[39m
    at Hci.processCmdCompleteEvent (C:\Users\iria\xsens_dot_server\node_modules\
←[4mnoble←[24m\lib\hci-socket\hci.js:566:25)
    at Hci.onSocketData (C:\Users\iria\xsens_dot_server\node_modules\←[4mnoble←[
24m\lib\hci-socket\hci.js:461:12)
←[90m    at BluetoothHciSocket.emit (events.js:310:20)←[39m
    at BluetoothHciSocket.onHciEventEndpointData (C:\Users\iria\xsens_dot_server
\node_modules\←[4mbluetooth-hci-socket←[24m\lib\usb.js:156:10)
←[90m    at InEndpoint.emit (events.js:310:20)←[39m
    at Transfer.transferDone (C:\Users\iria\xsens_dot_server\node_modules\←[4mus
b←[24m\usb.js:441:9) {
  code: ←[32m'ERR_BUFFER_OUT_OF_BOUNDS'←[39m

I have not changed the network, device or sensors, neither the drivers nor any configuration from yesterday. Any ideas of how to solve it?

Thanks!

Fail to download bluetooth_hci_socket (Windows)

After cloning the code from Github, I went the folder xsens_dot_server.
When I install necessary packages using npm install, error occurs.
One critical thing is bluetooth_hci_socket cannot be not downloaded.
This is because of the following error:

node-pre-gyp WARN Tried to download(404): https://github.com/abandonware/node-bluetooth-hci-socket/releases/download/0.5.3-6/bluetooth_hci_socket-0.5.3-6-node-v72-win32-x64.tar.gz

This means that the download URL for bluetooth-hci-socket is not available anymore.

no log files appear

I am running the server and I am able to connect and disconnect from the sensors, but the logging doesn't seem to work. When I press the "start logging" button I see the 'synching, don't refresh" message and after it disappear nothing is going on, there are no logging files. What could be the issue here?

bluetooth-hci-socket error

Error: Cannot find module 'bluetooth-hci-socket'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object. (/home/raajshekhar/Documents/xsenx_d/xsens_dot_server/node_modules/noble/lib/hci-socket/hci.js:6:26)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)

Unable to connect multiple dots in Raspberry pi 4

Hello,

I am trying to connect multiple dots at same time using raspberry pi 4 model but unable to achieve this task. due to some issue, one sensor connect at a time and rest of the sensors continuously showing "stop connecting " in the GUI. let me how to rectify this problem.

Best Regards
R Naveen kumar
NXtQ Pvt Ltd
pi41
61

Error running inside Docker: "uv_poll_start: Assertion '...' failed"

I was trying to run the DOT server from inside Docker to experiment with it, but I can't get it to run.
I made the following Dockerfile, based on the instructions for Raspberry Pi:

FROM node:16

# Prepare packages
RUN apt-get update -q && apt-get install -y bluetooth bluez libbluetooth-dev libudev-dev \
    build-essential libssl-dev

# Prepare NodeJS
RUN npm install -g n && \
    n 8.11.1

# Get code
RUN cd ~ && git clone https://github.com/xsens/xsens_dot_server.git

WORKDIR /root/xsens_dot_server

# Run application
RUN npm install

EXPOSE 8080

CMD ["node", "xsensDotServer"]

But upon running the container I get the output with the error:

Web GUI Handler instantiated
BLE Handler started.
Webserver listening on port 8080, IP address: 172.17.0.2
node: ../deps/uv/src/unix/poll.c:120: uv_poll_start: Assertion `!(((handle)->flags & (UV_CLOSING | UV_CLOSED)) != 0)' failed.

I have no experience with NodeJS or NPM, so I am at a loss here.

npm install error

Hello,
I would like to install xsens dot server on Raspbian, but when I run npm install I get following error.
As a result, the xsensDotServer node does not work

> prebuild-install --verbose || node-gyp rebuild

prebuild-install info begin Prebuild-install version 5.3.6
prebuild-install info looking for cached prebuild @ /home/pi/.npm/_prebuilds/49134e-usb-v1.6.3-node-v57-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-v57-linux-arm.tar.gz
prebuild-install http 404 https://github.com/tessel/node-usb/releases/download/v1.6.3/usb-v1.6.3-node-v57-linux-arm.tar.gz
prebuild-install WARN install No prebuilt binaries found (target=8.11.1 runtime=node arch=arm libc= platform=linux)
gyp ERR! configure error
gyp ERR! stack Error: Python executable "/usr/bin/python" is v3.9.2, which is not supported by gyp.
gyp ERR! stack You can pass the --python switch to point to Python >= v2.5.0 & < 3.0.0.
gyp ERR! stack     at PythonFinder.failPythonVersion (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:492:19)
gyp ERR! stack     at PythonFinder.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:474:14)
gyp ERR! stack     at ChildProcess.exithandler (child_process.js:267:7)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at maybeClose (internal/child_process.js:925:16)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
gyp ERR! System Linux 5.15.61-v7l+
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/pi/xsens_dot_server/node_modules/usb
gyp ERR! node -v v8.11.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok

Cannot recognize sensors when click Start Scanning

ERROR: component 'SensorServer' received unexpected event 'startScanning' in state 'Powering-on'

I have not been able to update the firmware in the sensors using the app, and have requested help with that via email. I was wondering if using the Dot Server would somehow solve this issue but I can not even recognize the sensors using the setup instructions provided.

Empty log files raspberry pi

I followed the steps to setup the DOT sensors for the raspberry pi 4. Setup went without errors; DOT server is running; I am able to scan and sellect the DOTs on the localhost page. When I sellect a dot and want to start logging (and press "start logging") all seems to be working fine. A log file is generated... but, besides the headers the log files do not contain data from the DOTs. Is this a known issue?

Error: Cannot find module 'bluetooth-hci-socket' in Raspberry Pi 4B

Hi
I am trying to install and run Xsens Dot Server in a Raspberry 4B (with Raspberry OS bullseye).
When I run the program:

sudo node xsensDotServer

I get this error:

Web GUI Handler instantiated
module.js:549
    throw err;
    ^

Error: Cannot find module 'bluetooth-hci-socket'
    at Function.Module._resolveFilename (module.js:547:15)
    at Function.Module._load (module.js:474:25)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/home/armtracker/xsens_server/xsens_dot_server/node_modules/noble/lib/hci-socket/hci.js:6:26)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)

Any idea on how to fix this ? I guess that some library is missing or was not installed correctly (I got several deprecation warnings through the installation process and other warnings), but I don't know how to debug this. Any help will be appreciated.

Thanks in advance

Xsens Dot not connecting to the Server WebApp

Hello,

I've been trying to connect the xsens dot to the webapp server unsuccessfully. I'm able to scan the sensors successfully. But I haven't managed to connect them all. Only once I was able to connect 1 sensor but then when I clicked in the button to gather data, the server app didn't react.

I'm running this in a windows 10 computer

Have you encountered this problem? If yes, how did you solve it?

Thank you

No data generated

Hello,

I bought a set of xsens dot sensors previous week and I'm trying to use your application to validate the data.
I tried first on ubuntu then on windows but I'm getting the same issues on both :

  • Connection ok
  • Start recording .... a file is generated but without data (I only have the header.

I used 2 bluetooth test : default one from my computer inter ble 4.1 and I also bought a asus-bt500 dongle to get ble 5.0. Same result with both

Do you have any idea what could be the cause?

Thank you for your help and work
Best regards,
Mélaine

Unable to write device tag

Hello,

I'm trying unsuccessfuly to set a new device tag in the device control characteristics. Using python and Bleak library, I'm able to connect to a dot, to set filter profile index and output rate but when I set a new tag with corresponding tag length changes are not taken into account and no error is thrown.
For that, I create a 16bytes array, write new tag to the first n bytes encoded in ascii and then add it to the reste of message (before adding output_rate, filter_profile_idx and reserved data). When i look at the generated bytes message it's looks like good but it is changing neither the tag length neither the tag.

Any idea ?

Antoine

Error when starting scanning

I get the error: "ERROR: component 'SensorServer' received unexpected event 'startScanning' in state 'Powering-on'" when starting scanning for the sensors. Can you help me solve this?

error when running npm install

I am trying to use dot server on windows 10. I followed installation instructions only changed this : npm install --global windows-build-tools**@4.0.0** because original command was stuck at "Still waiting for installer log file..."

but when running npm install it ends up with this error :

npm install
npm WARN deprecated [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (debug-js/debug#797)
npm WARN deprecated [email protected]: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future
npm ERR! code ENOENT
npm ERR! syscall spawn git
npm ERR! path git
npm ERR! errno ENOENT
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t https://github.com/Timeular/noble-mac.git
npm ERR! enoent
npm ERR! enoent
npm ERR! enoent spawn git ENOENT
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:

Have anyone experienced this ?

Antoine

sensorServer locked in state "Powering-on"

Hello fellas,

So, I’ve been running the code on several computers, all with the same OS (Windows 10). At first, all of them worked fine with one sensor at a time.
Recently however, on one of the computers, the code runs well with node xsensDotServer but throw this error when I start scanning, the console throw the error
ERROR: component "SensorServer" received unexpected event "startScanning" in state "Powering-on"
I’ve tried reinstalling xSensDotServer and then Node.js, the same error appeared. I also launched other instances of the software, modified to be compatible with other softwares I use (but working too, even on other PCs), and it threw the same error.

Any idea of the problem, or any question about something I should have specified?

Thanks all

Node modules not found during `node-gyp rebuild`

I'm trying to install the Xsens DOT server on a Mac running Catalina (10.15.5). Looks like some node modules are not being found, causing the install to fail. Where can I find the node-addon-api and napi-thread-safe-callback modules?

Output from npm install:

$ npm install

> @abandonware/[email protected] install /Users/user123/Documents/ANS Lab/xsens_dot_server/node_modules/@abandonware/noble
> node-gyp rebuild

  CC(target) Release/obj.target/nothing/../../node-addon-api/src/nothing.o
  LIBTOOL-STATIC Release/nothing.a
  CXX(target) Release/obj.target/binding/lib/mac/src/noble_mac.o
clang: error: no such file or directory: 'Lab/xsens_dot_server/node_modules/node-addon-api'
clang: error: no such file or directory: 'Lab/xsens_dot_server/node_modules/napi-thread-safe-callback'

After that, there is more error output where make and node-gyp fail. See below for full output.

Here is the version info for node:

$ node -v
v8.9.4
$ node-gyp -v
v7.0.0

Full output for error:

$ npm install

> @abandonware/[email protected] install /Users/forte/Documents/ANS Lab/xsens_dot_server/node_modules/@abandonware/noble
> node-gyp rebuild

  CC(target) Release/obj.target/nothing/../../node-addon-api/src/nothing.o
  LIBTOOL-STATIC Release/nothing.a
  CXX(target) Release/obj.target/binding/lib/mac/src/noble_mac.o
clang: error: no such file or directory: 'Lab/xsens_dot_server/node_modules/node-addon-api'
clang: error: no such file or directory: 'Lab/xsens_dot_server/node_modules/napi-thread-safe-callback'
make: *** [Release/obj.target/binding/lib/mac/src/noble_mac.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Darwin 19.5.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/forte/Documents/ANS Lab/xsens_dot_server/node_modules/@abandonware/noble
gyp ERR! node -v v8.9.4
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok 
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @abandonware/bluetooth-hci-socket@^0.5.3-5 (node_modules/@abandonware/noble/node_modules/@abandonware/bluetooth-hci-socket):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @abandonware/[email protected]: wanted {"os":"linux,android,freebsd,win32","arch":"any"} (current: {"os":"darwin","arch":"x64"})
npm WARN [email protected] requires a peer of bufferutil@^4.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of utf-8-validate@^5.0.2 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] No repository field.
npm WARN [email protected] No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/noble/node_modules/bluetooth-hci-socket):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"linux,android,win32","arch":"any"} (current: {"os":"darwin","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @abandonware/[email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @abandonware/[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!     /Users/forte/.npm/_logs/2020-06-25T22_24_17_104Z-debug.log

unable to get log file from 5 sensors at a time using R Pi 4 model

Hi

I connect all 5 sensors using raspberry pi 4 model , but unable to get the log files from all dots at same time. some time this issue is coming for me . not all the time. once i restart the pi then it will work properly , after 5 to 6 min it will go to same state , automatically out of 5 one dot is disconnecting . please let me know how to solve this problem.

Best regards
Naveen kumar
NxtQ Pvt Ltd

Cannot scan sensor

When I click start scanning, my sensor does not show up on the web browser. I have already restarted my device and reinstalled drivers. Any help would be appreciated.

TypeError: Cannot read property 'reverse' of null

Hi there,
I'm new to development so please forgive me if this is a dumb question - I have followed the instructions to install and run the xsens dot server and I am getting the error below (all output is included). Please let me know how to troubleshoot. Thank you!

C:\Users\mkamachi\xsens_dot_server>node xsensDotServer
Web GUI Handler instantiated
BLE Handler started.
Webserver listening on port 8080, IP address: 192.168.1.80
C:\Users\mkamachi\xsens_dot_server\node_modules\noble\lib\hci-socket\hci.js:582
this.address = result.toString('hex').match(/.{1,2}/g).reverse().join(':');
^

TypeError: Cannot read property 'reverse' of null
at Hci.processCmdCompleteEvent (C:\Users\mkamachi\xsens_dot_server\node_modules\noble\lib\hci-socket\hci.js:582:59)
at Hci.onSocketData (C:\Users\mkamachi\xsens_dot_server\node_modules\noble\lib\hci-socket\hci.js:461:12)
at BluetoothHciSocket.emit (events.js:310:20)
at BluetoothHciSocket.onHciEventEndpointData (C:\Users\mkamachi\xsens_dot_server\node_modules\bluetooth-hci-socket\lib\usb.js:156:10)
at InEndpoint.emit (events.js:310:20)
at Transfer.transferDone (C:\Users\mkamachi\xsens_dot_server\node_modules\usb\usb.js:441:9)

Server works fine on Raspberry Pi 3 Model B+

I saw that the README has an option to use a Raspberry Pi 4 Model B run the server. For documentation purposes, I installed it on my Raspberry Pi 3 Model B+ and ran it without issue. Server starts up, connects to sensors, and logs data just fine.

Specs:
Raspberry Pi 3 Model B+
1 GB RAM
Raspberry Pi OS (Raspbian), Version: May 2020, Kernel: 4.19

Connection to Xsens DOTs from other languages

Hi, I am trying to connect to the Xsens DOTs using Python and Bluepy. I have a general question about enabling and receiving notifications from the Xsens DOTs. Am I correct that to get accel/gyro data out of the sensor, I have to write an enable message to the Control Characteristic (b\x01\x01\02 for example), then one of the measurement characteristics (short/medium payload, etc.) will send out notification packets with sensor data?

I am able to connect to and write to the control characteristic of an Xsens DOT sensor from my Python script but am having trouble getting notifications. Do I have the general idea of getting sensor data correct?

Thanks.

The server does not connect to sensors on RPi 4

I'm using RPi 4. On the browser GUI, I can start scanning and it does find the sensors. When I select Connect, however, it does not connect to the any of the sensors. I'm not getting any error messages.

Unable to get log file above 15 meter from raspberry pi

Hi

I am working with raspberry pi along with dots. practically I noticed that I couldn't get log file above 15 meter from the raspberry pi . If we integrate raspberry pi with external antenna can we able to achieve Better range (expected 100 mtr)? If yes please suggest good antenna for raspberry pi or please let me know if any other suggestions to improve the range.

Best regards
Naveen Kumar
NxtQ Pvt LTD

Error installing xsens Dot Server

  • OS name: Microsoft Windows 10 Home Chinese Version

  • OS version: 10.0.19043 Not available Build 19043

  • OS manufacturer: Microsoft Corporation

  • Bluetooth version: LMP 8.4096 Bluetooth 4.2

image

Install the following tools

conda create -n XsensDotServe python=3.8.3
  • I have successfully registered npm and node-gyp
  • An error occurs when I run Windows-build-tools in CMD as administrator
npm WARN deprecated [email protected]: request has been deprecated, see
https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN rollback Rolling back [email protected] failed (this is probably
harmless): EBUSY: resource busy or locked, rmdir
'C:\Users\openmind\AppData\Roaming\npm\node_modules\windows-build-tools'
npm ERR! code EBUSY
npm ERR! syscall rename
npm ERR! path C:\Users\openmind\AppData\Roaming\npm\node_modules\windowsbuild-tools
npm ERR! dest C:\Users\openmind\AppData\Roaming\npm\node_modules\.windowsbuild-tools.DELETE
npm ERR! errno -4082
npm ERR! EBUSY: resource busy or locked, rename
'C:\Users\openmind\AppData\Roaming\npm\node_modules\windows-build-tools' ->
'C:\Users\openmind\AppData\Roaming\npm\node_modules\.windows-buildtools.DELETE'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\openmind\AppData\Roaming\npm-cache\_logs\2021-09-
04T03_36_56_161Z-debug.log

Is windows-build-Tools not working?

I successfully registered with Zadig

image

Set Up on Windows

I have cloned the repository and have successfully registered NPM when I run NPM Install

npm WARN xsens_dot_server@1.0.0 No repository field.
npm WARN xsens_dot_server@1.0.0 No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: xpc-connection@0.1.4
(node_modules\xpc-connection):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for xpcconnection@0.1.4: wanted {"os":"darwin","arch":"any"} (current:
{"os":"win32","arch":"x64"})
audited 212 packages in 2.75s
3 packages are looking for funding
run `npm fund` for details
found 11 vulnerabilities (1 low, 10 high)
run `npm audit fix` to fix them, or `npm audit` for details
  • Run Xsens Dot Server
Web GUI Handler instantiated
Webserver listening on port 8080, IP address: 192.168.31.72
1
2
E:\Workspace\xsensdot\xsens_dot_server\node_modules\bluetooth-hcisocket\lib\usb.js:70
throw new Error('No compatible USB Bluetooth 4.0 device found!');
^
Error: No compatible USB Bluetooth 4.0 device found!
at BluetoothHciSocket.bindUser
(E:\Workspace\xsensdot\xsens_dot_server\node_modules\bluetooth-hcisocket\lib\usb.js:70:11)
at BluetoothHciSocket.bindRaw
(E:\Workspace\xsensdot\xsens_dot_server\node_modules\bluetooth-hcisocket\lib\usb.js:28:8)
at Hci.init (E:\Workspace\xsensdot\xsens_dot_server\node_modules\noble\lib\hcisocket\hci.js:101:35)
at NobleBindings.init
(E:\Workspace\xsensdot\xsens_dot_server\node_modules\noble\lib\hcisocket\bindings.js:82:13)
at processTicksAndRejections (internal/process/task_queues.js:79:11)
(XsensDotServe) PS E:\Workspace\xsensdot\xsens_dot_server> npm install
npm WARN xsens_dot_server@1.0.0 No repository field.
npm WARN xsens_dot_server@1.0.0 No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: xpc-connection@0.1.4
(node_modules\xpc-connection):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for xpcconnection@0.1.4: wanted {"os":"darwin","arch":"any"} (current:
{"os":"win32","arch":"x64"})
audited 212 packages in 2.75s
3 packages are looking for funding
run `npm fund` for details
found 11 vulnerabilities (1 low, 10 high)
run `npm audit fix` to fix them, or `npm audit` for details

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.