rsm Barcode Scanner Module is used to configure or to retrieve attributes relating to a remote scanner either tethered to the device or connected via Bluetooth. The properties of the scanner which can be configured are detailed in the 'Remarks' section. When used for retrieval navigation to URL or call to javascript function happens immediately. Only the foreground RhoElements application is given access to the device scanner, when an application is sent to the background its state will be saved and it will automatically relinquish control of the Scanner. When brought back to the foreground, an application previously using the scanner will have its previous configuration (eg. selected decoders) reapplied to the scanner automatically. <META HTTP-Equiv="RSM" content="[parameter]"> bluetoothAuthentication See Remarks Sets the BluetoothAuthentication of the connected BT Scanner to the stated value. Device Dependant bluetoothEncryption See Remarks Sets the BluetoothEncryption of the connected BT Scanner to the stated value. Device Dependant bluetoothPinCode See Remarks Sets the BluetoothPINCode of the connected BT Scanner to the stated value. Device Dependant bluetoothPinCodeType See Remarks Sets the BluetoothPINCodeType of the connected BT Scanner to the stated value. Device Dependant bluetoothReconnectAttempts See Remarks Sets the BluetoothReconnectAttempts of the connected BT Scanner to the stated value. Device Dependant bluetoothBeepOnReconnectAttempt See Remarks Sets the BluetoothBeepOnReconnectAttempt of the connected BT Scanner to the stated value. Device Dependant bluetoothHidAutoReconnect See Remarks Sets the BluetoothHIDAutoReconnect of the connected BT Scanner to the stated value. Device Dependant bluetoothFriendlyName See Remarks Sets the BluetoothFriendlyName of the connected BT Scanner to the stated value. Device Dependant bluetoothInquiryMode See Remarks Sets the BluetoothInquiryMode of the connected BT Scanner to the stated value. Device Dependant bluetoothAutoReconnect See Remarks Sets the BluetoothAutoReconnect of the connected BT Scanner to the stated value. Device Dependant forceSavePairingBarcode See Remarks Sets the ForceSavePairingBarcode of the connected BT Scanner to the stated value. Device Dependant lowBatteryIndication See Remarks Sets the LowBatteryIndication of the connected BT Scanner to the stated value. Device Dependant lowBatteryIndicationCycle See Remarks Sets the LowBatteryIndicationCycle of the connected BT Scanner to the stated value. Device Dependant scanLineWidth See Remarks Sets the ScanLineWidth of the connected BT Scanner to the stated value. Device Dependant goodScansDelay See Remarks Sets the GoodScansDelay of the connected BT Scanner to the stated value. Device Dependant decodeFeedback See Remarks Sets the DecodeFeedback of the connected BT Scanner to the stated value. Device Dependant ignoreCode128Usps See Remarks Sets the IgnoreCode128USPS of the connected BT Scanner to the stated value. Device Dependant scanTriggerWakeup See Remarks Sets the ScanTriggerWakeup of the connected BT Scanner to the stated value. Device Dependant mems See Remarks Sets the Mems of the connected BT Scanner to the stated value. See remarks Device Dependant proximityEnable See Remarks Sets the ProximityEnable of the connected BT Scanner to the stated value. See remarks. Device Dependant proximityContinuous See Remarks Sets the ProximityContinuous of the connected BT Scanner to the stated value. Device Dependant proximityDistance See Remarks Sets the ProximityDistance of the connected BT Scanner to the stated value. Device Dependant pagingEnable See Remarks Sets the PagingEnable of the connected BT Scanner to the stated value. Device Dependant pagingBeepSequence See Remarks Sets the PagingBeepSequence of the connected BT Scanner to the stated value. Device Dependant pagingActivate See Remarks Sets the PagingActivate of the connected BT Scanner to the stated value. Device Dependant markForRetrievalModelNumber Marks the ModelNumber to be returned when RSMGetEvent is next called. See Remarks. markForRetrievalSerialNumber Marks the SerialNumber to be returned when RSMGetEvent is next called. See Remarks. markForRetrievalDateOfManufacture Marks the DateOfManufacture to be returned when RSMGetEvent is next called. See Remarks. markForRetrievalDateOfService Marks the DateOfService to be returned when RSMGetEvent is next called. See Remarks. markForRetrievalBluetoothAddress Marks the BluetoothAddress to be returned when RSMGetEvent is next called. See Remarks. markForRetrievalFirmwareVersion Marks the FirmwareVersion to be returned when RSMGetEvent is next called. See Remarks. markForRetrievalDeviceClass Marks the DeviceClass to be returned when RSMGetEvent is next called. See Remarks. markForRetrievalBatteryStatus Marks the BatteryStatus to be returned when RSMGetEvent is next called. See Remarks. markForRetrievalBatteryCapacity Marks the BatteryCapacity to be returned when RSMGetEvent is next called. See Remarks. markForRetrievalBatteryId Marks the BatteryID to be returned when RSMGetEvent is next called. See Remarks. markForRetrievalBluetoothAuthentication Marks the BluetoothAuthentication to be returned when RSMGetEvent is next called. See Remarks. markForRetrievalBluetoothEncryption Marks the BluetoothEncryption to be returned when RSMGetEvent is next called. See Remarks. markForRetrievalBluetoothPinCode Marks the BluetoothPINCode to be returned when RSMGetEvent is next called. See Remarks. markForRetrievalBluetoothPinCodeType Marks the BluetoothPINCodeType to be returned when RSMGetEvent is next called. See Remarks. markForRetrievalBluetoothReconnectAttempts Marks the BluetoothReconnectAttempts to be returned when RSMGetEvent is next called. See Remarks. markForRetrievalBluetoothBeepOnReconnectAttempt Marks the BluetoothBeepOnReconnectAttempt to be returned when RSMGetEvent is next called. See Remarks. markForRetrievalBluetoothHidAutoReconnect Marks the BluetoothHIDAutoReconnect to be returned when RSMGetEvent is next called. See Remarks. markForRetrievalBluetoothFriendlyName Marks the BluetoothFriendlyName to be returned when RSMGetEvent is next called. See Remarks. markForRetrievalBluetoothInquiryMode Marks the BluetoothInquiryMode to be returned when RSMGetEvent is next called. See Remarks. markForRetrievalBluetoothAutoReconnect Marks the BluetoothAutoReconnect to be returned when RSMGetEvent is next called. See Remarks. markForRetrievalForceSavePairingBarcode Marks the ForceSavePairingBarcode to be returned when RSMGetEvent is next called. See Remarks. markForRetrievalLowBatteryIndication Marks the LowBatteryIndication to be returned when RSMGetEvent is next called. See Remarks. markForRetrievalLowBatteryIndicationCycle Marks the LowBatteryIndicationCycle to be returned when RSMGetEvent is next called. See Remarks. markForRetrievalScanLineWidth Marks the ScanLineWidth to be returned when RSMGetEvent is next called. See Remarks. markForRetrievalGoodScansDelay Marks the GoodScansDelay to be returned when RSMGetEvent is next called. See Remarks. markForRetrievalDecodeFeedback Marks the DecodeFeedback to be returned when RSMGetEvent is next called. See Remarks. markForRetrievalIgnoreCode128Usps Marks the IgnoreCode128USPS to be returned when RSMGetEvent is next called. See Remarks. markForRetrievalScanTriggerWakeup Marks the ScanTriggerWakeup to be returned when RSMGetEvent is next called. See Remarks. markForRetrievalMems Marks the Mems to be returned when RSMGetEvent is next called. See Remarks. markForRetrievalProximityEnable Marks the ProximityEnable to be returned when RSMGetEvent is next called. See Remarks. markForRetrievalProximityContinuous Marks the ProximityContinuous to be returned when RSMGetEvent is next called. See Remarks. markForRetrievalProximityDistance Marks the ProximityDistance to be returned when RSMGetEvent is next called. See Remarks. markForRetrievalPagingEnable Marks the PagingEnable to be returned when RSMGetEvent is next called. See Remarks. markForRetrievalPagingBeepSequence Marks the PagingBeepSequence to be returned when RSMGetEvent is next called. See Remarks. bluetoothDisconnect Instructs the Bluetooth scanner to disconnect from its associated device. Device Dependant bluetoothUnpair Instructs the bluetooth scanner to unpair from its associated device. Allows the scanner to be associated with a different device Device Dependant rsmGetEvent attributeArrayArray of attribute values. The attributes returned in this array are those registered for by calls to markForRetrievalXXX prior to calling RSMGetEvent. The table in the remarks section gives the possible values associated with each attribute, if an attribute is not supported then 'Unsupported Attribute' will be returned in that attribute's array position. TRUE The following example configures some parameters associated with the remote Bluetooth scanner: <META HTTP-Equiv="Scanner" Content="Enabled:SCN2"> <META HTTP-Equiv="RSM" Content="BluetoothAuthentication:True"> <META HTTP-Equiv="RSM" Content="BluetoothPinCode:5678"> <META HTTP-Equiv="RSM" Content="BluetoothReconnectAttempts:6"> <META HTTP-Equiv="RSM" Content="BluetoothBeepOnReconnectAttempt:True"> <META HTTP-Equiv="RSM" Content="BluetoothPINCodeType:UseStored"> <META HTTP-Equiv="RSM" Content="BluetoothAutoReconnect:OnPowerOutOfRange"> The following example retrieves some attributes of the Bluetooth Scanner: <SCRIPT TYPE="TEXT/JAVASCRIPT"> function onRSMAttributes(jsonObject) { // Receive array of attribute values in the order they were registered and populate SPAN tags. var spanID; var spanElement; for(i=0; i < jsonObject.attributeArray.length; i++) { spanID = "Span" + (i+1); spanElement = document.getElementById(spanID); spanElement.innerText = jsonObject.attributeArray[i]; } } function onTest() { //Invoke some attributes to be returned rsm.markForRetrievalModelNumber(); // Array Index 0 rsm.markForRetrievalSerialNumber(); rsm.markForRetrievalBluetoothAddress(); rsm.markForRetrievalBluetoothPinCode(); rsm.markForRetrievalBluetoothFriendlyName(); rsm.markForRetrievalProximityEnable(); // Array Index 5 // Finally assign a function for RSMGetEvent, this will call onRSMAttributes with the array of parameters we have registered for above. rsm.rsmGetEvent = onRSMAttributes(%json); } </SCRIPT> <HTML> <HEAD> <!-- Scanner must be enabled to use RSM functionality --> <META HTTP-Equiv="Scanner" Content="Enabled:SCN2"> </HEAD> <BODY> <a href="javascript:onTest()">Get Values</a><br> Model Number: <span id=Span1></span><br> Serial Number: <span id=Span2></span><br> BT Address: <span id=Span3></span><br> BT PINcode: <span id=Span4></span><br> BT Friendly Name: <span id=Span5></span><br> Proximity Enable: <span id=Span6></span><br> </BODY> </HTML> The following is a mapping between Attributes, their possible values and whether they are read / write: Attribute Access Associated Value modelNumber R The model number serialNumber R The serial number dateOfManufacture R Date of manufacture as DDMMYY dateOfService R Date of service as DDMMYY bluetoothAddress R Bluetooth address as FF:FF:FF:FF:FF:FF where FF is a hex number. firmwareVersion R Scanner's operating system version. deviceClass R The device class of the system batteryStatus R Indicates the status us the scanner's battery, 'Unknown', 'Full', 'Medium', 'Empty', 'Charging-FullRate', 'Charging-HalfRate', 'Charging-Trickle' or 'Discharging' batteryCapacity R Remaining capacity of the battery, integer in the range '0' to '100'. 'Unknown' if unable to determine, e.g. if no battery in the scanner. batteryID R 'Simple', 'Double', 'Cabled', 'Unknown' bluetoothAuthentication RW 'True' if authentication is required, else 'False' bluetoothEncryption RW True' if encryption is required, else 'False' bluetoothPinCode RW Up to 5 character PIN code used for Bluetooth authentication bluetoothPinCodeType RW 'PromptUser' to prompt the user for the PIN code or 'UseStored' to use the code stored in memory. bluetoothReconnectAttempts RW How long the scanner tries to re-establish connection if it goes out of range, in seconds. This value must be a multiple of 5 and in the range 30 to 60 seconds. bluetoothBeepOnReconnectAttempt RW When 'True' scanner will emit 5 beeps every 5 seconds whilst re-connection in progress, else 'False' bluetoothHidAutoReconnect RW 'NeverReconnect', 'ReconnectOnData' or 'ReconnectImmediately' bluetoothFriendlyName RW Friendly Bluetooth name, e.g. 'MyBTScanner' bluetoothInquiryMode RW 'General' to use a general inquiry mode, else 'Limited' bluetoothAutoReconnect RW Bluetooth reconnection scheme: 'None' - No scheme 'OnPower' - when powered on 'OnOutofRange' - when device goes out of range 'OnPowerOutofRange' - when powered on or when device goes out of range. forceSavePairingBarcode RW Force saving the barcode assigned to the device to which the scanner has been paired. 'Enabled' or 'Disabled' bluetoothDisconnect W Command scanner to disconnect from its connected device. bluetoothUnpair W Command scanner to unpair from its paired device. Allows scanner to associate with a different device. lowBatteryIndication RW Low battery indication 'Enabled' or 'Disabled' lowBatteryIndicationCycle RW Low battery indication cycle time, in seconds ('10', '20', '30', '40' or '50'). scanLineWidth RW The laser scan line width, 'Wide' or 'Narrow'. goodScansDelay RW Delay between good scans in proximity continuous mode, measured in milliseconds. Range 0 to 15000. This value must be a multiple of 100. decodeFeedback RW The remote scanner beeps and illuminates its green LED on a successful decode. 'Enabled' or 'Disabled'. ignoreCode128Usps RW Feature for ignoring Code 128 barcodes beginning with 420 and 421, 'Enabled' or 'Disabled' scanTriggerWakeup RW Scanner trigger will wakeup the device from a low power state, 'Enabled' or 'Disabled' mems RW Mems feature 'Enabled' or 'Disabled' proximityEnable RW Proximity feature 'Enabled' or 'Disabled' proximityContinuous RW Proximity continuous mode 'Enabled' or 'Disabled' proximityDistance RW Specify the distance for the proximity feature as 'Short', 'Medium' or 'Long' pagingEnable RW Specify whether paging the device is 'Enabled' or 'Disabled' pagingBeepSequence RW Range '0' to '15' to specify the pattern for the paging beep sequence. pagingActivate W 'Start' or 'Stop' paging to the scanner. ProximityEnable / Mems If you press the trigger on an RSM scanner proximity enabled will be turned off, even though it still reports its self as being turned on if you query the RSM parameter. In order to use ProximityEnable you need to also have Mems enabled, this is the motion sensor and if you disable Mems the scanner will not function. All supported devices that have the ability to connect to remote scanners. Transient - The RSM parameters are volatile and only the current value of the RSM attribute will be altered. Changes to RSM attributes will persist until the scanner is disabled or a navigation occurs. rsmGetEvent will persist until a navigation occurs. This tag requires appropriate hardware to run, i.e. a remote scanner and a device which supports it. 1.0.0 Scanner