Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Motorola MC65 - EMDK .NET 2.6 - E_SCN_READTIMEOUT using ScanWait()

I'm looking to integrate the Barcode2 class in the EDMK 2.6 library into our existing Barcode scanning interface.

I've wired the example code up to our interface method StartScan() and always get E_SCN_READTIMEOUT as the result even though the code seems to be responding to the scan. (the breakpoint at if (scan.Result == Results.SUCCESS) is hit in response to the scan

public void StartScan()
        {
            if (!barcode.IsScanPending)
            {
                ScanData scan = barcode.ScanWait(2000); // 2 second timeout
                if (scan.Result == Results.SUCCESS)
                {
                    if (scan.IsText)
                    {
                        textbox1.Text = scan.Text;
                    }
                }
            }
        }

The result is always E_SCN_READTIMEOUT, I suspect this may be a conflict with DataWedge 3.4 running on the device, but the functionality of the scanner and triggers seem to be dependent on it.

Getting barcode scans to the clipboard using DataWedge is not an option for us, is there a way to get the library to function despite DataWedge(assuming that is causing the read timeouts)?

like image 604
Joshua Rose Avatar asked Nov 12 '22 15:11

Joshua Rose


1 Answers

The DataWedge application did need to be disabled, (this can be done programmatically via the datawedge API from Motorola, Thanks Abdel for the hint here!).

https://docs.symbol.com/ReleaseNotes/Release%20Notes%20-%20DataWedge_3.3.htm

A little background on our Windows Mobile application for reference, we have a hardware singleton that contains interfaces for all hardware components and loads related types and assemblies via reflection. If we referenced types directly the code above worked.

The end solution ended up being to use the Symbol.Barcode library instead of Symbol.Barcode2.

like image 184
Joshua Rose Avatar answered Jan 04 '23 01:01

Joshua Rose