Why does TC55 (imager) not return from scanning?

// Expert user has replied.
V Vedsatx Saddvv 2 years 11 months ago
8 2 0

Hi all,
 
we have 2 TC55 devices, one with a 1-D scanner, the other with a 2-D imager. We run the BasicScanningTutorial on both devices. The 1-D scanner device works as expected. On the 2-D imager device, we scan a Barcode once. Then the status "Scanning..." is displayed and the device does not return from this status. If I ignore the isScanning flag in the code, "Already scanning. Wait for current scanning to complete." is displayed. (If I turn the device, the scanner is idle again.presumably, because the activity is stopped and restarted.)
Any idea, what's wrong with the 2-D imager device?
 
Wolfram

Please register or login to post a reply

2 Replies

P Pietro Francesco Maggi

Hi Wolfram,
few questions for you.

Are the two TC55 using the same BSP? which is the version installed on the two devices?
Which EMDK version are you using?
Have you installed on both devices the same EMDK runtime?
Can you post the binary and, if possible, the source of the version of the BasicScanning Tutorial you're using?

Following the published tutorial:
Basic Scanning Tutorial using Barcode API

I've seen in the past that it was required to add a sleep(100) instruction before the scanner.read() call to avoid scanner freeze similar to what you described.
The sleep call is included in the sample provided with the EMDK.

Personally, I've modified the BarcodeScanning Tutorial code for the IDLE state in this way:

case IDLE:     statusStr = "The scanner enabled and its idle";     // Start an async scan     try {         // An attempt to use the scanner continuously and rapidly (with a delay < 100 ms between scans)         // may cause the scanner to pause momentarily before resuming the scanning.         // Hence add some delay (>= 100ms) before submitting the next read.         try {             Thread.sleep(100);         } catch (InterruptedException e) {             e.printStackTrace();         }          scanner.read();     } catch (ScannerException e) {         statusStr = e.getMessage();     }      break;
Best
~Pietro

W Wolfram Gierling

Hi Pietro,

(1) sorry, what do you mean by BSP? Where can I find this Information? The TC55 with 1-D scanner has a Build-Number of 150306-SI1800EN-01.77.154443J-4.1.2-user, the TC55 with 2-D imager has a Build-Number of 150422-1800EN-02.52.02-23257-4.4.3-user. Does that help?
(2) The EMDK I am using is 3.1 (with update).
(3) On both devices, we have the same runtime (EmdkOSUpdateApp_v3.1.38.apk)
(4) I have used the original sample source from the published tutorial (yout link). What do you mean by binary? The .apk-file?

What you have done in modifying the IDLE state means that you are permanently scanning. This is not what I want. Nevertheless I have tried this modification on both devices. On the 1-D scanner it works (permanently scanning), on the 2-D imager it doesn't (Exception "already scanning..." as reported before). If I use the original source code but add a Sleep() before calling scanner.read(), it has no effect at all.

Kind regards,
Wolram

CONTACT
Can’t find what you’re looking for?