Blinkstick Windows 10 IoT - Can not connect

Continuing the discussion from Libary for Windows IoT?:

I’m stuck - no success. :confused:
I can not use your code or use the blinkstick outside your example project.
I even tried to rebuild your code in my favorite language vb.net. But it doesn’t matter if I add the BlinkstickUniversal Sample project to a new project or if I rewrite the code by myself.

I still can find the connected Blinkstick and get the same deviceID that is used within your sample project:

Dim selector As [String] = HidDevice.GetDeviceSelector(&HFF00, &H1, VendorId, ProductId)
Dim deviceInformationList = Await DeviceInformation.FindAllAsync(selector)

But if I try to connect to the Blinkstick with

Dim theDevice As HidDevice
theDevice = Await HidDevice.FromIdAsync(DeviceID, Windows.Storage.FileAccessMode.ReadWrite)

theDevice is null.
DeviceID is \?\HID#VID_20A0&PID_41E5#6&2413d1cd&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
As there is no error result or code I can’t find out why.

What drives me crazy is, that the BlinkStickUniversal Test Project runs without any problems. So it can’t be a hardware or connection problem.

You can find my short test Application attached. Maybe there is somebody who can take a look and can give me a hint what is going wrong?
I guess that mybe a driver / compiler / project / reference setting is missing or wrong.

Frank
BSTest4.zip (928.6 KB)


Sorry for opening up a new topic. I used the wrong link. So if someone moves this topic into the Library for IoT thread, thanks in advance

Hey Frank,
I´m sorry that I cannot help, neither with a IoT device nor with VB.
But I´ve taken a look at your codes. Arvydas already wrote a library, what is the reason you don´t use it?

So your start point should really be the example project, just rewrite it to fit to your needs. Normally you don´t need to do all this HidDevice stuff, that is what the BlinkStick lib will do for you.

For me it looks a bit like you trying to reinvent the wheel…

Dear p0ke,
as I already wrote to arvydas (and in the original, linked thread)

The example project seems to have special settings or references to run.
I spent hours to find out what was described nowhere: that the project needs WindowsRuntime 5.2.2 to even compile. Now the code in my project can be built, the blinkstick can be found, but I can not connect.

To pick up your analogy: yes, I’ve seen the demo carriage with its wheels. I took a few turns and I’m already done with changing the color and paint of this carriage.
But when I try to take these wheels to use them on my own waggon: they fall off. And nobody can tell me something about the screws to fix them on my axle.

In my project the LED part with blinkstick is only a small part of a much larger project. I need to integrate Blinkstick into this project, not my project into BlinkstickUniversalTest.
But this seems to be impossible without any information about “the magic” inside the demo project.
What makes it a bad piece of code for me - good code should be portable into other projects. But this code runs only(!) within the demo project.

So after I spent two weeks to no avail and without support or response to my feedback, I ordered an arduino clone to control the leds now.
From monday on I’ll spent my time on learning about I2C communication between Raspi and Arduino, rather than learning about “the force”.

Hi! I had exactly the same problem. To solve it I did the following:
-Add this to the manifest:

<DeviceCapability Name="humaninterfacedevice">
      <Device Id="vidpid:20A0 41E5">
        <Function Type="usage:FF00 0001" />
      </Device>
    </DeviceCapability>

-If you open the arvydas’ example manifest you will see the difference with yours.
My mistake was I didn’t realize first because if you don’t open the code’s manifest(with F7 or view code) you can’t see this device capability.

Greets!

Does the test app mentioned work for anybody else currently? I’ve got the Fall Creators Update of Windows 10 and opened the project in VS2017 but can’t get it to run. The call HidDevice.FromIdAsync always returns null. I’ve tried it on two separate laptops with the same results. Neither my own app or the test app from arvydas work.

Just to be sure you haven’t got a dud: have you tried the Blinkstick on your PC?