sCat SDK v0.55b



Contents
  1. API Functions
  2. Version History
  3. Credits
  4. Bugs/Comments


Introduction

This SDK is for the purpose of decoding CueCat scanned barcodes into a readable form. When a barcode is scanned, it is sent through the keyboard in an encoded string, as such: .C3nZC3nZC3nXC3PZD3b2C3nX.cGf2.ENr7C3v7D3T3CxjYC3zXD3nZ. The output consists of three parts, scat clumps. Each is separated by a period. The first part, in this barcode C3nZC3nZC3nXC3PZD3b2C3nX, is the serial number of the CueCat you are using. The second part, cGf2, is the type of UPC number. The third, ENr7C3v7D3T3CxjYC3zXD3nZ, is the actual UPC number. The function SCAT_Clumps will separate the full string into these three parts for use with the decoding function, CAT_Decode.

The encryption is very simple, it is merely a MIME XOR 67 encryption. There is also another encryption function for the CueCat "Cues" that is also pretty simple.

The utility that comes with this program will help decode the CueCat output. The afforementioned output is decoded into the following:

Serial: 000000002090435002
Type: IB5
UPC #: 978068484211052400
ISBN: 0-684-84211-4

If you decide to look that book up, just know that it belongs to the household stripper, not myself =)

If you have no way of getting your hands on a CueCat, and I know you, I'm sure I can get one to you. Just E-Mail me and I'll give you the address to where you can send some money for postage. If you don't know me, you're out of luck until I can order a few hundred of them. I hope you find this useful!

Muad'Dib - Jan. 14, 2001

1. API Functions


  • void CAT_Decode(DWORD scat, DWORD lengt, DWORD output)

    Purpose:
    Decodes a CueCat encoded serial number, UPC type, or UPC number string. With the exceptions of UPA, IBN, IB5, and CCx (where X is any character) type barcodes, the output of the decoded UPC is fully able to be queried on a UPC database.

    Paramaters:
    1. scat - pointer to scat to be decoded
    2. lengt - length of the string "scat"
    3. serial - pointer to buffer for output of decoded string

    Return Values: none


  • DWORD SCAT_Clumps(DWORD scat, DWORD scat_sn, DWORD scat_type, DWORD scat_upc)

    Purpose:
    Separates the data from the CueCat into three chunks (for use with CAT_Decode). These chunks are the encoded CueCat serial number, the encoded UPC type, and the encoded UPC number.

    Paramaters:
    1. scat - pointer to scat output by the CueCat
    2. scat_sn - pointer to output buffer for garbled CueCat serial
    3. scat_type - pointer to output buffer for garbled UPC type
    4. scat_upc - pointer to output buffer for garbled UPC number

    Return Values: If no error occurs, 0 is returned.


  • DWORD UPA_Check(DWORD upa)

    Purpose:
    Creates and tests a checksum for the UPA type barcode. This simply determines whether or not the UPA number is valid.

    Paramaters:
    1. upa - pointer to decoded UPA string

    Return Values: If no error occurs, 0 is returned.


  • void CC_Convert(DWORD upc, DWORD cc, DWORD utype)

    Purpose:
    Converts the scrambled "Cue" into an unscrambled version that can be queried.

    Paramaters:
    1. upc - pointer to semi-decoded UPC string
    2. cc - pointer to buffer for fully-decoded CueCat "Cue" string
    3. utype - pointer to buffer for "Cue" type
    Return Values: none


  • void IBX_Convert(DWORD upc, DWORD ibx)

    Purpose:
    Converts IBX (where X is N or 5) type UPCs into ISBN numbers. IE 978068484211052400 will become 0-684-84211-4

    Paramaters:
    1. upc - pointer to decoded UPC string
    2. ibx - pointer to buffer for output of the converted string


    2. Version History


    • v0.1a (unreleased) - Jan. 10, 2001 - Added CAT_Decode function.
    • v0.2a (private release) - Jan. 11, 2001 - Added SCAT_Clumps and UPA_Check functions.
    • v0.3a (private release) - Jan. 11, 2001 - Fixed bug in CAT_Decode that sometimes added extra characters to the decoded UPC.
    • v0.5b (public release) - Jan. 11, 2001 - Added CC_Convert and IBX_Convert functions.
    • v0.55b (public release) - Jan. 14, 2001 - IBX_Convert sometimes froze and didn't convert ISBN numbers properly. Fixed.


    3. Credits


    Thanks to the author of "foocat" (a linux reader) for help on decoding the CueCat "Cues". foocat can be found at
    http://www.flyingbuttmonkeys.com/useofthingsyouownisnowillegal. Also, special thanks to OPTiCaL for getting me to Radio Shack and reminding me to get a CueCat. Thanks Jimmy Carter!

    4. Bugs/Comments


    Remember that this is only a BETA version. If you find any bugs or would like to comment, you can reach me at muaddib(at)immortaldescendants(dot)org.
    (C) Jan. 14, 2001 Muad'Dib
    muaddib(at)immortaldescendants(dot)org