Scanner on 7535 G2

  • We are trying to write an app thast captures the scanned data and passes it through a terminal services virtual channel. We have this working on other devices but are having problems with the 7535 G2. We believe that the issue is the builtin wedge scanner is blocking our app from capturing the data. Is there a way to disable the wedge scan.

  • Ledgers,

    You can use our Psion Teklogix SDK (currently version 3.3 available for download from TekNet) to capture barcode data to a registered callback function that your application would receive.:

    http://teknet.psionteklogix.com/ptxCMS/Teknet.aspx?s=us&p=DevWinCEDownloads

    There is a DEMO application (.NET) showing you how to use it on TekNet in the ‘Other Downloads’ section:

    http://teknet.psionteklogix.com/ptxCMS/Teknet.aspx?s=us&p=SoftwareDownloads

    See ‘Using the Trigger API to Control Scanner Operation (DEMO)’

    By default, when no application is 'registered' to receive scanner data, then said data is ‘wedged’ into the keyboard buffer.

    Steve

     

  • When you initialize our scanner through the API it automatically disables the wedge.  Are you using the PT SDK?

  • Yes, I have 3.3.  I'm writing to a trace file and it suggests that everything is being called in the right order.  After I call

    DllSpecification void RegisterWithScanner(ScannedDataReceiver *receiver)

    as a test, I'm then calling

    DllSpecification void Scan() throw (std::runtime_error);

    When I do this, the scanner begins to scan and I can get it to read the barcode but I don't get the event from my implementation of

    virtual void ScannerCallback(const BarcodeData &data) = 0;

    Instead, the wedge put the value into the focus edit field.  If I can successfully call Scan() and my call to RegisterWithScanner returns and does not throw an exception, why isn't my callback function being called?

  • Could you please give the attached VS2008 C++ solution a try and let us know how it goes from your end?

    5873.MDSDK v3.3 - VS2008 C++ Scanner Demo.zip

    Upon startup, you shall see:

     

    Upon successful read, barcode data / information will be "plugged" as follows:

     

  • Here's some rudimentary implementation of the Scanner API in .NET (C#) based on MDSDK version 3.3 on Windows CE 5.0 operating system.

    6138.ScannerCE5.zip

     

  • I can get this to work when I compile an .exe, but the code I'm writing is in a dll that's loaded by the CE RDP client as an addin.   Is there something special I have to do when calling the scanner stuff from a dll?  The dll is using MFC statically linked.

  • I've done further tests.  I've created a dll which I load using LoadLibrary/GetProcAddress.  I'm able to get scanner events.  When the same dll is loaded via the RDP client on the device, I do not get scanner events, I get wedge output being put into the focus control.  This suggests that the wedge software either isn't being switched off when in the RDP client is used.  I'm sure that RegisterWithScanner is being called.

  • Please let us know if the attached alternate solution helps:

    4186.Alternate VS2005 C++ ScannerDemo.zip

     

    This solution illustrates how to control the scan engine without using any of our Mobile Devices SDK scanner namespace methods.

    In short, the scan engine can be treated as a serial device/port

     

    To access it, simply open the device port SCS0:

    CreateFile(TEXT("SCS0:"), GENERIC_READ | GENERIC_WRITE, 0, 0, OPEN_EXISTING, 0, 0)

     

    Registering the current window  (hWnd) with the scanner services is done as follows:

    ScsRegisterInfo infoRegister;infoRegister.windowClient  = hWnd;

    infoRegister.flagsRegister = 1;

    DeviceIoControl(scanHandle, IOCTL_SCS_REGISTER, &infoRegister, sizeof(infoRegister), 0, 0, NULL, 0)

     

    Successful barcode reads will be notified via WM_COPYDATA window messages:

     

    case WM_COPYDATA:

          {

                COPYDATASTRUCT *data = (COPYDATASTRUCT *)lParam;

                int size = data->cbData + sizeof(WCHAR);

                WCHAR *barcode = (WCHAR *)LocalAlloc(LPTR, size);

                memcpy(barcode, data->lpData, data->cbData);

                SetDlgItemText(hWnd, IDC_BARCODEDATA, barcode);

                if (data->dwData < dim(szSymbologyList))

                      SetDlgItemText(hWnd, IDC_SYMBOLOGY, szSymbologyList[data->dwData-1]);

                else

                {

                      TCHAR szSymbology[10];

                      wsprintf(szSymbology,TEXT("%d"),data->dwData);

                      SetDlgItemText(hWnd, IDC_SYMBOLOGY, szSymbology);

                }

                LocalFree(barcode);          

          }

          break;

     

     

  • ledgers

    I've done further tests.  I've created a dll which I load using LoadLibrary/GetProcAddress.  I'm able to get scanner events.  When the same dll is loaded via the RDP client on the device, I do not get scanner events, I get wedge output being put into the focus control.  This suggests that the wedge software either isn't being switched off when in the RDP client is used.  I'm sure that RegisterWithScanner is being called.

    Generally speaking, you don’t want to attempt to use LoadLibrary on our C++ SDK (due to name mangling).

     

    If possible, could you please email me the snippets of your code (which uses our SDK) to:  Steve.Cox@psionteklogix.com

     

    Just those sections using our SDK.

     

    In the meantime, please try Jacques’ suggestion above and let us know if that works.

     

  • Thanks for this, I'm away for a few days but will try these out later in the week.  Just for completeness, I wasn't using LoadLibaray on the SDK dll, I'd written my own dll which statically linked to the SDK and was using LoadLibaray on my dll.  I'm aware of extern "C", etc.  This was the closest I could get to what the RDP client is doing.

  • Hi, I tried Jacques' code (on VS 2008 using the 2005->2008 conversion wizard which reported no issues) but it fails on startup at the following line:

    (line 141 of ScannerDemo.cpp)

    if (!DeviceIoControl(scanHandle, IOCTL_SCS_GET_INTERNAL_SCANNER_TYPE, NULL, 0, &szScannerType, sizeof(szScannerType), NULL, 0))

    {

    TCHAR szError[255];

    wsprintf(szError, TEXT("DeviceIoControl(IOCTL_SCS_GET_INTERNAL_SCANNER_TYPE) failed with %d"), GetLastError());

    MessageBox(hWnd, szError, NULL, MB_OK | MB_SETFOREGROUND | MB_TOPMOST);

    return 0;

    }

    with

    "DeviceIoControl(IOCTL_SCS_GET_INTERNAL_SCANNER_TYPE) failed with 87"

    87=ERROR_INVALID_PARAMETER.  

    All lines above that appear to have run ok.

  • Although the error raised is ERROR_INVALID_PARAMETER, I am tempted to believe that IOCTL_SCS_GET_INTERNAL_SCANNER_TYPE is not supported on your device..

    Can you please provide us your 7535-G2 device system properties?
    To retrieve this information, please click Start -> Settings -> Control Panel -> System -> Properties and share a copy of the \Flash Disk\SystemProperties_NNNNNNNN.txt file.

    For your information, as I launched the attached VS2008 C++ solution against my 7535-G2 device

    4101.Alternate VS2008 C++ ScannerDemo.zip

    I got:

  • Hi,

    This is what's in the file systemproperties.txt file in the location you specified:

    Build type - Release

    Boot code - G246p

    OS code - H026m

    PCon code - H306q

    MLB type - C

    CPLD version - 0x5

    Processor - Intel PXA270

    Processor Speed - 520 MHz

    Ram - 128 MB

    Flash - 64 MB

    Scanner - Symbol 1200 LR

    Keyboard - 58 key

    Touch - 4 wire

    Display - Sharp 240x320

    Orientation - Portrait

    MLB Serial - <removed>

    Term Serial - <removed>

    PCM/CF Slots -  

     Marvell-88W8300_802.11g_PC_Card

    MMC/SD Slot - Empty Slot

    I'm preparing a minimum code example as asked for by Steven also

  • Could you please
    - go to our Service & Support » Software Downloads section
    - download the latest recommended system images for our 7530-G2 & 7535-G2 product ranges
    - and finally, upgrade (*) your 7535-G2 unit?

    Once upgraded, IOCTL_SCS_GET_INTERNAL_SCANNER_TYPE should no longer raise the ERROR_INVALID_PARAMETER exception you observed.


    (*)   Software Ugrade Instructions can be found here