Device.Net icon indicating copy to clipboard operation
Device.Net copied to clipboard

`ConnectedDeviceDefinition`s missing their data from GetConnectedDeviceDefinitionsAsync on Mac

Open bryancostanich opened this issue 6 years ago • 1 comments

Hi, i'm trying to use this on mac, i have the following sample app:

using System;
using System.Collections.Generic;
using Device.Net;

using Device.Net.LibUsb;

namespace Device.Net_Test
{
    class Program
    {
        private static readonly DebugLogger Logger = new DebugLogger();
        private static readonly DebugTracer Tracer = new DebugTracer();

        static async System.Threading.Tasks.Task Main(string[] args)
        {
            LibUsbUsbDeviceFactory.Register(Logger, Tracer);

            var devices2 = await DeviceManager.Current.GetConnectedDeviceDefinitionsAsync(null);

            foreach (var d in devices2) {
                Console.WriteLine($"Found Device, ID: {d.DeviceId}, from: {d.Manufacturer}, serial: {d.SerialNumber}");
            }

            Console.WriteLine("Any key to bail out.");
            Console.ReadKey();
        }
    }
}

but i'm missing at least Manufacturer and SerialNumber (and I suspect many more):

Found Device, ID: usbdev20.52, from: , serial: 
Found Device, ID: usbdev20.51, from: , serial: 
Found Device, ID: usbdev3.4, from: , serial: 
Found Device, ID: usbdev3.3, from: , serial: 
Found Device, ID: usbdev3.2, from: , serial: 
Found Device, ID: usbdev20.50, from: , serial: 
Found Device, ID: usbdev20.49, from: , serial: 
Found Device, ID: usbdev20.48, from: , serial: 
...

I'm using the 3.0.0beta2 nuget package and building on Core 2.0 on the mac. I had to switch to the pre-release package because none of the APIs documented in samples worked in the stable.

bryancostanich avatar Aug 19 '19 02:08 bryancostanich

@bryancostanich will try to fix in 3.1

MelbourneDeveloper avatar Aug 19 '19 04:08 MelbourneDeveloper