Playing with the CueCat barcode scanner.

My CueCat barcode scanner is broken, my computer is misconfigured or I just forgot to read the proper documentation. I spend three days just to find out the NUM LOCK key was causing the CueCat to be misunderstood by Windows. Poor little kitty, nobody understands what it says.

The Mayan CueCat.I’ve been playing with a CueCat barcode scanner I bought at eBay. It is a PS2 68-1965-A model, which I think is the most common type. I’m doing this because I am testing a quick product feeding option for the osCommerce Product Manager for Windows (oscpmwin). The idea is to be able to add product as batches of UPC numbers (to be added as model numbers) or to increase the stock number of existing products quickly.

I bought a modified CueCat, one that no longer sends encrypted numbers but clear text. Well, the clear text was not really as clear as I thought. After struggling to understand why most barcode codes returned by the cuecat were segmented (that is, broken in several lines, see Figure 1) I discovered that the numbers and letters returned were not really the ASCII characters, but ALT + keypad-number combinations. C’mon! What were they thinking of when designed this feline?

So, for example, for the number nine the CueCat was really entering the combination ALT+57. Yeah, rather than sending “1”, “2”, “3” and so on, it sends ALT+48, ALT+49, ALT+50, and so on. The problem was that Windows received a “9” character and a “Home” keypress. This happened in Windows 2000 (but not in all applications, for example Wordpad ignored the “Home” editing code and just displayed the “9”, see Figure 2).

Figure 1. Bad kitty, another garbled barcode.
Bad CueCat barcode scanning.

Figure 2. Good kitty, This is the correct barcode.
Good CueCat barcode scanning.

After a while I thought my CueCat was broken. Mmmmh, I just paid 4 dollars for this, returning it will cost me a lot more. Then I just tried one obvious test: typed the data directly with the keyboard using the ALT keypad codes. Oooooh. If I type ALT+57 I get a “9” character plus a “Home” editing code. Ok, then I thought the problem was not the CueCat (because after all, it is acting just like my keyboard) but the problem was Windows. Time to test with another platform.

Testing in Linux was not better. I used SuSE 10 as test bed and found out that X (with Gnome) just ignored the data from the CueCat. In the console it was better: it received the numbers and ignored the keypad editing codes. Great for me because, mmmh, you know… I am a member of the Command-Line Brotherhood.

Ok, this is just silly. But wait, my program (oscpmwin) only runs (currently) in Windows, so I need to solve this in Windows only. I tested in another computer, now with Windows XP. Same result. Disabled all keyboard stuff in the Control Panel. Same problem. Ok, time to rethink this. The big question appeared in my head: how does Windows interpret the ALT+keypad combinations?

It seems I have not used the ALT+keypad combinations in Windows for a lot of years; at least not in my computers (which have their keyboards properly configured). So I decided to browse the web to find out. I discovered that Windows only get the ALT+keypad combinations when NUM LOCK is enabled in the keyboard. C’mon, give me a break! I indeed used ALT plus keypad combinations with DOS, but then it worked even if NUM LOCK was disabled.

Testing again in Windows 2000. Surprise, it works pretty well in all Windows applications when NUM LOCK is turned on. Grrrrr, I have spend three days of work just on this. I have read the code of several Linux CueCat decoders. I have even read the Linux driver code. I have read through tons of newsgroups messages, forums postings and web pages. The Linux driver code… I only read Linux kernel code when I’m very bored (or very desperate).

Am I the only one who use the keyboard with NUM LOCK disabled or what? Because I could not find any reference of this behavior. Yes, I’m an old cat, I use the numeric keypad keys for editing (moving the cursor, delete text, etc.), not for numbers. Maybe everybody knew it or it is so obvious for everyone.

Is my CueCat a weird version which send weird keyboard scancodes or what? That’s another possibility, but even then, the vendor who sold me this CueCat has sold too many of them.

