6 Replies Latest reply on Jun 15, 2018 5:35 AM by Uwe Reisewitz

    Allow Customer to Aim at Barcode before Scan on TC8000

    Uwe Reisewitz

      Hi,

      The EMDK defines several AimTypes and we have found one to allow the customer to "point and shoot" on nearly every device except on a TC8000.

      This device either does not scan or it automatically scans. We have not found any setting that allows us to point to the barcode we would like to read first.

      We had no problem with the same application on TC75, TC20, TC33. Only on TC8000 this doens't work.

       

      This is the code to Apply a new config (it is called from OnBarCodeScannerStatus when the scanner is in idle state):

              private void ApplyConfig()

              {

                  try

                  {

                      ScannerConfig.AimType aimtype;

       

       

                      switch (ZebraEmdkSettings.Default.AimType)

                      {

                          case ZebraEmdkAimType.ContinuousRead:

                              aimtype = ScannerConfig.AimType.ContinuousRead;

                              break;

       

       

                          case ZebraEmdkAimType.PressAndRelease:

                              aimtype = ScannerConfig.AimType.PressAndRelease;

                              break;

       

       

                          case ZebraEmdkAimType.TimedHold:

                              aimtype = ScannerConfig.AimType.TimedHold;

                              break;

       

       

                          case ZebraEmdkAimType.TimedRelease:

                              aimtype = ScannerConfig.AimType.TimedRelease;

                              break;

       

       

                          case ZebraEmdkAimType.Trigger:

                              aimtype = ScannerConfig.AimType.Trigger;

                              break;

       

       

                          default:

                              throw new InvalidEnumArgumentException("Invalid Enum value: " + ZebraEmdkSettings.Default.AimType.ToString());

                      }

       

       

                      ScannerConfig config = _barcodeScanner.GetConfig();

                      config.ReaderParams.ReaderSpecific.ImagerSpecific.AimType = aimtype;

                      config.ReaderParams.ReaderSpecific.ImagerSpecific.AimTimer = ZebraEmdkSettings.Default.AimTimer;

                      config.ReaderParams.ReaderSpecific.LaserSpecific.AimType = aimtype;

                      config.ReaderParams.ReaderSpecific.LaserSpecific.AimTimer = ZebraEmdkSettings.Default.AimTimer;

                      config.ReaderParams.ReaderSpecific.CameraSpecific.AimType = aimtype;

                      config.ReaderParams.ReaderSpecific.CameraSpecific.AimTimer = ZebraEmdkSettings.Default.AimTimer;

                      _barcodeScanner.SetConfig(config);

                  }

                  catch (Exception ex)

                  {

                      ScannerTrace.Default.WriteExceptionToLog(ScannerTrace.GetExceptionLogText(ScanEngineName, "Apply Config", ex));

                  }

       

       

                  ScannerTrace.Default.WriteScanTrace(ScanEngineName, "ApplyConfig::End");

              }

       

      Any help would be greatly appreciated.

       

      Best regards

      Uwe

        • Re: Allow Customer to Aim at Barcode before Scan on TC8000
          Uwe Reisewitz

          This drives me crazy.

          The DataWedge App on my TC800 runs fine. It works just as expected. I set AimType to TimedRelease. When I press the trigger I see the crosshair and I can point to my barcode. Releasing the trigger scans.

           

          Now with the EMDK (I modified the provided BarcodeSample1 application to set ImagerSpecific parameters):

          Everything is the same EXCEPT that the scanner does not scan. If I release the trigger the cosshair is switched of but nothing happens - no scan event is fired.

           

          Any ideas?

           

          Thanks in advance for any help

           

          Best regards

          Uwe

            • Re: Allow Customer to Aim at Barcode before Scan on TC8000
              Pietro Francesco Maggi

              Hi Uwe,

              I've done some tests modifying the BarcodeSample1 from our EMDK for Xamarin and I was able to have the AimType to work correctly on a TC8000 Lollipop GMS with BSP 02.10.02.

               

              Just check that you've the right EMDK runtime version installed on the device.

              You can install the latest LifeGuard Patch downloading it from Zebra Support Website. Keep in mind that you need to have a maintenance contract for accessing the downloads.

              What can be critical is WHEN you're updating these parameters. From the Barcode API Scanning Guide:

               

              The user must call the Scanner.setConfig(ScannerConfig) only when the scanner is enabled and in idle state. The modified settings applied will persist until the scanner object is released and this means that when user calls enable() after disable(), all the latest configuration parameter values will be set automatically. 

              Setting scanner configurations is not allowed while a read is pending. If a read is pending, the developer must call the Scanner.cancelRead() and must wait for the idle status through the register status listener before setting the configuration.

               

              For the actual code, I simply added the additional configuration to change the AimType in the SetDecoders() function in the BarcodeSample1:

               

                      private void SetDecoders()
                      {
                          if (scanner == null)
                          {
                              InitScanner();
                          }

                          if ((scanner != null) && (scanner.IsEnabled))
                          {
                              try
                              {
                                  // Config object should be taken out before changing.
                                  ScannerConfig config = scanner.GetConfig();

                                  // Set EAN8
                                  config.DecoderParams.Ean8.Enabled = checkBoxEAN8.Checked;

                                  // Set EAN13
                                  config.DecoderParams.Ean13.Enabled = checkBoxEAN13.Checked;

                                  // Set Code39
                                  config.DecoderParams.Code39.Enabled = checkBoxCode39.Checked;

                                  // Set Code128
                                  config.DecoderParams.Code128.Enabled = checkBoxCode128.Checked;

                                  config.ReaderParams.ReaderSpecific.ImagerSpecific.AimType = ScannerConfig.AimType.TimedRelease;
                                  config.ReaderParams.ReaderSpecific.LaserSpecific.AimType = ScannerConfig.AimType.TimedRelease;
                                  config.ReaderParams.ReaderSpecific.CameraSpecific.AimType = ScannerConfig.AimType.TimedRelease;

                                  // Should be assigned back to the property to get the changes to the lower layers.
                                  scanner.SetConfig(config);
                              }
                              catch (ScannerException e)
                              {
                                  textViewStatus.Text = "Status: " + e.Message;
                                  Console.WriteLine(e.StackTrace);
                              }
                          }
                      }

                • Re: Allow Customer to Aim at Barcode before Scan on TC8000
                  Uwe Reisewitz

                  Hi,

                  thank you for your reply. Sorry for the delay, since there is no email notification, I simply missed your reply.

                   

                  I've tried your suggestions, here are my findings:

                  Yes, the barcode sample scans like it should but totally unreliable. It scans successfully in about 1 in 10 tries. If I remove the AimType-code (defaulting to AimType.Trigger I suppose) it scans every time with full speed. Did that work on your side?

                  The sample contains a different version of the Symbol.EMDK library. This is very unfortunate. Why does Zebra ask developers to switch to NuGet and then update the libraries in the samples? It seems that this version changes something, too as the previous version did not work at all with AimType.TimedRelease.

                   

                  BTW, my device is running the latest LifeGuard update (8).

                   

                  How should we proceed?

                   

                  Thanks again for your help.

                   

                  Best Regards

                  Uwe

                    • Re: Allow Customer to Aim at Barcode before Scan on TC8000
                      Pietro Francesco Maggi

                      Hi Uwe,

                      I tested this breafly on a TC8000 with a Laser barcode scanner with the latest LG installed as well (number 8).

                       

                      The Symbol EMDK library is updated with new features to expose the updates we implement in the Scanner Frameworks of the device, however the library used by your application resides on the device (it's the EMDK runtime, that it's now updated when you install LG patches).

                       

                      Regarding the samples and the nuget package, since May 15th Microsoft disabled the support for the Xamarin Components, that was how we distributed the EMDK for Xamarin till v2.7.

                      We've released the nuget package of the EMDK, but it's still not been integrated in the release as v2.7 was released before that date.

                       

                      If you can reproduce the same erratic behavior (the scanner works one out of ten tries) with the demo application (modified as I've done above), you should open a case with our support because something is not working correctly.

                      I've attached to this email the modified build of the Xamarin Barcode1 Sample app that you can install and test on your device.

                       

                      Best regards

                      ~Pietro

                        • Re: Allow Customer to Aim at Barcode before Scan on TC8000
                          Uwe Reisewitz

                          Hi Pietro,

                          thanks a lot for the apk. I see the same bahaviour with your apk even after rebooting the device, We will open a maintenance call and I will get back to you.

                           

                          Thanks for your help.

                           

                          Best Regards

                          Uwe

                            • Re: Allow Customer to Aim at Barcode before Scan on TC8000
                              Uwe Reisewitz

                              Hi Pietro,

                              we thought that it might have something to do with the fact taht our device used the Non-GSM Build so we installed the GSM Build today and tried again.

                               

                              Unfortunately we had no luck. With your apk it scans better than yesterday but still not reliable. The strange thing is that we had the same problem with a customer device so it doesn't look like a specific problem of our device. BTW, DataWedge scans without a hitch:-(.

                               

                              What type of scanning device has your TC8000? Ours has a SE4750 (MR) installed.

                               

                              I really don't know what I should tell if I open a maintenance case...

                               

                              Do you have an idea how to pinpoint this?

                               

                              Best regards

                              Uwe