UWP PointOfService API - Can't use GetSupportSymbologiesAsync or GetSymbologyAttributesAsync

1

I'm using the UWP Barcode Sample.

I'm attempting to use the UWP PointOfService API with a Panasonic FZ-F1, which runs Windows 10 Mobile Enterprise. I'm unable to get supported Symbologies, because scanner.GetSupportedSymbologiesAsync() always returns a null System.__ComObject. With native view, of type IUnknown when debugging to the device.

0x00007ff8ca8ba278 {Windows.Devices.PointOfService.dll!const Windows::Internal::AsyncOperation<struct Windows::Foundation::IAsyncOperation<struct Windows::Foundation::Collections::IVectorView<unsigned int> *>, struct Windows::Foundation::IAsyncOperationCompletedHandler<struct Windows::Foundation::Collections::IVectorView<unsigned int> *>, class Windows::Internal::CMarshaledInterfaceResult<struct Windows::Foundation::Collections::IVectorView<unsigned int> >, class Windows::Internal::ComTaskPoolHandler,struct Windows::Internal::INilDelegate,struct Microsoft::WRL::AsyncOptions<-1,0,&struct _GUID const GUID_CAUSALITY_WINDOWS_PLATFORM_ID,2> >::`vftable'{for `Microsoft::WRL::Details::ImplementsHelper<struct Microsoft::WRL::RuntimeClassFlags<3>,1,struct Windows::Foundation::IAsyncOperation<struct Windows::Foundation::Collections::IVectorView<unsigned int> *>, struct Windows::Internal::IAsyncOperationLocal,struct Microsoft::WRL::CloakedIid<struct Windows::Internal::IAsyncDeferral>,struct Microsoft::WRL::CloakedIid<struct Windows::Internal::IComPoolTask>,struct Microsoft::WRL::CloakedIid<struct Windows::Internal::IAsyncFireCompletion> >'}} {...}

I have also tested this with a Honeywell Xenon 1900g on Windows 10 16299 and it doesn't work there either. Here's the error there.

$exception  {System.NullReferenceException: Object reference not set to an instance of an object.
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at SDKTemplate.Scenario3_ActiveSymbologies.<ScenarioStartScanButton_Click>d__8.MoveNext()} System.NullReferenceException

StackTrace  "   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at SDKTemplate.Scenario3_ActiveSymbologies.<ScenarioStartScanButton_Click>d__8.MoveNext()"  string

I need to be able to support TfInt (I2of5), with a length of 10, which won't scan due to being unable to set the length attribute. I have tried defining the barcode with claimedScanner.GetSymbologyAttributesAsync(BarcodeSymbologies.TfInt) but it fails with the following exception.

{System.Exception: The request is not supported. (Exception from HRESULT: 0x80070032)
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at SDKTemplate.Scenario4_SymbologyAttributes.<SymbologySelection_Changed>d__13.MoveNext()}  System.Exception

The FZ-F1 does support TfInt (I2of5). Using its pre-loaded Barcode Reader demo app (which I assume was created using Windows 8.1 Handheld API) I can assign the length there and it works as expected.

Currently, after some testing I've discovered that the API defaults to a TfInt (I2of5) Length1, Length2, or AnyLength (I'm not sure what is currently set) utilizes a length of 14, so there is a possible work-around, which is that we can change all of our barcodes to utilize a length of 14. If the length is under 14 it fails to scan.

Anyone have insight into whether or not this API actually works for doing what I've attempted. They created the sample like it works, but in my experience it doesn't. (Adding this to the documentation would be really helpful)

c#
uwp
barcode
windows-10-universal
pointofservice
asked on Stack Overflow Jan 29, 2018 by fourwhey • edited Jun 12, 2018 by Rob Caplan - MSFT

1 Answer

1

After opening a ticket with Microsoft and Panasonic, here is the result.

From Panasonic:

GetSupportedSymbologiesAsync : At the moment, this API cannot return supported symbologies correctly. This issue will be fixed on RS3. However, I think this issue is not so impact to UWP user app, because Symbologies supported by FZ-F1 are no changes.

GetSymbologyAttributesAsync : This API is not supported.

The issue that I was having was related to not being able to configure the Interleaved 2 of 5 symbology using the Panasonic Barcode Reader app on the device. I assumed incorrectly that since I couldn't use the app, that I must need to do this in code. As it turns out, the reason the settings applied in Barcode Reader didn't work, is that the device needs to have the following command run in order for the settings made in Barcode Reader to be applied - else symbology defaults are applied.

After claiming the scanner...

await claimedScanner.SetActiveProfileAsync("OEMProfile");

Here is the Panasonic support doc where they published this requirement as a result an ongoing support issue, which I first contacted them about in Oct 2017.

http://pc-dl.panasonic.co.jp/dl/docs/076321?dc[]=002012&no=3&p1=221&q=FZ-F1&score=1.43731880187988&sri=12077714&trn_org=2

Here is a working sample project. If you're using a symbology that requires a length be set, and you're not using the default length, this might help you.

https://1drv.ms/u/s!Am4H1xOfJ2mxgQ_pqOia9wj46oKq

answered on Stack Overflow Feb 7, 2018 by fourwhey

User contributions licensed under CC BY-SA 3.0