Serial barcode scanner

I have created a vi to read a barcode scanner (Mfg Handheld Model 3800 series) attached to the COM1 serial port. The barcode I am scanning is standard code 39 and after scanning it into Hyper terminal, it matches the label. However, when I scan it using the vi attached, it does not match up. The vi works, it just does not show the correct characters. Any help would be appreciated. Thanks.
Attachments:
Barcode.vi ‏23 KB

So, your Hyperterminal Setup looks like this?  Which specific model of the 3800 do you have?  Handheld list several in that series, none of which are just 3800.  The one I happened to look at, the 3800g, has a default setup which is different than what you have, so I am assuming you changed the basic configuration of the scanner?
Message Edited by Matthew Kelton on 10-22-2007 04:00 PM
Attachments:
HyperTerminal.png ‏20 KB

Similar Messages

  • Adobe form barcode scanner input

    I made an Adobe form with X Pro.  The purpose of the form is to inventory equipment.  I use a barcode scanner to enter serial numbers into the form.  When I scan the barcode (Code 39) of an item the serial number entered into the form is truncated.  To ensure that the scanner was reading the barcode correctly I scanned a code while having notepad open, it input the entire serial number correctly.  I did the same thing with Word and the serial was also input correctly.  Why is the form truncating my serial number?  I can type more in the field if I so wish so I know that a character limit is not the issue.  I checked all of the text box's properties but see nothing incorrect or limiting. 
    Thanks for the help,
    Goob

    Sorry for never replying to your post.  The problem is: I do not know why this is happening.
    Your last sentence "on the Text Area the scan seems to stop before entering all digits but when I scroll back through, they are accurate" makes me think.  As I wrote earlier, "A barcode scanner is basically just an input device like a keyboard", but very much faster.  Somehow it seems that the software acts like it is encountering the carriage return before all the data digits have been processed.
    But somehow it also seems to correct itself in a text area that allows multiple lines, but not in a single-line text field.
    Yet that does not happen with my barcode scanner, but with yours and the o/p's.
    Very confusing!  Does anybody else have some thoughts on this?

  • Barcode scanner input

    Hi .
    I have an application that needs to receive bar code scanner input (the DS6707 from motorola). This application also discusses with 3 or 4 boards that run in parallel (using serial port com). So I have at least 5 threads that are running in parallel: one for each port com, one supervisor, and the main for the user interface.
    I created a control to get the data coming from the barcode scanner, but sometimes I lose some number on my barcode, or sometimes I receive ‘?’ instead of a number.
    If I create a thread that read the standard input, it works, I always receive all my numbers, but the problem is that I have the standard input that is visible and I don’t want.
    I tried to used keyboard methods from the windows library , but I don’t know how to proceed.
    Thanks for your help.

    I have a question about a keyboard wedge scanner input.
    I have a single panel with several text boxes placed in a grid.
    I post the output from 8 flash programmers in the boxes.
    I have a single wide text box below these to display general program status.
    My problem is when I scan the barcodes from the panel array, all data goes
    through the Upper Left text box. i want the data to go through the big box on the bottom.
    The reason I am using the text box in the upper left, is because that is where the data went
    when I scanned the bar codes. I was desperate to get the project moving forward.
    And the StdIO window caused too many problems.
    Question,  How do I move the cursor to the other text box ? I have tried many Set / Get
    Attribute parameters.  If there exists any "how-To" example code I would be grateful.
    void ReadSerialNumber1 (char* BigBuffer9)
     statspanelHandle  = TESTER_DialogGetSubPanelCVIHandle(&StatsHandle);
     statspanelHandle  = GetCtrlVal (StatsHandle, STATSPANEL_TEXTBOX_2, BigBuffer9);
     DisplayPanel(StatsHandle);
     fprintf(Stream1,"Serial Number..~%s~\n",BigBuffer9);
    code in main section
      sprintf(LittleBuffer1,"\n  -- SCAN Serial Number Nest 1-- ");
      WriteTextBox1(LittleBuffer1);
      PN_Size = strlen(LittleBuffer1);
      for(x=0;x<128;x++){ LittleBuffer1[x] = '\0';}
      PN_Size = strlen(LittleBuffer1);
      while(PN_Size != 10){
         int Stat_Val;
         Delay(0.5);  
      ReadSerialNumber1(LittleBuffer1);
         PN_Size = strlen(LittleBuffer1);
      if(TEST_CHECK_BREAK) break;
      if(PN_Size == 10)  Ready_Go = 1;
      strcpy(sSerialNum1,LittleBuffer1);
      strcpy(Scan_Buffer[0],LittleBuffer1);
      if(!strcmp(ModuleType2,"DSM")) strcpy(Scan_Buffer[1],LittleBuffer1);
      ResetTextBox2();
      if(TEST_CHECK_BREAK) break;
      sprintf(LittleBuffer1,"____%s____",Scan_Buffer[0]);  
      WriteTextBox1(LittleBuffer1); 
      Ready_Go = 0;

  • Making barcode scanner work

    Hello,
    I am stuck here with the barcode scanner "Symbol LS2208" via USB and have to use it in a Java app. I am using jdk 1.5 and downloaded the javax.comm API. Now i have some problems with which I hope one of you can help me. Is there a way to read from the scanner via USB, because as far as I can see the javax.comm API supports only serial ports and does the whole thing work with JDK 1.5, as javax.comm seems to have been written for JDK 1.2? I really would appreciate if one could get me started at least with some helpful documentation or examples...actually anything :-)

    I don't know about reading the USB input directly, and I don't know about your particular scanner.
    However, I have a Symbol LS4000 that I use in keyboard emulation mode. Is that an option for you? Or does it have to be the raw USB input?
    If you can use keyboard emulation mode, you'll probably have to configure the scanner to do that. For the one I have, the scanner gets configured by scanning various barcodes in the manual.
    So check with your prof or get the docs for the scanner. You'll need that as well as whatever Java knowledge is relevant for the approach you choose.

  • Bluetooth to Socket CHS 7P barcode scanner

    I'm trying to use my Socket CHS 7P on a fully up-to-date ArchLinux system. I've followed instructions on both Bluetooth Mouse and Bluetooth Keyboard but it doesn't help. hcidump seems to reveal that the device connects successfully for a brief second but then disconnects instantly.
    Here is the hcidump after running hidd --connect:
    HCI sniffer - Bluetooth packet analyzer ver 1.42
    device: hci0 snap_len: 1028 filter: 0xffffffff
    < HCI Command: Create Connection (0x01|0x0005) plen 13
    > HCI Event: Command Status (0x0f) plen 4
    > HCI Event: Connect Complete (0x03) plen 11
    < HCI Command: Read Remote Supported Features (0x01|0x001b) plen 2
    > HCI Event: Command Status (0x0f) plen 4
    > HCI Event: Read Remote Supported Features (0x0b) plen 11
    < ACL data: handle 12 flags 0x02 dlen 10
    L2CAP(s): Info req: type 2
    > HCI Event: Max Slots Change (0x1b) plen 3
    < HCI Command: Remote Name Request (0x01|0x0019) plen 10
    > HCI Event: Command Status (0x0f) plen 4
    > ACL data: handle 12 flags 0x02 dlen 12
    L2CAP(s): Info rsp: type 2 result 1
    Not supported
    < ACL data: handle 12 flags 0x02 dlen 12
    L2CAP(s): Connect req: psm 1 scid 0x0040
    > ACL data: handle 12 flags 0x02 dlen 16
    L2CAP(s): Connect rsp: dcid 0x0059 scid 0x0040 result 1 status 2
    Connection pending - Authorization pending
    > ACL data: handle 12 flags 0x02 dlen 16
    L2CAP(s): Connect rsp: dcid 0x0059 scid 0x0040 result 0 status 0
    Connection successful
    < ACL data: handle 12 flags 0x02 dlen 12
    L2CAP(s): Config req: dcid 0x0059 flags 0x00 clen 0
    > HCI Event: Remote Name Req Complete (0x07) plen 255
    > ACL data: handle 12 flags 0x02 dlen 14
    L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 0
    Success
    > ACL data: handle 12 flags 0x02 dlen 16
    L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 4
    MTU 48
    < ACL data: handle 12 flags 0x02 dlen 18
    L2CAP(s): Config rsp: scid 0x0059 flags 0x00 result 0 clen 4
    MTU 48
    < ACL data: handle 12 flags 0x02 dlen 24
    L2CAP(d): cid 0x0059 len 20 [psm 1]
    SDP SSA Req: tid 0x0 len 0xf
    pat uuid-16 0x1200 (PNPInfo)
    max 65535
    aid(s) 0x0000 - 0xffff
    cont 00
    > HCI Event: Number of Completed Packets (0x13) plen 5
    > ACL data: handle 12 flags 0x02 dlen 14
    L2CAP(d): cid 0x0040 len 10 [psm 1]
    SDP SSA Rsp: tid 0x0 len 0x5
    count 2
    cont 00
    < ACL data: handle 12 flags 0x02 dlen 24
    L2CAP(d): cid 0x0059 len 20 [psm 1]
    SDP SSA Req: tid 0x1 len 0xf
    pat uuid-16 0x1124 (HID)
    max 65535
    aid(s) 0x0000 - 0xffff
    cont 00
    > ACL data: handle 12 flags 0x02 dlen 14
    L2CAP(d): cid 0x0040 len 10 [psm 1]
    SDP SSA Rsp: tid 0x1 len 0x5
    count 2
    cont 00
    < ACL data: handle 12 flags 0x02 dlen 12
    L2CAP(s): Disconn req: dcid 0x0059 scid 0x0040
    > ACL data: handle 12 flags 0x02 dlen 12
    L2CAP(s): Disconn rsp: dcid 0x0059 scid 0x0040
    < ACL data: handle 12 flags 0x02 dlen 12
    L2CAP(s): Connect req: psm 1 scid 0x0040
    > HCI Event: Number of Completed Packets (0x13) plen 5
    > ACL data: handle 12 flags 0x02 dlen 16
    L2CAP(s): Connect rsp: dcid 0x005a scid 0x0040 result 1 status 2
    Connection pending - Authorization pending
    > ACL data: handle 12 flags 0x02 dlen 16
    L2CAP(s): Connect rsp: dcid 0x005a scid 0x0040 result 0 status 0
    Connection successful
    < ACL data: handle 12 flags 0x02 dlen 12
    L2CAP(s): Config req: dcid 0x005a flags 0x00 clen 0
    > ACL data: handle 12 flags 0x02 dlen 14
    L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 0
    Success
    > ACL data: handle 12 flags 0x02 dlen 16
    L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 4
    MTU 48
    < ACL data: handle 12 flags 0x02 dlen 18
    L2CAP(s): Config rsp: scid 0x005a flags 0x00 result 0 clen 4
    MTU 48
    < ACL data: handle 12 flags 0x02 dlen 25
    L2CAP(d): cid 0x005a len 21 [psm 1]
    SDP SSA Req: tid 0x0 len 0x10
    pat uuid-16 0x1108 (Headset)
    max 65535
    aid(s) 0x0004 (ProtocolDescList) 0x0100 (SrvName)
    cont 00
    > ACL data: handle 12 flags 0x02 dlen 14
    L2CAP(d): cid 0x0040 len 10 [psm 1]
    SDP SSA Rsp: tid 0x0 len 0x5
    count 2
    cont 00
    < ACL data: handle 12 flags 0x02 dlen 25
    L2CAP(d): cid 0x005a len 21 [psm 1]
    SDP SSA Req: tid 0x1 len 0x10
    pat uuid-16 0x1101 (SP)
    max 65535
    aid(s) 0x0004 (ProtocolDescList) 0x0100 (SrvName)
    cont 00
    > HCI Event: Number of Completed Packets (0x13) plen 5
    > ACL data: handle 12 flags 0x02 dlen 52
    L2CAP(d): cid 0x0040 len 48 [psm 1]
    SDP SSA Rsp: tid 0x1 len 0x2b
    count 38
    cont 02 00 08
    < ACL data: handle 12 flags 0x02 dlen 27
    L2CAP(d): cid 0x005a len 23 [psm 1]
    SDP SSA Req: tid 0x2 len 0x12
    pat uuid-16 0x1101 (SP)
    max 65535
    aid(s) 0x0004 (ProtocolDescList) 0x0100 (SrvName)
    cont 02 00 08
    > ACL data: handle 12 flags 0x02 dlen 20
    L2CAP(d): cid 0x0040 len 16 [psm 1]
    SDP SSA Rsp: tid 0x2 len 0xb
    count 8
    record #0
    aid 0x0004 (ProtocolDescList)
    < < uuid-16 0x0100 (L2CAP) > <
    uuid-16 0x0003 (RFCOMM) uint 0x1 > >
    aid 0x0100 (SrvName)
    str "Socket Serial Port"
    cont 00
    < ACL data: handle 12 flags 0x02 dlen 12
    L2CAP(s): Disconn req: dcid 0x005a scid 0x0040
    > ACL data: handle 12 flags 0x02 dlen 12
    L2CAP(s): Disconn rsp: dcid 0x005a scid 0x0040
    > HCI Event: Number of Completed Packets (0x13) plen 5
    < HCI Command: Disconnect (0x01|0x0006) plen 3
    > HCI Event: Command Status (0x0f) plen 4
    > HCI Event: Disconn Complete (0x05) plen 4
    bluetooth daemon doesn't output anything interesting, just:
    bluetoothd[3647]: adapter_get_device(00:13:E0:48:56:8A)
    Need this working, so all help is greatly appreciated.
    uname -a:
    Linux ebornarch 2.6.31-ARCH #1 SMP PREEMPT Tue Oct 13 13:36:23 CEST 2009 i686 AMD Athlon(tm) Dual Core Processor 4050e AuthenticAMD GNU/Linux
    Thanks.

    Ingenico has a 1D Bluetooth barcode scanner certified MFi by Apple.
    http://baracoda.ingenico.com/Baracoda-i-fly.aspx
    Baracoda i-Fly is compatible with Apple iPod touch, iPhone and iPad.
    Baracoda i-Fly supports IAP Bluetooth profile and is MFi certified, which means it is 100% compatible with Apple development standards and performances.
    Its Bluetooth connection is bidirectional, which enables the i-Fly to transmit data both ways in mode « No Data Loss »).
    Furthermore, Firmware update is also possible, which is not the case for non-MFi certified devices.

  • Hands free barcode scanner

    I currently have a barcode scanner that with a trigger. I hold it in my hand, point it at the item and press the trigger. I have a string control on my front panel that is in focus and the barcode is automatically inserted into it. I monitor this string and when it changes I check to see if it is valid (LF and length) and then search my barcode database.
    I would like to upgrade the system to have a hands free barcode scanner and so improve throughput. The idea is that like a supermarket when the item is placed infront of the scanner it would detect a valid barcode (and beep confirmation).
    1. Does anyone know of a suitable scanner to do this?
    e.g. Miniscan 4400, MG112041-001-412B, LS9208
    3. I would prefer USB but can cope with serial and ethernet (I would prefer to avoid TTL outputs that would require a DAC board)
    2. Does anyone have any example code for these or any other hands free barcode scanners?
    3. Does anyone have any ideas of a "clever" way to implement this?
    - I am hoping that the scanner itself will know if it has seen a valid barcode and will store it and that way I can poll the scanner for a latest string and status? Perhaps I am expecting too much?
    Thanks in advance
    Stuart

    In the end I got two scanners:
    OPR-3201-BK-USB+STD
     This one is cheap and comes with a stand. When in the stand is automatically goes into continuous scan. When removed from the stand it needs the trigger to be pressed. This still communicates via USB as a keyboard emulator so is not really much different from my existing barcode scanner.
    Cipherlab - 1400 Series OEM Integration Kit 1430
     This one is an mini OEM . It came with an integration kit so all i needed to do was cut the end of a serial cable and screw it on to the dev board. The devboard has a built in beep and LED's. I setup a very simple serial communication with it and just wait for the termination character. It is much easier, simpler and reliabile than the keyboard emulator.
    Thanks for all you help, in the end there was nothing much to worry about it was far easier than I though to integrate both.
    Stuart

  • Bidirectional coms with barcode scanner

    Hey everyone.  I'm trying to think big thoughts today.
    I have implemented a CVI 2012 app that used a Symbol / Motorola LI4278 barcode scanner.  Works well.  For that application, I went next-to-simplest method by pre-formatting the scanners into CDC driver mode to work with Win7 as virtual com ports.  Pretty simple then in CVI with a custom serial callback.
    So onto my "big idea" question.  It would be great to send warning beeps and LED blinks back to the user weilding the scanner.  Mot has an SDK that I've stared at, but it appears to be C++ only.  I'm not about to get in there and attempt a wrapper for it.
    I found this discussion here, and it sounds relevant, but I'm not sure where they got their device library.  So anyway, any thoughts on this?

    Hi ElectroLund,
    For the forum thread you linked in your previous post, he said the scanner in question came with a DLL. Since it seems your device did not come with a DLL and only a C++ library, it seems options are pretty limited. You could use a third party C++ development environment and create a DLL out of the C++ source code. This DLL could then be called within your C code.
    Unfortunately, since this is regarding communication with a third party device, National Instruments does not support the actual communication with the device. We can assist with calling DLLs and supported drivers. I would suggest contacting the maker of the barcode scanner to see if they have any DLLs or C source code to be used with their devices.
    David B.
    Applications Engineer
    National Instruments

  • How can i use an barcode scanner and a keyboard at the same time on Ipad

    HI I am looking to find a way to use a barcode scanner and the on screen key bard at the same time, so far i cant seem to find a way to do it.
    Does any one know how this can be done.
    thanks

    It is possible, I use multiple versions, however Firefox official policy is that you use firefox3.6 or 5 ; not firefox 4 which is not secure and not supported.
    The easiest solution may be to use firefox portable http://portableapps.com/apps/internet/firefox_portable/localization#legacy36 although firefox 3.6 will itself not be supported for much longer.

  • A barcode scanner that was connected directly to the Mac's USB port stopped working as the "USB had too much power drawn", even though it has worked for over a year in that port.  WHen we plugged it into the port on the keyboard, the device works. Why?

    A barcode scanner that was connected directly to the Mac's USB port stopped working as the "USB had too much power drawn", even though it has worked for over a year in that port.  When we plugged it into the port on the keyboard, the device works. Why?  Obviously the device is operational.  Could the USB port have burned out from having too much power drawn?  If so, is it reparable?

    It can't draw "too much" power, it can only draw as much as the USB port is able to provide and no more. IIRC, the keyboard port has a lower power output than the iMac's port.
    That being said, yea, it's possible that the port has failed and it can be replaced or if another port works you can use that one. Although if it is still under warranty or covered by Apple Care, then I would take it to an Apple Store or service provider to get the port repaired.

  • How would I create an USB Barcode Scanner Listener using Adobe AIR?

    I want to create a USB barcode scanner listener that would read in the scanned barcode, and place the barcode in a field in my AIR App even if the program wasn't focused on that particular field in the App.  If the client was using the application at the time for something else the scan would be buffered in AIR till requested or the AIR App has been idle for x period of time where upon the field would be brought into focus.
    How would I go about this (I'm developing on windows)  Was hoping for a USB solution within AIR but not fussy at all if I have to go outside AIR to solve this problem.  Java, Flex, ActionScript, Flash, C, C++, C#, VB (currently I've developed the rest of the App using Adobe AIR and JavaScript)
    I thought after some research that I could make a Java App (if all else fails) that listens and buffers the input and passes it along using a socket but JUSB doesn't work on Windows properly.
    I'm not stuck on any one particular implementation or idea just want to get development underway so...  Any ideas? or suggestions would be awesome.  I've googled a lot but haven't found any examples or solid suggestions, so any URL pointing to that information would be great too, if you know of a good one, then I'd be able to read up on any suggestion.
    Thanks,
    Marty

    Thanks Joe,
    Just for anyone else.  I bought a Metologic Scanner - VoyagerCG.  I was trying to get it to work using Java USB for a bit with no luck.  But if you get this scanner or one like it, it can be configured as a Virtual COM Port.  Which is very very easy in Java to set up as a listener and use sockets to transfer the data and listen within AIR.
    This PDF has links to drivers and instructions if this is useful to anyone.
    http://taltechnologies.com/products/Eclipse-Voyager%20Interface%20Options.pdf
    All the best,
    Marty

  • How to get data from usb barcode scanner and display on GUI

    pls anyone with ideas on how to communicate with usb barcode scanner

    http://www.google.com/search?hl=en&q=java+usb+barcode+scanner&btnG=Google+Search

  • How to identify the type of pocketpc barcode scanner?

    How to identify the type of pocketpc barcode scanner whteher it is intermec or symbol?
    GS

    Hi,
    well, this is the brand of the PDA - the Scanner itself is build into the device. So if you have an intermec device - you have an intermec scanner and vice versa. It is not recommended to use a HP device for example with an external scanner. This scenario is not really supported by the MI setup guides.
    Hope that helps!
    Regards,
    Oliver

  • What kind of BarCODE scanner works well with LabVIEW ?

    Currently I am working on a project need the use of Barcode Scanner to scan BarCODE. In our project, the minimum range requirement would be 30 feet. I noticed some posts here indicate there are some problems for barcode scan applications in LV to some specific Barcode scanner models. .
    So, I would like to know if someone has successful experience for wireless or usb barcode scanner programming using LV,  and the Barcode scanner model.
    I would prefer wireless Barcode scanner.
    Thanks in advance.

    Hey Michenglaoxu,
    I thinkt he best thing to do is look at a similar thread where someone was just looking for tips on where to get started and someone actually recommends a product. I can't guarantee the validity of his suggestion, but I thought you may find that link useful.
    Good luck!
    Regards,
    Nick D.

  • I want to limit the number of scan done by a barcode scanner to 50, how can i do that

    I am scanning data from my 2d barcode scanner, now i want that after 50 scans my barcode scanner should prompt that scanning of 50 barcode complete, how can i do that? i know logic might be easy but its not sticking me. Please help.

    Hey,
    Everytime you get a valid scan increment a counter and compare with 50. If limit is reached you are done.
    Regards
    CMW
    LV 13.0.1 Developer Suite with Automated Test; Win7 x64

  • Barcode Scanner app using Javascript for windows 8 tablet

    I want to create a barcode scanner app in which i want to start the camera preview, and read the barcode. Is there any sample code? I have used the below code but its working only with windows desktop not working with tablet.
    function openScanner() {
        var
            // barcode main objects
            zxing,
            sampler,
            element,
            // application  references
            isZxingInit = false,
            isDomReady = false,
            isVisible = false,
            isCancelled = false,
            raiseSuccess,
            raiseError;
        // init objects
        initZXing();
        initSampler().done(function () {
            console.log('- MediaCapture has been initialized successfully!');
            // preparing to show camera preview
            createCameraElement();
            showPanel();
            setTimeout(render, 100);
        }, raiseError);
        // initialize ZXing
        function initZXing() {
            if (!isZxingInit) {
                isZxingInit = true;
                zxing = new ZXing.BarcodeReader();
                console.log('zxing==' + zxing);
            } else {
                console.log('- ZXing instance has been recovered!');
        // initialize MediaCapture
        function initSampler() {
            console.log('- Initializing MediaCapture...');
            sampler = new Windows.Media.Capture.MediaCapture();
            return sampler.initializeAsync();
        // initializes dom element
        function createCameraElement() {
            console.log('- Creating DOM element...');
            if (!isDomReady) {
                isDomReady = true;
                element = document.createElement('video');
             //   element.style.display = 'none';
                element.style.position = 'absolute';
                element.style.left = '0px';
                element.style.top = '0px';
              //  element.style.zIndex = 2e9;
                element.style.width = '100%';
                element.style.height = '100%';
                element.onclick = cancel;
                document.body.appendChild(element);
                console.log('- Camera element has been created!');
            } else {
                console.log('- DOM is ready!');
        function showPanel() {
            if (!isVisible) {
                isCancelled = false;
                isVisible = true;
                element.style.display = 'block';
                element.src = URL.createObjectURL(sampler);
                element.play();
        // renders image
        function render() {
            console.log('- Sampling...');
            var frame, canvas = document.createElement('canvas');
            canvas.width = element.videoWidth;
            canvas.height = element.videoHeight;
            canvas.getContext('2d').drawImage(element, 0, 0, canvas.width, canvas.height);
            frame = canvas.msToBlob().msDetachStream();
            loadStream(frame);
        // loads data stream
        function loadStream(buffer) {
            console.log('- Loading stream...');
            Windows.Graphics.Imaging.BitmapDecoder.createAsync(buffer).done(function (decoder) {
                console.log('- Stream has been loaded!');
                if (decoder) {
                    console.log('- Decoding data...');
                    decoder.getPixelDataAsync().then(
                        function onSuccess(pixelDataProvider) {
                            console.log('- Detaching pixel data...');
                            decodeBitmapStream(decoder, pixelDataProvider.detachPixelData());
                        }, raiseError);
                } else {
                    raiseError(new Error('Unable to load camera image'));
            }, raiseError);
        // decode pixel data
        function decodeBitmapStream(decoder, rawPixels) {
            console.log('- Decoding bitmap stream...');
            var pixels, format, pixelBuffer_U8;
            switch (decoder.bitmapPixelFormat) {
                // RGBA 16
                case Windows.Graphics.Imaging.BitmapPixelFormat.rgba16:
                    console.log('- RGBA16 detected...');
                    // allocate a typed array with the raw pixel data
                    pixelBuffer_U8 = new Uint8Array(rawPixels);
                    // Uint16Array provides a typed view into the raw bit pixel data
                    pixels = new Uint16Array(pixelBuffer_U8.buffer);
                    // defining image format
                    format = (decoder.bitmapAlphaMode === Windows.Graphics.Imaging.BitmapAlphaMode.straight ? ZXing.BitmapFormat.rgba32 : ZXing.BitmapFormat.rgb32);
                    break;
                    // RGBA 8
                case Windows.Graphics.Imaging.BitmapPixelFormat.rgba8:
                    console.log('- RGBA8 detected...');
                    // for 8 bit pixel, formats, just use returned pixel array.
                    pixels = rawPixels;
                    // defining image format
                    format = (decoder.bitmapAlphaMode === Windows.Graphics.Imaging.BitmapAlphaMode.straight ? ZXing.BitmapFormat.rgba32 : ZXing.BitmapFormat.rgb32);
                    break;
                    // BGRA 8
                case Windows.Graphics.Imaging.BitmapPixelFormat.bgra8:
                    console.log('- BGRA8 detected...');
                    // basically, this is still 8 bits...
                    pixels = rawPixels;
                    // defining image format
                    format = (decoder.bitmapAlphaMode === Windows.Graphics.Imaging.BitmapAlphaMode.straight ? ZXing.BitmapFormat.bgra32 : ZXing.BitmapFormat.bgr32);
            // checking barcode
            readCode(decoder, pixels, format);
        // decoding barcode
        function readCode(decoder, pixels, format) {
            'use strict';
            console.log('- Decoding with ZXing...');
            var result = zxing.decode(pixels, decoder.pixelWidth, decoder.pixelHeight, format);
            if (result) {
                console.log('- DECODED: ', result);
                close(result);
            } else if (isCancelled) {
                console.log('- CANCELLED!');
                close({ cancelled: true });
            } else {
                render();
        // cancel rendering
        function cancel() {
            isCancelled = true;
        // close panel
        function close(result) {
            element.style.display = 'none';
            element.pause();
            element.src = '';
            isVisible = false;
            element.parentNode.removeChild(element);
            isDomReady = false;
            raiseSuccess(result);
        function raiseSuccess(result) {
            console.log('Result===' + JSON.stringify(result));
        function raiseError(error) {
            console.log('ERROR::::' + error);
    Can anyone tell why its not working on tablet with solution? Thanks in advance

    Hi Asha - we have sample code for barcode scanning here:
    https://code.msdn.microsoft.com/windowsapps/Barcode-scanner-sample-f39aa411
    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.
    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined
    objects and unknown namespaces.

Maybe you are looking for

  • Generating a log file from oracle db

    I want to generate a log file in which i want to dump some useful messages, when anyone does a dml operation on a table, and also, i want to have a switch like YES or NO (may be an environment variable,,) if i switch it to YES the log file should get

  • Wrong Password while updating to 7.1.2

    Hello everyone, So today in the morning it was all ok, I put in my password and the iPad did unblock. I did some stuff on the internet and then I saw a suggestion to update to a new IOS 7.1.2. I clicked on the update button and then it asked me for m

  • Can anyone help with my audio recordings that stopped working?

    Hi, I have audio recordings available in a secure "member only" area of my website. Unfortunately, from time to time, some recordings stop working. I only find out about this when my students / clients tell me. I don't understand why this occurs or h

  • How do I get an Element to have multiple blinking properties?

    How do I get an element to have more than one blink property?  Provide an example if possible...Thanks. Message Edited by mgoldh1 on 07-11-2005 11:42 AM

  • Exporting Into Excel from Crystal Reports 8.0.1.0

    Post Author: Manoj CA Forum: Exporting Hi, I am using Seagate Crystal Reports 8.0.1.0 along with my VB application. System was exporting into Excel on Older Versionsof Windows like 98 and all. But in XP, after exporting if i open the exported file, e