0

My question. I have a basic HID that does not define any Usage Page and I need to communicate with it from a UWP application. Something really simple: I just need to write/read few bytes from an eeprom integrated in the HID. Can it be done?

What I have done so far. I looked for the following solutions:

Plan A. Write a UWP code to access the device. The Windows.Devices.HumanInterfaceDevice namespace allows UWP applications to access HIDs. However there are limitations... among these, the device is required to define a Usage Page within the vendor range 0xFF00-0xFFFF. So I soon realized this probably cannot work and I expect to run in to a HID_USAGE_PAGE_UNDEFINED problem.

https://learn.microsoft.com/en-us/previous-versions/windows/apps/dn263140(v=win.10)

Plan B. I already have some code that works with this device on Windows 10, but it comes from a WPF application and it is based on hid.dll. It looks like I cannot just integrate this kind of code in a UWP application:

Can I Use Windows Hid API Calls in UWP (HidD_GetPreparsedData)?

Any workaround? suggestion?... is it just plain impossible? I am bound to using UWP.

Ste
  • 101
  • 3

1 Answers1

0

I ran across this before with UWP. If you are using UWP for an IOT device, this may not work you would need an enterprise version of the IOT device, reason being is you could integrate your HUB dll with a .netframework service running in the background and use signal R to relay your package from your service running in the background to your UWP project.

J P
  • 31
  • 5
  • Ok, I see. There are two things I am not sure I am getting. First, can you define "enterprise version" of the device? I am not sure I get what this means. Also, who starts the service in this scheme? The UWP itself, through some fulltrustrun call or similar? Never used inter-app SignalR but I can have a look. Is there maybe some demo? – Ste May 09 '19 at 08:14
  • https://stackoverflow.com/questions/40536376/uwp-app-communication-with-windows-service – J P May 10 '19 at 02:45