Connect to Nova gloves using Command-line

Follow these steps to pair a Nova glove to your PC on GNU/Linux usng command-line and Bluez:

  1. Some Linux distributions include BlueZ in their default installation. If yours doesn't, install it using the appropriate package manager:
# Gentoo
$ emerge -atuv net-wireless/bluez

# Arch, Manjaro
$ sudo pacman -S bluez

# CentOS, Fedora, AlmaLinux, Rocky Linux
$ sudo dnf install bluez

# CentOS/RHEL
$ sudo yum install bluez

# Debian, Ubuntu
$ sudo apt install bluez

# openSUSE
sudo zypper install bluez

# Solus
$ sudo eopkg install bluez

# Void Linux
$ sudo xbps-install -S bluez

important

To properly set up the Bluetooth stack on your Linux distribution, additional steps may be required. For example, on Gentoo and Arch consult each distribution's official guide.

  1. Run the following command to ensure that BlueZ is installed and check your bluetoothctl version:
bluetoothctl version
Version 5.77
  1. Ensure that the bluetooth service is started and running. For example, on Gentoo Linux:
$  rc-service bluetooth start

You might see one of these outputs based on whether it's already running or not:

 * Starting bluetooth ...
# or
 * WARNING: bluetooth has already been started
  1. Ensure any glove you would like to pair with and connect to your system is not paired, or connected to any other device, such as another PC or VR headset.

  2. Make sure the glove is turned on.

  3. Use bluetoothctl list or bluetoothctl show command to extract your PC's Bluetooth Controller MAC Address which is useful for later on:

$ bluetoothctl list

Controller CC:15:31:90:69:87 BlueZ 5.77 [default]

$ bluetoothctl show
Controller CC:15:31:90:69:87 (public)
	Manufacturer: 0x0002 (2)
	Version: 0x0b (11)
	Name: BlueZ 5.77
	Alias: BlueZ 5.77
	Class: 0x007c010c (8126732)
	Powered: yes
	PowerState: on
	Discoverable: no
	DiscoverableTimeout: 0x0000003c (60)
	Pairable: no
	UUID: Message Notification Se.. (00001133-0000-1000-8000-00805f9b34fb)
	UUID: A/V Remote Control        (0000110e-0000-1000-8000-00805f9b34fb)
	UUID: OBEX Object Push          (00001105-0000-1000-8000-00805f9b34fb)
	UUID: Message Access Server     (00001132-0000-1000-8000-00805f9b34fb)
	UUID: PnP Information           (00001200-0000-1000-8000-00805f9b34fb)
	UUID: IrMC Sync                 (00001104-0000-1000-8000-00805f9b34fb)
	UUID: Headset                   (00001108-0000-1000-8000-00805f9b34fb)
	UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)
	UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
	UUID: Phonebook Access Server   (0000112f-0000-1000-8000-00805f9b34fb)
	UUID: Audio Sink                (0000110b-0000-1000-8000-00805f9b34fb)
	UUID: Device Information        (0000180a-0000-1000-8000-00805f9b34fb)
	UUID: Generic Access Profile    (00001800-0000-1000-8000-00805f9b34fb)
	UUID: Handsfree Audio Gateway   (0000111f-0000-1000-8000-00805f9b34fb)
	UUID: Audio Source              (0000110a-0000-1000-8000-00805f9b34fb)
	UUID: OBEX File Transfer        (00001106-0000-1000-8000-00805f9b34fb)
	Modalias: usb:v1D6Bp0246d054D
	Discovering: no
	Roles: central
	Roles: peripheral
Advertising Features:
	ActiveInstances: 0x00 (0)
	SupportedInstances: 0x0c (12)
	SupportedIncludes: tx-power
	SupportedIncludes: appearance
	SupportedIncludes: local-name
	SupportedSecondaryChannels: 1M
	SupportedSecondaryChannels: 2M
	SupportedCapabilities.MinTxPower: 0xffffffde (-34)
	SupportedCapabilities.MaxTxPower: 0x0007 (7)
	SupportedCapabilities.MaxAdvLen: 0xfb (251)
	SupportedCapabilities.MaxScnRspLen: 0xfb (251)
	SupportedFeatures: CanSetTxPower
	SupportedFeatures: HardwareOffload
  1. Ensure the controller is powered on:
$ bluetoothctl power on

Changing power on succeeded
  1. Enable the agent to listen for Bluetooth events that require user interaction, such as pairing requests and managing device authorizations:
$ bluetoothctl agent on
  1. Set the current agent as the default agent:
$ bluetoothctl default-agent

No agent is registered
  1. Set the controller to be discoverable for 180 seconds:
$ bluetoothctl discoverable on

bluetoothctl discoverable on
hci0 new_settings: powered connectable ssp br/edr le secure-conn wide-band-speech 
hci0 new_settings: powered connectable discoverable ssp br/edr le secure-conn wide-band-speech 
Changing discoverable on succeeded

note

