0

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>
Mani
  • 1
  • 2
  • Did you resolve your issue? in my case DeviceMgr.Initialize() does not show any error, but when I type this in console window it does shows "undefined" – user3193257 Dec 09 '15 at 06:39

1 Answers1

1

You should use the barcodes available in DS9808 reference manual to configure it. Chapter 8 is about IBM 468X/469X interface, if this is what you're looking for.

LS2208 is a value tier laser scanner with less options available than the 2D Imager based DS9808.

pfmaggi
  • 6,116
  • 22
  • 43
  • PFM , Appreciate your quick response . – Mani Oct 26 '15 at 15:58
  • 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 added extra coments to my post above . Please go through it and provide your suggestions. Thanks – Mani Oct 26 '15 at 16:16
  • I was able to do a workaround using chrome app to convert the input to text understandable by browser notepad etc . Not sure if that works for you . – Mani Dec 10 '15 at 07:34