Lightstone
From QDot's Personal Wiki
Contents |
Hardware Information
USB Information
Low Speed device @ 2 (0x3D100000): ............................................. Composite device: "ST7 RS232 USB BIOFBK"
Device Descriptor
Descriptor Version Number: 0x0110
Device Class: 0 (Composite)
Device Subclass: 0
Device Protocol: 0
Device MaxPacketSize: 8
Device VendorID/ProductID: 0x0483/0x0035 (STMicroelectronics)
Device Version Number: 0x0111
Number of Configurations: 1
Manufacturer String: 3 "STMicroelectronics"
Product String: 1 "ST7 RS232 USB BIOFBK"
Serial Number String: 0 (none)
Configuration Descriptor
Length (and contents): 41
Raw Descriptor (hex) 0000: 09 02 29 00 01 01 00 80 0A 09 04 00 00 02 03 00
Raw Descriptor (hex) 0010: 00 00 09 21 10 01 21 01 22 1D 00 07 05 81 03 08
Raw Descriptor (hex) 0020: 00 0A 07 05 02 03 08 00 0A
Number of Interfaces: 1
Configuration Value: 1
Attributes: 0x80 (bus-powered)
MaxPower: 20 ma
Interface #0 - HID
Alternate Setting 0
Number of Endpoints 2
Interface Class: 3 (HID)
Interface Subclass; 0
Interface Protocol: 0
HID Descriptor
Descriptor Version Number: 0x0110
Country Code: 33
Descriptor Count: 1
Descriptor 1
Type: 0x22 (Report Descriptor)
Length (and contents): 29
Raw Descriptor (hex) 0000: 06 80 FF 09 00 A1 01 75 08 95 08 15 00 26 FF 00
Raw Descriptor (hex) 0010: 09 01 B1 82 09 01 81 82 09 02 91 82 C0
Parsed Report Descriptor:
Usage Page (65408)
Usage 0 (0x0)
Collection (Application)
Report Size............. (8)
Report Count............ (8)
Logical Minimum......... (0)
Logical Maximum......... (255)
Usage 1 (0x1)
Feature................. (Data, Variable, Absolute, No Wrap, Linear, Preferred State, No Null Position, Volatile, Bitfield)
Usage 1 (0x1)
Input................... (Data, Variable, Absolute, No Wrap, Linear, Preferred State, No Null Position, Bitfield)
Usage 2 (0x2)
Output.................. (Data, Variable, Absolute, No Wrap, Linear, Preferred State, No Null Position, Volatile, Bitfield)
End Collection
Endpoint 0x81 - Interrupt Input
Address: 0x81 (IN)
Attributes: 0x03 (Interrupt no synchronization data endpoint)
Max Packet Size: 8
Polling Interval: 10 ms
Endpoint 0x02 - Interrupt Output
Address: 0x02 (OUT)
Attributes: 0x03 (Interrupt no synchronization data endpoint)
Max Packet Size: 8
Polling Interval: 10 ms
Protocol Information
Information transfered in the form of raw input reports, 8 bytes each. The first byte of each message is the amount of data that should be read from the rest of the message (i.e. if Byte 0 is 3, Bytes 1-4 are valid data and should be added). Each message ends with 0x13 ('\r')
The Lightstone protocol consists of 3 messages
- <SER>XXXX<\SER> - Serial number information
- <VER>XXXX<\VER> - Version information
- <RAW>AABB CCDD<\RAW> - Raw sensor information
- AABB - Heart Rate Variance Data (Format is (0xAA << 8 | 0xBB) * .001, value will usually be between 1.5 and 2.5)
- CCDD - Skin Conductance Level Data (Format is (0xCC << 8 | 0xDD) * .01, value will usually be between 3.0 and 15.0)
Installation Information
Windows
No special installation is required for Windows machines
OS X
A Kernal Extension (KExt) is required to stop OS X from picking up the device under the HID Manager. If the KExt is not installed, the HID Manager will not allow reading of the Raw Input Reports, and there will be no way to access the data coming from the Lightstone.
Lightstone KExt Archive - Unarchive this and put it in /System/Library/Extensions custom essays
Linux
(Information taken from [1])
Much like OS X, Linux will identify the device and pick it up under the hid core. There are two ways to stop this.
- Using libhid, the lightstone can be "stolen" from the kernel using the hid_force_open() function.
- The Lightstone can be blacklisted in the kernel source code, and the kernel can be recompiled. In /usr/src/linux-XX/drivers/usb/hid-core, the following blacklist structure exists:
structhid_blacklist{
__u16 idVendor;
__u16 idProduct;
unsigned quirks;
} hid_blacklist[] = {
Add the following defines to the file:
#define USB_VENDOR_ID_LIGHTSTONE 0x0483 #define USB_DEVICE_ID_LIGHTSTONE 0x0035
and then at the bottom:
{ USB_VENDOR_ID_LIGHTSTONE,
USB_DEVICE_ID_LIGHTSTONE, HID_QUIRK_IGNORE },
{ 0, 0 }
Then recompile your kernel and the hidcore should not longer pick up the Lightstone automatically.