To change the default discoverable timeout, you can set it manually using the bluetoothctl discoverable-timeout command.

$ bluetoothctl discoverable-timeout 300

Changing discoverable-timeout 300 succeeded
  1. Then, make the controller pairable as well:
$ bluetoothctl pairable on

hci0 new_settings: powered connectable discoverable bondable ssp br/edr le secure-conn wide-band-speech
Changing pairable on succeeded
  1. Begin scanning for devices:
$ bluetoothctl scan on

SetDiscoveryFilter success
  1. After a few seconds, list the discovered devices:

bluetoothctl devices

Device 78:D2:52:42:33:2F 78-D2-52-42-33-2F
Device 94:3C:C6:47:65:72 NOVA-1217-L
Device AC:F1:08:37:9F:93 LG DSN7CY(93)
Device 70:D6:10:9D:73:8F 70-D6-10-9D-73-8F
Device 7F:2C:8C:8D:09:9F 7F-2C-8C-8D-09-9F
Device F9:56:4B:86:1E:13 F9-56-4B-86-1E-13
Device C9:A3:07:41:91:B0 iLamp
Device 4F:9D:F8:20:43:F3 Bedroom
Device CC:B1:1A:2D:A8:A4 [TV] UE40J5500
Device A0:D7:F3:76:14:51 [TV] Samsung AU7100 75 TV
Device 5C:17:CF:1D:35:37 OnePlus 8 Pro
Device E2:F8:03:F6:D8:CB E2-F8-03-F6-D8-CB
Device 38:18:4C:E9:69:7A LE_WH-1000XM3
Device B8:D6:1A:BA:81:32 Nova 2 0667-L

note

If your device is not listed yet, you can run this command multiple times as bluetoothctl continues the device discovery in the background.

  1. Use the following command to pair with the discoved glove:
$ bluetoothctl pair GLOVE_MAC_ADDRESS

For example:

$ bluetoothctl pair 94:3C:C6:47:65:72

Attempting to pair with 94:3C:C6:47:65:72
[CHG] Device 94:3C:C6:47:65:72 Connected: yes
[CHG] Device 94:3C:C6:47:65:72 Bonded: yes
[CHG] Device 94:3C:C6:47:65:72 UUIDs: 00001101-0000-1000-8000-00805f9b34fb
[CHG] Device 94:3C:C6:47:65:72 ServicesResolved: yes
[CHG] Device 94:3C:C6:47:65:72 Paired: yes
Pairing successful

note

If you encounter the Failed to pair: org.bluez.Error.AuthenticationFailed error message, it might be misleading. Check if there is a line with the glove's MAC address followed by Connected: yes, which indicates that the connection was actually successful.

Attempting to pair with 94:3C:C6:47:65:72
[CHG] Device 94:3C:C6:47:65:72 Connected: yes
Failed to pair: org.bluez.Error.AuthenticationFailed
  1. Mark the device as trusted by issuing the following command:
$ bluetoothctl trust GLOVE_MAC_ADDRESS

For example:

$ bluetoothctl trust 94:3C:C6:47:65:72

[CHG] Device 94:3C:C6:47:65:72 Trusted: yes
Changing 94:3C:C6:47:65:72 trust succeeded
  1. Attempt to connect to the glove again:
$ bluetoothctl connect GLOVE_MAC_ADDRESS

For example:

$ bluetoothctl connect 94:3C:C6:47:65:72

Attempting to connect to 94:3C:C6:47:65:72
[CHG] Device 38:18:4C:E9:69:7A RSSI: 0xffffffd0 (-48)
[CHG] Device 94:3C:C6:47:65:72 Connected: yes
[CHG] Device 94:3C:C6:47:65:72 UUIDs: 00001101-0000-1000-8000-00805f9b34fb
[CHG] Device 94:3C:C6:47:65:72 ServicesResolved: yes
Failed to connect: org.bluez.Error.NotAvailable br-connection-profile-unavailable

note

Again, the error message may be misleading. The connection is often successful despite the error.

  1. If desired, you can extract some information from the glove using:
$ bluetoothctl info GLOVE_MAC_ADDRESS

For example:

bluetoothctl info 94:3C:C6:47:65:72 
Device 94:3C:C6:47:65:72 (public)
	Name: NOVA-1217-L
	Alias: NOVA-1217-L
	Class: 0x00001f00 (7936)
	Paired: yes
	Bonded: yes
	Trusted: yes
	Blocked: no
	Connected: yes
	LegacyPairing: no
	UUID: Serial Port               (00001101-0000-1000-8000-00805f9b34fb)
  1. Create an RFCOMM device:
$ sudo rfcomm connect /dev/rfcommX GLOVE_MAC_ADDRESS CHANNEL_NUMBER

For example:

$ sudo rfcomm connect /dev/rfcomm0 94:3C:C6:47:65:72 1

Connected /dev/rfcomm0 to 94:3C:C6:47:65:72 on channel 1
Press CTRL-C for hangup

