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.
- Disconnect all Bluetooth peripherals (mouse, keyboard) before start Xsens DOT Server to ensure stable Bluetooth connections.
- Firmware support:
- v1.6.0
- 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.
- Windows 10, Windows 7
- Compatible Bluetooth 4.0 USB adapter or above
- Recommend to use Chrome or Firefox
-
Install Python 3.8.3 from the Micfrosoft Store package
-
Install Node.js-v12.16.2-x64
-
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:
- 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.
- Raspberry Pi 4 Model B 4GB RAM / Raspberry Pi 3 Model B+, 1 GB RAM
- Install Raspberry Pi OS
-
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
- Clone repository
git clone https://github.com/xsens/xsens_dot_server.git
- Enter Xsens DOT Server project
cd ./xsens_dot_server
and install the dependency packagenpm install
- Run Xsens DOT Server
- Windows and macOS:
node xsensDotServer
- Raspberry Pi:
sudo node xsensDotServer
- Windows and macOS:
- Open Xsens DOT server in browser
- Run http://localhost:8080/ or http://127.0.0.1:8080/ you are able to use Xsens DOT Server!
- [Connection] Unable to connect sensors in Mac with Bluetooth 5.0.
- [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.
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:
- Open Device Manager, find the VID and PID of your Bluetooth adapter.
- Open source code: xsens_dot_server\node_modules\bluetooth-hci-socket\lib\usb.js
- Add Bluetooth VID & PID in usb.js (line 66), save and close.
- Run Xsens DOT Server again.
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:
- Go to Device Manager -> Universal Serial Bus devices
- Find your converted WinUSB driver and uninstall
- In Device Manager, go to Action (top menu), then Scan for hardware changes and let it reinstall
- You should able to find your Bluetooth adapter back in Bluetooth.
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.