Migration guide: operational modes, trigger methods and motions
NIMMSTA Core Library and WebSocket integrations
This guide explains how to migrate from the legacy trigger, aim and picking settings to the unified operational-mode configuration. It also covers gesture selection and gesture-event handling. Follow Part 1 for a WebSocket client or Part 2 for an application that integrates the Core Library directly.
Use a Core Library or WebSocket application release containing these APIs. Device support depends on the device's CRP protocol version, as described below; the CRP version is separate from the Core Library artifact version.
What changes for both integration types
Configure these three things explicitly:
| Setting | Purpose | Example |
|---|---|---|
| Operational mode | Selects the scanner behavior. | Standard, Continuous or PickingList |
| Selected trigger methods | Selects which inputs may start scanning in that mode. | Button and DoubleTap |
| Trigger gesture | Selects the gesture recognized by the gesture sensor. | DoubleTap |
For example, double-tap scanning needs both the DoubleTap gesture selection and DoubleTap in the operational mode's selectedTriggerMethods. Selecting a gesture alone does not add it to the allowed scan triggers. Conversely, adding a trigger method does not select that sensor gesture. Button and touch do not require a gesture selection.
The trigger-event configuration controls what starts scanning. It is separate from receiving application events such as TriggerEvent or GestureEvent. Receiving a gesture event does not by itself mean that a scan was started.
Supported modes and trigger methods
| Mode | Replaces / purpose | Supported selectedTriggerMethods |
|---|---|---|
Standard |
Legacy default aiming / ordinary scanning | Button, Touch, SingleTap, DoubleTap, StopMotion |
Continuous |
Legacy ContinuousScanning |
Button, Touch, SingleTap, DoubleTap, StopMotion |
PickingList |
Legacy PickingMode |
Button, Touch, SingleTap, DoubleTap |
FlowMotion |
Dedicated Flow Motion mode | Empty set; the mode manages its own motion trigger |
Disabled |
Disable scanning | Empty set |
FlowMotion is an operational mode, not a TriggerMethod or TriggerGestureType. On CRP 1.13 and newer, the library selects its required Stop Motion sensor configuration automatically and restores the selected gesture when you leave Flow Motion.
Pass only methods supported by the chosen mode. Unsupported methods are filtered out. If a non-empty selection contains only unsupported methods, it becomes the mode's complete supported set. For example, PickingList with only StopMotion enables Button, Touch, SingleTap and DoubleTap; it does not disable scanning.
An explicitly empty set disables selectable trigger methods in Standard, Continuous and PickingList. Flow Motion still manages its own trigger with an empty set. Use Disabled when your intention is to disable scanning.
Translating existing settings
| Existing configuration | Replacement |
|---|---|
preferredAimMode = Default |
type = Standard |
preferredAimMode = ContinuousScanning |
type = Continuous |
preferredAimMode = PickingMode or preferredPickingMode = ENABLED |
type = PickingList |
preferredTriggerMode = Button, Touch or ButtonAndTouch |
Corresponding methods in selectedTriggerMethods |
A Motion… / legacy Gesture… trigger combination |
Keep the intended button/touch methods; explicitly add the required gesture method and select the matching gesture |
preferredTriggerMode = Disabled |
type = Disabled, with no methods, when disabling scanning |
DefaultEnabled |
Store and restore an explicit operational-mode configuration, or clear a device override to inherit the manager default |
interpretButtonAsMotionTrigger = true |
Select DeviceDefault, or preferably a specific gesture, and explicitly choose allowed scan triggers |
interpretButtonAsMotionTrigger = false |
Select gesture Disabled; configure button/touch scanning separately |
Gesture name AnyMotion |
Rename to StopMotion; its numeric gesture value remains 2 |
Repeated aiming and compound aim modes, such as PickingModeContinuousScanning, have no equivalent in the new model. Legacy setters reject those values. Choose one of the supported modes when migrating such a workflow.
Do not mix legacy trigger/aim/picking setters with the new operational-mode settings. The legacy setters update the same underlying configuration and can overwrite your new selection. Legacy motion mappings can also enable more gesture methods than a deliberately chosen explicit set.
Upgrading older Web Library gesture modes
Web Library 8.0.6737, bundled with NIMMSTA App 7.5.5, misread the host's motion-support flag and sent ButtonAndTouch for all four legacy gesture modes. Current Web Library versions preserve the requested combination:
| Legacy request | Requested trigger sources after upgrading |
|---|---|
Gesture |
Motion only |
ButtonAndGesture |
Button and motion |
TouchAndGesture |
Touch and motion |
ButtonTouchAndGesture |
Button, touch and motion |
An unchanged integration can therefore gain motion scanning and lose button or touch triggers it previously relied on. Motion scanning requires compatible firmware and gesture configuration. When migrating to operational modes, explicitly include every required trigger method and select the matching gesture. Use ButtonAndTouch if that is the legacy behavior you intend to retain.
Defaults and overrides
Both operational mode and gesture selection resolve independently:
- A device-specific selection takes precedence.
- Otherwise, the connection-manager selection applies, including to devices that connect later.
- Without either selection, operational mode falls back to device configuration/library defaults; gesture selection falls back to
DeviceDefault.
A device operational-mode override replaces the whole mode and trigger-method set; it does not merge with the manager default. A gesture override is independent of that mode override. DeviceDefault is a concrete gesture selection, not a request to inherit the manager's selection.
Set application defaults during startup and restore device overrides as part of connection setup. These are host-side preferences, not a promise of permanent storage in the scanner across application restarts.
NIMMSTA App upgrades from 7.5.5 to 7.6
On Android and Windows, NIMMSTA App 7.5.5 automatically saved a scan mode and trigger-method selection during initial setup, even if the user never changed them. Version 7.6 retains those values for settings that remain editable. A fresh installation without a saved selection follows the bundled configuration. Upgraded installations can therefore retain different values for editable settings under the same App version and configuration.
Fields marked disabledInApp: true are authoritative: the App applies the configuration value after resolving saved settings and prevents edits that conflict with it. This applies at startup, when settings are reapplied, and when the user edits other scan settings.
| Configuration field | Effect when locked |
|---|---|
pickingMode |
Requires or excludes picking-list mode according to the configured value |
continuousScan |
Requires or excludes continuous mode according to the configured value |
touchToScan |
Uses the configured touch-trigger selection |
motionToScan / legacy motionTrigger |
Uses the configured motion-trigger selection; motion-off also excludes Flow Motion |
multiDevices / legacy multiDevice |
Uses the configured multi-device connection setting |
shutdownWhileCharging |
Uses the configured shutdown-on-charge setting |
For example, appSettings.settings.motionToScan set to {"defaultValue": false, "disabledInApp": true} removes motion triggers from a previously saved mode. Editable mode, button and touch choices are retained where compatible. A locked-on mode takes precedence over a conflicting saved mode; the editor disables incompatible choices.
When all four scan-mode fields are locked, the App ignores its saved mode and inherits Core's complete file mode and trigger-method selection every time, including its button selection. This condition refers to picking, continuous, touch and motion settings.
The global App lock, appSettings.configurableFromApp: false, enforces the configured scan mode, multi-device connection and shutdown-on-charge settings regardless of their individual disabledInApp flags. Their App controls are disabled. The separate Motion Selection (gesture) control retains its existing behavior and saved choice. Integrations can still override settings per device through the API; this flag does not make the complete configuration immutable. The maximum-device limit comes from the configuration independently of saved App choices.
Boolean defaults are read from appSettings.settings.<field>.defaultValue, with flat appSettings.<field> values as a fallback. An explicit appSettings.operationalMode.type and appSettings.operationalMode.selectedTriggerMethods take precedence over the legacy booleans when deriving the configuration mode. A full lock therefore applies that exact mode and trigger set. Windows receives the per-field defaults and locks through the Core configuration-bundle export; use matching App and Core releases containing this support.
Resolving locks does not overwrite saved selections with file defaults. Once a field becomes editable again, the saved selection can apply again. The App-wide policy follows the usual device-override precedence described above.
Decoder parameters such as barcode symbologies come from decoderboardSettings in hs50_settings.json, without merging saved App choices. Core loads the file defaults at App/backend startup, initializes new device objects with them and sends their current decoder settings during connection setup. Integrations can replace those settings through the API; reconnecting the same device object sends its current settings instead of reloading the file. The global App lock and the scan-mode lock handling do not change this behavior.
For editable fields, later configuration defaults still do not replace saved selections. On Windows, loading a configuration with a different ID clears stored App settings; changing defaults under the same ID does not. Android retains saved settings across restarts and configuration changes until App storage is cleared, which also removes other locally stored App data. Manually selecting a mode replaces the saved selection; it does not restore following defaults for editable fields.
Part 1 — WebSocket integrations
1. Replace legacy scan settings
Move preferredTriggerMode, preferredAimMode and preferredPickingMode out of SetDeviceSettings. Keep using SetDeviceSettings for unrelated settings such as prefersReconnect and prefersShutdownOnCharge.
For example, replace this button-only picking configuration:
{
"type": "DEVICE_REQUEST",
"device": "E1:98:8B:41:2A:70",
"id": 1,
"action": {
"name": "SetDeviceSettings",
"data": {
"preferredTriggerMode": "Button",
"preferredPickingMode": "ENABLED"
}
}
}
With:
{
"type": "DEVICE_REQUEST",
"device": "E1:98:8B:41:2A:70",
"id": 2,
"action": {
"name": "SetOperationalModeForDevice",
"data": {
"selectedOperationalMode": {
"type": "PickingList",
"selectedTriggerMethods": ["Button"]
}
}
}
}
To set a default for all devices without their own override, use the general action:
{
"type": "GENERAL_REQUEST",
"id": 3,
"action": {
"name": "SetOperationalMode",
"data": {
"selectedOperationalMode": {
"type": "Standard",
"selectedTriggerMethods": ["Button", "DoubleTap"]
}
}
}
}
Always include selectedTriggerMethods. Omitting it is equivalent to an empty array, not “enable defaults.” Each request replaces the whole configuration; include all methods you want to retain. Unknown mode or method names fail the request.
There is no separate public WebSocket ConfigureTriggerEvents action. Set selectedTriggerMethods through these operational-mode actions; the library sends the required device commands.
2. Select the gesture separately
For the preceding default to support double-tap scanning, also set the manager gesture:
{
"type": "GENERAL_REQUEST",
"id": 4,
"action": {
"name": "SetGestureType",
"data": { "triggerGesture": "DoubleTap" }
}
}
To override the gesture for a particular device:
{
"type": "DEVICE_REQUEST",
"device": "E1:98:8B:41:2A:70",
"id": 5,
"action": {
"name": "SetGestureTypeForDevice",
"data": { "gestureType": "SingleTap" }
}
}
The field names differ: triggerGesture for the manager, gestureType for a device. If this device should scan on Single Tap, also set its operational mode with SingleTap among its selected methods.
Both actions accept the names Disabled, DeviceDefault, StopMotion, SingleTap and DoubleTap, or their numeric values 0, 1, 2, 4 and 5. Prefer names and do not use the reserved Unused value 3.
Remove interpretButtonAsMotionTrigger from SetConnectionManagerSettings. That compatibility field maps true to DeviceDefault and false to Disabled; it does not provide the new explicit trigger-method configuration.
3. Handle overrides and inspect configuration
Clear a device's operational-mode override to restore manager inheritance:
{
"type": "DEVICE_REQUEST",
"device": "E1:98:8B:41:2A:70",
"id": 6,
"action": {
"name": "SetOperationalModeForDevice",
"data": { "selectedOperationalMode": null }
}
}
The same null value in the general SetOperationalMode action clears the manager default. An omitted selectedOperationalMode is an error, not a reset.
The current WebSocket gesture actions do not clear a gesture override when passed null. Setting DeviceDefault also leaves a device override in place. If you require centralized gesture management, use the manager action consistently; for devices already given an override, explicitly update those devices when changing the common gesture.
Use these read actions with the usual request envelope:
| Action | Request type | Relevant response fields under action.data |
|---|---|---|
GetInitialConnectionManagerInfos |
GENERAL_REQUEST |
settings.selectedOperationalMode, settings.selectedTriggerGesture, and device lists |
GetDeviceInfo |
DEVICE_REQUEST |
selectedOperationalMode, actualOperationalMode, deviceSupport |
GetGestureType |
DEVICE_REQUEST |
gestureType |
selectedOperationalMode describes the device override; actualOperationalMode describes the resolved host configuration after inheritance. Legacy response fields such as preferredTriggerMode are compatibility projections and cannot describe the full new configuration. GetGestureType reports the resolved user gesture selection; during Flow Motion, the library applies Stop Motion to the sensor separately.
Match responses by request id and handle action.success: false. Preference-action success confirms the host setting was accepted; applying it to a connected scanner is asynchronous. The returned configuration is not a firmware readback or a guarantee that older firmware can perform every selected behavior.
Requests containing deprecated fields return action.isDeprecated: true and action.replaceWith. These fields are omitted for SetDeviceSettings requests containing only supported, unrelated settings.
4. Update gesture-event parsing
Handle this event shape:
{
"type": "EVENT",
"device": "E1:98:8B:41:2A:70",
"event": {
"name": "GestureEvent",
"data": {
"type": 4,
"timeStamp": 123456,
"gestureTypeRawValue": 4,
"gestureType": "SingleTap"
}
}
}
Read the gesture name from event.data.gestureType, the raw code from event.data.gestureTypeRawValue (also exposed as type), and the device timestamp from event.data.timeStamp. The spelling and capitalization matter: timestamp and deviceTimestamp are not WebSocket payload fields. The device address is at the top level.
Replace event-name comparisons against AnyMotion with StopMotion. Preserve handling of unknown gesture values; they resolve to Undefined, while the raw value remains available. Gesture selection values and reported event types are different enums: for example, selection 1 is DeviceDefault, but event type 1 is NoMotion; selection 3 is reserved, but event type 3 is WristNick.
Part 2 — Direct Core Library integrations
The following examples use Kotlin and Java on Android/JVM. connectionManager refers to your existing manager and device to your NIMMSTADevice.
1. Replace legacy property assignments
Replace:
device.preferredTriggerMode = ChangeTriggerModeRequest.ScanTriggerMode.Button
device.preferredPickingMode = ChangeTriggerModeRequest.ScanPickingMode.ENABLED
With:
import com.nimmsta.core.shared.device.OperationalMode
import com.nimmsta.core.shared.device.OperationalModeType
import com.nimmsta.core.shared.device.TriggerMethod
import com.nimmsta.core.shared.textprotocol.request.TriggerGestureType
device.selectedOperationalMode = OperationalMode(
OperationalModeType.PickingList,
setOf(TriggerMethod.Button)
)
For a manager default with button and double-tap scanning:
connectionManager.selectedOperationalMode = OperationalMode(
OperationalModeType.Standard,
setOf(TriggerMethod.Button, TriggerMethod.DoubleTap)
)
connectionManager.selectedTriggerGesture = TriggerGestureType.DoubleTap
Java equivalent:
import com.nimmsta.core.shared.device.OperationalMode;
import com.nimmsta.core.shared.device.OperationalModeType;
import com.nimmsta.core.shared.device.TriggerMethod;
import com.nimmsta.core.shared.textprotocol.request.TriggerGestureType;
import java.util.Arrays;
import java.util.HashSet;
connectionManager.setSelectedOperationalMode(new OperationalMode(
OperationalModeType.Standard,
new HashSet<>(Arrays.asList(TriggerMethod.Button, TriggerMethod.DoubleTap))
));
connectionManager.setSelectedTriggerGesture(TriggerGestureType.DoubleTap);
Set manager defaults before connecting devices. Device selections can be assigned during your connection setup, for example in didStartConnecting. Updating these preferences while connected schedules their application automatically; property assignment does not wait for a firmware acknowledgement.
2. Migrate the remaining legacy API usage
| Legacy API | Replacement |
|---|---|
preferredTriggerMode, preferredAimMode, preferredPickingMode |
One selectedOperationalMode assignment containing both mode and methods |
defaultEnabledTriggerMode |
An explicit selectedOperationalMode; keep any configuration you need to restore in your application |
NIMMSTADevice.PREFERRED_TRIGGER_MODE, PREFERRED_AIM_MODE, PREFERRED_PICKING_MODE |
Prefer connectionManager.selectedOperationalMode; PREFERRED_OPERATIONAL_MODE is the library fallback |
connectionManager.interpretButtonAsMotionTrigger |
connectionManager.selectedTriggerGesture, plus the intended methods in the operational mode |
TriggerGestureType.AnyMotion |
TriggerGestureType.StopMotion |
GestureEvent.GestureType.AnyMotion |
GestureEvent.GestureType.StopMotion |
If your integration used an earlier API revision exposing separate operational-mode and trigger-event commands, migrate to selectedOperationalMode. The CRP request types and the mode/trigger application methods are internal; applications should not call applyOperationalMode or configureOperationalModeTriggerEvents, or build raw ConfigureTriggerEvents requests.
Use selectedTriggerGesture for a managed preference that the library reapplies during connection setup. device.api.setGestureType(...) remains a direct, asynchronous request and supports enum, string and integer arguments, but it does not update the device or manager preference. A later preference application can replace that direct setting. The direct request requires CRP 1.12 or newer and fails with UnsupportedAPIException on unsupported devices.
3. Manage device overrides explicitly
// Configure one device independently of the manager defaults.
device.selectedOperationalMode = OperationalMode(
OperationalModeType.PickingList,
setOf(TriggerMethod.Button, TriggerMethod.SingleTap)
)
device.selectedTriggerGesture = TriggerGestureType.SingleTap
// Read the resolved host preferences.
val resolvedMode = device.actualOperationalMode
val resolvedGesture = device.actualTriggerGesture
// Restore inheritance for both independent preferences.
device.selectedOperationalMode = null
device.selectedTriggerGesture = null
Java uses device.setSelectedOperationalMode(null) and device.setSelectedTriggerGesture(null) to restore inheritance, and getActualOperationalMode() / getActualTriggerGesture() to read the resolved values.
To disable scanning without discarding your chosen gesture:
val previousSelection = device.selectedOperationalMode
device.selectedOperationalMode = OperationalMode(
OperationalModeType.Disabled,
emptySet()
)
// Later, restore the previous override, or inheritance if it was null.
device.selectedOperationalMode = previousSelection
The resolved properties describe host intent, not a firmware query. During Flow Motion, actualTriggerGesture continues to report the user selection even though Stop Motion is applied to the sensor. Check device capabilities when your workflow requires a behavior that has no exact legacy equivalent.
4. Update gesture-event handling
Inside your existing NIMMSTAEventHandler.didReceiveEvent callback, use the typed event fields:
if (event is GestureEvent) {
val gesture = event.gestureType
val rawValue = event.gestureTypeRawValue
val deviceTimestamp = event.deviceTimestamp
// Handle the gesture, including GestureEvent.GestureType.Undefined.
}
Import com.nimmsta.core.shared.textprotocol.event.GestureEvent. Java exposes the same data through getGestureType(), getGestureTypeRawValue() and getDeviceTimestamp().
Event types are StopMotion (2), SingleTap (4), and DoubleTap (5).
5. Review configuration-file and reset code
Assigning device.hs50Settings also assigns an operational mode derived from those settings. Load the settings first, then apply your intended device override, or set device.selectedOperationalMode = null to restore manager inheritance.
For settings without an explicit operationalMode, the legacy mapping always includes Button, adds Touch when touchToScan is enabled, and adds gesture methods when motionTrigger is enabled. pickingMode selects PickingList; continuousScan selects Continuous. A settings file enabling both falls back to Standard.
Reading device.hs50Settings returns an immutable snapshot with an exact operationalMode, including individually selected gesture triggers. Its legacy mode flags reflect that mode. Use copy to edit a snapshot: device.hs50Settings = device.hs50Settings!!.copy(touchToScan = false) removes only the touch trigger, preserving the mode and other selected triggers. Changing motionTrigger enables or disables the gesture triggers supported by the mode. Changing the picking/continuous flags uses the legacy type mapping while retaining only supported selected triggers. Unchanged flags and decoder-only edits preserve the exact mode, including Flow Motion and Disabled.
Passing operationalMode explicitly to the constructor or copy takes precedence over legacy flags; passing null returns to legacy mapping. HS50Settings is a regular immutable class with value equality, hashing, destructuring, and a custom copy method.
resetDeviceToDefault() no longer takes arguments. After a reset, the device follows the connection manager's selections again; set device-specific selections afterwards if needed.
Device compatibility and rollout checks
Firmware behavior
| Device protocol | Behavior |
|---|---|
| CRP 1.13 or newer | Separate operational-mode and trigger-event commands; full new mode model, including Flow Motion |
| CRP 1.12 | Gesture selection supported; operational mode uses the legacy trigger/aim mapping |
| CRP 0.8 through 1.11 | Legacy trigger/aim mapping; no SetGestureType request |
| Earlier than CRP 0.8 | Operational-mode preferences are not sent to the scanner |
On older protocols, Standard, Continuous and PickingList map to their legacy aim modes. Individual gesture methods collapse to the legacy motion-trigger flag, so exact per-gesture filtering is unavailable. If motion triggers are unsupported, the library removes motion while retaining requested button/touch sources; a gesture-only selection can therefore leave no active triggers.
FlowMotion falls back to Standard aiming with legacy motion, button and touch enabled where supported. It does not provide Flow Motion behavior on older firmware. Require CRP 1.13 or newer if your application depends on Flow Motion or independently configured gesture trigger methods.
For WebSocket integrations, inspect deviceSupport.supportsSetGestureType, supportsSetOperationalMode and supportsConfigureTriggerEvents in device information. Direct integrations can use the corresponding NIMMSTADeviceSupport checks after device versions are known.
For firmware >= 2.17 and < 2.21 with trigger-event support, the library compensates for a SetGestureType side effect that can re-enable a gesture as a scan trigger. When necessary, it reapplies the configured trigger-event set. Firmware 2.21 fixes this side effect. Keep configuration in the public preference APIs so the library can preserve your intended selection.
Acceptance checklist
- Upgrade the WebSocket application or Core Library dependency to a release containing these APIs before deploying the migrated client.
- Remove legacy trigger/aim/picking writes from all startup, reconnect, settings and reset paths; replace
AnyMotionwithStopMotion. - Test the selected mode with every allowed trigger method and verify that excluded methods do not start scanning.
- Test gesture-event receipt separately from scanning, including a gesture that is recognized but excluded as a scan trigger on supported firmware.
- Test manager defaults, device overrides and reconnects. Verify that changing a manager default preserves device overrides.
- Test disabling and restoring scanning, including a gesture change while scanning is disabled.
- If using Flow Motion, test entering and leaving it and confirm the previous gesture selection is restored.
- Verify behavior on every supported firmware family, especially legacy devices where gesture filtering and Flow Motion cannot be reproduced exactly.
- For WebSocket clients, check request errors and deprecated-field indicators, and parse the exact
GestureEventfield names shown above.