I use Motorola Symbol Scanner DS9808 . I am able to scan the barcodes to notepad in normal mode. But when i enable the scanner in IBM Hand-Held USB mode by scanning the barcode available in LS2208 guide, i am no longer able to scan the barcodes to notepad .
I see a new HID device under my Device Manager when i connect this scanner in IBM Hand-Held USB mode .
Any help as in how i can go ahead debugging would be great
Also i do not see much help online for the scanner support with javascript .
#Comment
Now i got hold of a LS2208 scanner and i followed the steps as mentioned earlier . I am not able to send input to notepad etc when i use it as IBM Hand-Held USB .
I tried to debug this issue myself and following is the information . Hope its useful I installed a tool on my laptop which monitors the input from USB devices .
When I scan a 128A barcode whose value is 05 ,
In Set Defaults Mode ,
When scanned the code , an input value of 05 is sent to notepad . And in the tool the output is 000037: Bulk or Interrupt Transfer (UP), 26.10.2015 12:01:25.654 +0.008. (1. Device: USB Input Device) Status: 0x00000000 Pipe Handle: 0x9cf8cd0 (Endpoint Address: 0x81) Get 0x8 bytes from the device 00 00 00 00 00 00 00 00 ........
In IBM Hand-Held USB Mode,
No input is sent to notepad . Output from the monitoring tool is 000005: Bulk or Interrupt Transfer (UP), 26.10.2015 11:22:57.112 +16.722. (1. Device: USB Input Device) Status: 0x00000000 Pipe Handle: 0xdd77130 (Endpoint Address: 0x82) Get 0x40 bytes from the device 09 10 03 00 30 35 00 25 0B 00 00 00 00 00 00 00 ....05.%........ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
From some of the blogs i see that we need some javascript code in a html which would make the scanner send input to textbox . But it did not work for me .
Please let me know if Javascript supports any Scanner APIs which i need to import or if such code works only with C# .
< html >
< body onload = "DevMgrLoad();"
onunload = "DevMgrUnload();" >
< input type = "text"
id = "ctl00_ContentPlaceHolder1_SKU" / >
< /body>
<head>
<object id="DeviceMgr" classid="clsid:745A17A0-74D3-11D0-B6FE-00A0C90F57DA"></object >
< script type = "text/javascript" >
function DevMgrLoad() {
DeviceMgr.Initialize();
}
function DevMgrUnload() {
DeviceMgr.Uninitialize();
} < /script>
<script type="text/javascript
" for="
DeviceMgr " event="
DeviceEvent(strEvent)
">
alert('mani for');
var strEventName;
var nsEvent;
nsEvent = new ActiveXObject("
eSpace.esNamespace ");
nsEvent = nsEvent.ApplyXML(strEvent);
strEventName = nsEvent.Name;
if (strEventName == "
Scanner.DataEvent ")
{
try
{
strEventName = nsEvent.PROPERTIES.Scanner.ScanData;
document.activeElement.value = strEventName;
if (document.activeElement.id != "
ctl00_ContentPlaceHolder1_SKU ")
{
var ctl = document.getElementById(document.activeElement.id);
ctl.value = '';
ctl.focus();
}
else
{
document.activeElement.fireEvent("
onchange ");
}
}
catch(exception)
{
// this occurs when the user scans a field that is not scannable
// ignore the error
}
}
nsEvent = null;
</script>
</head>
</html>