note

The rfcomm command requires root permision, so it must be run with sudo.

tip

To determine the channel number, run the following command:

$ sdptool browse GLOVE_MAC_ADDRESS
$ sdptool browse 94:3C:C6:47:65:72
Browsing 94:3C:C6:47:65:72 ...
Service Name: SPP_SERVER
Service RecHandle: 0x10000
Service Class ID List:
  "Serial Port" (0x1101)
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 1
Profile Descriptor List:
  "Serial Port" (0x1101)
    Version: 0x010

note

If you have more than one glove or in general multiple serial Bluetooth devices connected to your device connected to your PC, then /dev/rfcomm0 may already be allocated to another device. In that case, increment the number until finding a free rfcomm device. You can query the existing rfcomm devices using the command: ls /dev/rfcomm*.

  1. Follow the SenseCom on GNU/Linux instructions and you should be able to successfully connect to the newly paired glove from SenseCom.

  2. Once the SenseCom is closed and we are done with the gloves, we can disconnect the gloves using:

$ bluetoothctl disconnect ${SG_DEVICE}
$ sudo rfcomm release ${SG_RFCOMM}

For example:

$ bluetoothctl disconnect 94:3C:C6:47:65:72
$ sudo rfcomm release /dev/rfcomm0

note

Again, the rfcomm command requires elevated permissions, so it must be run with the sudo command.

Scripts to Easily Connect and Disconnect from a Glove

You can automate the above tedious process using scripts for connecting and disconnecting gloves.

sg-connect.sh:

#!/usr/bin/env sh

CTRL_DEVICE="YOUR_BLUETOOTH_CONTROLLER_MAC_ADDRESS"
SG_DEVICE="YOUR_SENSEGLOVE_MAC_ADDRESS"
SG_RFCOMM="/dev/rfcomm0"

bluetoothctl pairable on
bluetoothctl discoverable on
bluetoothctl pair ${SG_DEVICE}
bluetoothctl trust ${SG_DEVICE}
bluetoothctl connect ${SG_DEVICE}
rfcomm connect ${SG_RFCOMM} ${SG_DEVICE} 1 &

sg-disconnect.sh:

#!/usr/bin/env sh

SG_DEVICE="YOUR_SENSEGLOVE_MAC_ADDRESS"
SG_RFCOMM="/dev/rfcomm0"

bluetoothctl disconnect ${SG_DEVICE}
rfcomm release ${SG_RFCOMM}

Example Scripts for a Left-Handed Glove

$ cat sg-connect-left.sh

#!/usr/bin/env sh

CTRL_DEVICE="CC:15:31:90:69:87"
SG_DEVICE="94:3C:C6:47:65:72"
SG_RFCOMM="/dev/rfcomm0"

bluetoothctl pairable on
bluetoothctl discoverable on
bluetoothctl pair ${SG_DEVICE}
bluetoothctl trust ${SG_DEVICE}
bluetoothctl connect ${SG_DEVICE}
rfcomm connect ${SG_RFCOMM} ${SG_DEVICE} 1 &

$ cat sg-disconnect-left.sh

#!/usr/bin/env sh

SG_DEVICE="94:3C:C6:47:65:72"
SG_RFCOMM="/dev/rfcomm0"

bluetoothctl disconnect ${SG_DEVICE}
rfcomm release ${SG_RFCOMM}

# Set the executable permissions for all users:
$ chmod a+x sg-connect-left.sh
$ chmod a+x sg-disconnect-left.sh

# Before running SenseCom:

$ sudo ./sg-connect-left.sh

Password:

Changing pairable on succeeded
hci0 new_settings: powered connectable bondable ssp br/edr le secure-conn wide-band-speech 
hci0 new_settings: powered connectable discoverable bondable ssp br/edr le secure-conn wide-band-speech 
Changing discoverable on succeeded
Attempting to pair with 94:3C:C6:47:65:72
Failed to pair: org.bluez.Error.AlreadyExists
Changing 94:3C:C6:47:65:72 trust succeeded
Attempting to connect to 94:3C:C6:47:65:72
hci0 94:3C:C6:47:65:72 type BR/EDR connected eir_len 18
[CHG] Device 94:3C:C6:47:65:72 Connected: yes
[CHG] Device 94:3C:C6:47:65:72 ServicesResolved: yes
Failed to connect: org.bluez.Error.NotAvailable br-connection-profile-unavailable

# Run SenseCom in between!

# Once SenseCom is closed:

$ sudo ./sg-disconnect-left.sh

sudo ./sg-disconnect-left.sh 

Password:

Attempting to disconnect from 94:3C:C6:47:65:72
hci0 94:3C:C6:47:65:72 type BR/EDR disconnected with reason 2
[CHG] Device 94:3C:C6:47:65:72 ServicesResolved: no
Successful disconnected
Can't release device: No such device

Video Tutorial

There is also a video tutorial demonstrating how to connect to Nova gloves on GNU/Linux using the command line.