Is the information out there but I could not see it? My eyeglasses are broken so I have a (lame) excuse. That would suck because I work also as a web information finder. (Yes, people pays me for finding hard-to-find information on the web).

Well, what it does matter is that I discovered the problem, learned the NUM LOCK thing, and can get back to work.

Further reading:

10 Comments »

  1. Anonymous said,

    July 3, 2006 @ 01:42:24

    hello,

    this is just a really nice CAPTCHA image generator ;-)

    but somehow it doesn’t seem to work as i can do as many posts as i would like ;-)

  2. Anonymous said,

    July 3, 2006 @ 01:42:57

    hello,

    this is just a really nice CAPTCHA image generator ;-)

  3. Anonymous said,

    July 3, 2006 @ 01:43:52

    hello,

    this entry comes from a captcha SPAM form …
    … as your captcha script doesn’t seem to work!

    what happened??

  4. Anonymous said,

    July 3, 2006 @ 01:45:14

    /** @private **/
    function check_captcha($public,$private)
    {
    $res = ‘FALSE’;
    // when check, destroy picture on disk
    if(file_exists($this->get_filename($public)))
    {
    $res = @unlink($this->get_filename($public)) ? ‘TRUE’ : ‘FALSE’;
    if($this->debug) echo “\n-Captcha-Debug: Delete image (“.$this->get_filename($public).”) returns: ($res)”;
    $res = (strtolower($private)==strtolower($this->generate_private($public))) ? ‘TRUE’ : ‘FALSE’;
    if($this->debug) echo “\n-Captcha-Debug: Comparing public with private key returns: ($res)”;
    }
    return $res == ‘TRUE’ ? TRUE : FALSE;
    }
    /* OLD FUNCTION, without HotFix from Daniel Jagszent :
    function check_captcha($public,$private)
    {
    // when check, destroy picture on disk
    if(file_exists($this->get_filename($public)))
    {
    $res = @unlink($this->get_filename($public)) ? ‘TRUE’ : ‘FALSE’;
    if($this->debug) echo “\n-Captcha-Debug: Delete image (“.$this->get_filename($public).”) returns: ($res)”;
    }
    $res = (strtolower($private)==strtolower($this->generate_private($public))) ? ‘TRUE’ : ‘FALSE’;
    if($this->debug) echo “\n-Captcha-Debug: Comparing public with private key returns: ($res)”;
    return $res == ‘TRUE’ ? TRUE : FALSE;
    }
    */

  5. Steve said,

    February 8, 2007 @ 18:12:28

    Somebody knows how can I use my CueCat in Windows XP?

    I haven’t some disk with the drivers.

    Regards

  6. admin said,

    November 14, 2007 @ 08:00:23

    The captcha used to authorize the postings have been disabled since last year, because: a) it is cumbersome for the posters, b) is not friendly with people with sight problems, and c) it was not working quite right.

    Regards,

    Mario A. Valdez-Ramírez.

  7. Diane N. said,

    November 21, 2008 @ 18:23:12

    Does anyone out there know how to convert a PS/2 :cuecat to a USB :cuecat?

  8. CrazyCatLady said,

    August 15, 2009 @ 01:54:02

    “Does anyone out there know how to convert a PS/2 :cuecat to a USB :cuecat?”
    Yes, it’s a complicated procedure, first you go to this little-know place called eBay.
    Do a quick search as follows “CueCat USB”
    Purchase.
    That is the only know conversion method on the planet.

  9. upc code search said,

    November 11, 2010 @ 20:48:17

    thanks admin for posting and link back to our site.

  10. Shantae Leier said,

    August 1, 2014 @ 23:04:17

    Do you mind if I quote a few of your articles as long as I provide credit and sources back to your webpage? My blog site is in the exact same area of interest as yours and my users would definitely benefit from some of the information you present here.

RSS feed for comments on this post

Leave a Comment

Copyright ©1994-2006 by Mario A. Valdez-Ramírez.
no siga este enlace / do not follow this link