using multiple usb rfid readers on a raspberry pi 3 running Windows 10 IoT and a c# universal app

1

I'm hoping that someone smarter than me can come up with a solution to this problem.

I have a kiosk application that has two usb rfid readers plugged into a raspberry pi 3 running Windows 10 IoT with a c# UWP app written in Visual Studio. The rfid readers act as keyboards. Basically they just read the id on the rfid token "type" it in and press enter.

I need to be able to tell which rfid reader is reading a tag at any given time.

Using the following project : http://www.codeproject.com/Articles/17123/Using-Raw-Input-from-C-to-handle-multiple-keyboard on a windows 10 machine with multiple usb rfid readers plugged in I can tell which rfid reader is being used but cannot get this to work on the raspberry pi running Windows 10 IoT Core.

I have create a UWP app using the Windows.Devices.HumanInterfaceDevice namespace and can get the reader to show up but cannot open it.

The code I am using is:

string selector = HidDevice.GetDeviceSelector(0x0001, 0x0006, 0x08FF, 0x0009);
var hidDevice = await HidDevice.FromIdAsync(selector, FileAccessMode.Read);
var inputReportEventHandler = new TypedEventHandler<HidDevice, HidInputReportReceivedEventArgs>(this.OnInputReportEvent);
hidDevice.InputReportReceived += inputReportEventHandler; 

When I configure the Package.appxmanifest with:

<DeviceCapability Name="humaninterfacedevice">
  <Device Id="vidpid:08FF 0009">
    <Function Type="usage:0001 0006"/>
  </Device>
</DeviceCapability>

and compile the application I get the error:

Error DEP0700 : Registration of the app failed. The Appx package's manifest is invalid.: Cannot register package because of a problem with Function element usage:0001 0006: Value is blocked, and not allowed on this bus (0x80073cf6)

So it looks like Microsoft has blocked access to the rfid reader using the Windows.Devices.HumanInterfaceDevice namespace (https://msdn.microsoft.com/en-us/library/windows/apps/windows.devices.humaninterfacedevice.aspx) because it has been classed as being in a a top level application collection.

So my options are:

  1. Try and get the raw input app working (from the link to the codeproject site above) but I don't think that will work on the pi due to the underlying calls it is making.

  2. Put a different OS on the pi and rewrite the kiosk application (I would really rather stick with Windows IoT and c# with a UWP app.

  3. Think of a different solution that I hope some smart person reading this post will be able to suggest.

Any suggestions would be welcomed!

c#
visual-studio
raspberry-pi
uwp
iot
asked on Stack Overflow Sep 1, 2016 by Shane • edited Sep 1, 2016 by Shane

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0