Skip to content
This repository has been archived by the owner on Jun 11, 2023. It is now read-only.

[Merged] A demo to show how to programtically control Nobra Twincharger

License

Notifications You must be signed in to change notification settings

NeverBehave/NobraControlDemo

Repository files navigation

Nobra Control Demo

Background

It is now supported by Buttplug: buttplugio/buttplug#495

I have tried intiface (config added), and noble directly, but no luck. Both of them cannot found the device.

It turns out that Nobra Digital Control Box is BTClassic, Oops. Currently, https://buttplug.io does not support such protocal.

Get started

Notice:

  • the library node-bluetooth-serial-port only works on Node.js <12, higher version will report errors when compiling.
  • Vue-cli does not work with Node.js 12

So if you want to set up the demo website, you should use Node.js 10. If only cli part, Node.js 12 should be fine.

Install

yarn

Run

It should automatcally search for device and try connecting it.

Note: the library didn't handle close properly. If the device cannot be found(usually in 30s when device is discoverable), try toggling the bluetooth switch to release the previous connection.

Since this is just a demo, plz forgive unhandled Exception :(

Most of the time you may need to manually kill node, killall node, since the library inquire() is still scanning device at the backend. This behavior cannot be stopped via current API.

commandline mode

yarn commandLine

There will be an interactive shell allows you to type in command (0-15, e for exit)

Website

yarn dev

Check console for website (usually http://localhost:8080)

You may use it in LAN as well (there should be another address listed)

Please press check button to check if it is ready.

API

yarn buttplug

This will start a local buttplug websocket server, but only for Nobra Control for now.

Note

  • Tested on Manjaro 20.0.3 Lysia