Change log from version 1.10
- Added parameter version for persistent storage.
The deviceInformation command fetches for example the product id and the FW version. What information that is available differs depending on the type of device. The following example shows a response from a platform device.
The fields have the following meaning:
- platformVersion: FW platform version, version 7.0 in the example.
- protocolVersion: communication protocol version, version 1.5 in the example.
- firmwareVersion: product FW version, version 1.0 in the example.
- hardware: product hardware, configuration and revision.
- asicType: which type of the Neonode optical scanner ASIC is used, and count.
- mcuUniqueIdentifier: identifier created at mcu manufacturing.
- projectReference: FW GIT tags or hashes. Product specific. Uniquely identifies the FW revision.
- platformReference: FW GIT tags or hashes. Uniquely identifies generic firmware base commit for the platform.
- buildTime: time of build in Central European Time, a string.
- buildDate: date of build, a string.
- parametersVersion: parameter version (for persistent storage), version 1.0 in the example
The deviceCount command enumerates the available virtual devices.
Device type instances are indexed from zero. The response shown here means that the only virtual device available is Air.
The frequency command changes the update frequency of all sensor modules globally, that is for all devices on all platforms.
The following update frequencies can be set, if enabled in the product:
- finger: activated when objects with characteristics matching regular fingers are detected.
- stylus: activated for narrow stylus-like objects. (Not enabled for Neonode Touch Sensor Module.)
- idle: activated when no objects are detected, in order to minimize power usage.
The unit is Hz.
The response contains the current frequency settings of the product:
In this example, the sensor module update frequency will be 30 Hz as long as finger-like objects were recently detected. When no objects are detected, the frequency will drop to 10 Hz.
There are a number of different sensor module products that can co-exist on the same physical device. There are some product-specific commands, but the ones listed here are general.
The Touch Sensor Module will be used as example, which means that the device address will be the first Air virtual device
The sensor module can be configured to send an Up (touch event) after Down within a defined threshold to create an instant touch experience. With Click on Touch enabled, Down is sent immediately when a touch object has been identified by the sensor, but Up is sent earlier than normal depending on the sub-mode.
clickOnTouchTime is measured in milliseconds (ms), and clickOnTouchRadius is measured in 1/10 mm.
currentTouchMode is one of the following:
- normal: sends Down when initial touch is detected, and Up when the object is no longer reported.
- clickOnTouch: sends Down when initial touch is detected, and Up earlier than normal depending on the sub-mode.
clickOnTouch be set as instant or defined by a threshold:
If clickOnTouchTime is larger than 0 - A threshold is applied. Click on Touch will then only be applied if the tracked object is located within clickOnTouchRadius in the duration of clickOnTouchTimer.
|1/10 mm||Click On Touch will only be applied if the tracked object is located within clickOnTouchRadius in the duration of clickOntouchTimer.|
The operationMode command sets what processing to perform on the sensor modules signals, and what diagnostics that are exposed.
The following example sets the operation mode to normal object detection:
As can be seen gestures are missing in the response. This is a valid response, since the device is built with a subset of the protocol, or an older forward-compatible version.
The touchFormat command retrieves the binary format of the detected objects.
The touchDescriptor is a bit string, where each bit signifies one byte of payload being included in the touchNotification octet strings. A touchNotification is the concatenation of those bytes. The following table lists all bits. Bits used in the example are marked green.
|event||Up/Down/Move||0=Down; 1=Move; 2=Up; 3=Invalid; 4=Ghost|
|loc-x-byte2||X expanded||for higher precision|
|loc-x-byte3||X expanded||for higher precision|
|loc-y-byte2||Y expanded||for higher precision|
|loc-y-byte3||Y expanded||for higher precision|
|loc-z-byte2||Z expanded||for higher precision|
|loc-z-byte3||Z expanded||for higher precision|
|size-x-byte2||X size||for higher precision|
|size-x-byte3||X size||for higher precision|
|size-y-byte2||Y size||for higher precision|
|size-y-byte3||Y size||for higher precision|
|size-z-byte2||Z size||for higher precision|
|size-z-byte3||Z size||for higher precision|
|confidence||Confidence||Ignore. This value is not reliable for the Touch Sensor Module.|
Location and size coordinates can be specified with up to 3 bytes. The byte order in decreasing significance - big-endian. For example:
- 1 byte: location x = loc-x-byte1
- 2 bytes: location x = (loc-x-byte1 << 8) + loc-x-byte2
- 3 bytes: location x = (loc-x-byte1 << 16) + (loc-x-byte2 << 8) + loc-x-byte3
Location is signed, and size is not.
The location coordinate scale is one of two systems, depending on which detector is used:
- Physical: Robair Air and Core detectors: The unit is 0.1 mm. A coordinate value of 463 thus means 46.3 mm from origin.
- Relative: Triangles and Shape Air detectors: Fraction of the largest screen dimension as fixed point with 14 bits after the radix point (q14). On a widescreen display, the horizontal axis ranges [0, 214[, and vertical [0, 214 * 9/16[ ([0, 16383], [0, 9215]).
Touch Sensor Module uses Robair, thus the unit is 0.1 mm.
Size is in mm.
Confidence and pressure are fractions of the full values, in percent.
The enable command activates the Touch Sensor Module, and notifications of detections start to stream.
To deactivate the Touch Sensor Module, send the disable command:
A detected object is reported with a touchNotification. The touchNotification payload is a touchDescriptor bit string. Every concurrently tracked object is represented by its own touchNotification payload.
The following table shows the value of the example payload interpreted with the touch descriptor.
|event||Up/Down/Move||0=Down; 1=Move; 2=Up; 3=Invalid; 4=Ghost||1|
|loc-x-byte2||X expanded||for higher precision||54|
|loc-y-byte2||Y expanded||for higher precision||115|
The touchNotification is from a Core device and translates to "Object 0 moved. Location is (31.0, 11.5) mm. Size is 10x10 mm."
NotificationTimestamp is a 32-bit integer that represents the timestamp for the notification. Note, that information about several touches can be present in one touch notification. Therefore several touches can have the same timestamp.
The timestamp is based on an internal timer with a frequency of 32768 +-5% Hz. Note, when the timestamp has reached the max value of 2,147,483,647, the timestamp will loop around and start counting from zero. This is done approximately after 18 hours.
The command deviceInformation retrieves some information about the virtual device instance.
The response contains the deviceInstanceInformation structure, with the following parts:
The specific type version of the virtual device.
Size in unit 0.1 mm. See section Touch Format for the relationship to location coordinates.
Only applicable for Core devices. The number of sensor arrays, each monitoring one dimension/axis of a touch sensor. Generally 2.
Some configurations of the Touch Sensor Module can be changed at run-time. The deviceConfiguration request command and command response are identical, except some configuration items in the request may be omitted in order to leave them in their current state.
For instance, to set object size restrictions only, omit all other items:
The command response contains the state of all configuration items:
The items are:
- subTouchActiveArea: Crop the sensor module to a rectangle between the specified low and high coordinates in each dimension. Offset can be applied and flip the X and Y axis. Origin of reported locations is set to low coordinates, or if reversed, the high coordinate with increasing coordinates toward low.
- sizeRestriction: Limit detection to objects within this size range. Unit is 0.1 mm.
- detectionMode, one of the following:
- default: finger and stylus
- finger: Finger only
- mergeTouches: Merges all touch objects into one
- insensitiveFTIR: Unsupported
- reflectiveEdgeFilter: Useful when there is a risk that there is a highly reflective material right outside the active touch area.
- numberOfReportedTouches: Maximum number of reported tracked objects.
- hidDisplaySize: Scaling the coordinate system when using the sensor module in HID Touch Digitizer mode.
- floatingProtection: Enables a filter for similar response time independent of touch position inside the active touch area. Time is set in milli seconds (ms).
Boot Complete Notification
Startup notification, indicating reset causes, proper ASIC function and global state before reset, in case of watchdog reset.
- asicExists (0), if the Asic is identified.
- asicNotFound (1), if the Acis cant be found.
- powerUp (0), Default power up
- rstLow (1), Reset pin
- watchdogExpired (2), Watch dog activate
- flashViolation (3), Flash Violation
- nonMaskableInterrupt (4), reset due to non maskable interrupt
- lowPower (5), Low Power (NEW in 1.10)
- software (6) , Software Reset. (NEW in 1.10)
Read More about the Communication Protocol
- Serialization Protocol Quick Start
- USB HID Transport
- I2C Transport
- zForce Message Specification
- Understanding the zForce ASN.1 Serialization Protocol