xsens / xsens_dot_server

32 stars 24 forks source link

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

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

Important Notices

Documentation

Set up the environment

Set up on Windows

Prerequisites

Install the following tools

Set up on macOS

Install following tools

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

Installation steps

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.