<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[James's Programming Page — GetSerialNumber on Mac throws an exception...]]></title>
	<link rel="self" href="https://swforum.seekye.com/feed/atom/topic/10124/" />
	<updated>2019-06-12T19:12:27Z</updated>
	<generator>PunBB</generator>
	<id>https://swforum.seekye.com/topic/10124/</id>
		<entry>
			<title type="html"><![CDATA[Re: GetSerialNumber on Mac throws an exception...]]></title>
			<link rel="alternate" href="https://swforum.seekye.com/post/13062/#p13062" />
			<content type="html"><![CDATA[<p>Hi again -</p><p>Still having the issue with the GetSerialNumber() call on Mac OS.&nbsp; I built the latest source locally on the Mac to try and step through it, but didn&#039;t get very far.&nbsp; The call:</p><p>d._serialNumber = NativeMethods.IORegistryEntryGetCFProperty_String(service, NativeMethods.kIOHIDSerialNumberKey)</p><p>returns NULL.</p><p>The Windows version for the same device works fine.&nbsp; &nbsp;</p><p>Would appreciate any ideas or thoughts that I could try...the Serial Number is vital for my project.</p><p>Many thanks!</p>]]></content>
			<author>
				<name><![CDATA[johnbizios]]></name>
				<uri>https://swforum.seekye.com/user/14274/</uri>
			</author>
			<updated>2019-06-12T19:12:27Z</updated>
			<id>https://swforum.seekye.com/post/13062/#p13062</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: GetSerialNumber on Mac throws an exception...]]></title>
			<link rel="alternate" href="https://swforum.seekye.com/post/13059/#p13059" />
			<content type="html"><![CDATA[<p>Hi -</p><p>Thanks for the reply.</p><p>There is only one device for that Vendor Id.</p><p>When I do a device[0].ToString() I get:</p><p>Windows: Vertiv Co&nbsp; Liebert PST5&nbsp; &nbsp;1803900289A4A1C (VID 4271, PID 2, version 0.2)<br />Mac OS:&nbsp; &nbsp;Vertiv Co&nbsp; Liebert PST5&nbsp; &nbsp;(no serial number) (Vid 4271, PID 2, version 0.2)</p><p>The device path is different which I would expect, but don&#039;t understand the elements in the path, but perhaps you might:</p><p>Windows: \\\\?\\hid#vid_10af&amp;pid_0002#6&amp;6405ec&amp;0&amp;0000#{4d1e55b2-f16f-11cf-88cb-001111000030}<br />Mac OS:&nbsp; IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/XHC1@14/XHC1@14000000/HS02@14200000/Liebert PST5&nbsp; @14200000/IOUSBHostInterface@0/IOUSBHostHIDDevice@14200000,0</p><p>I&#039;m running Nuget HID Sharp 2.1.0.&nbsp; </p><p>Everything else is running correctly.&nbsp; I&#039;m able to get Get Reports and all the data looks is correct on both platforms, so I know that I&#039;m communicating with the device.</p><p>... john ...</p>]]></content>
			<author>
				<name><![CDATA[johnbizios]]></name>
				<uri>https://swforum.seekye.com/user/14274/</uri>
			</author>
			<updated>2019-06-02T00:12:55Z</updated>
			<id>https://swforum.seekye.com/post/13059/#p13059</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: GetSerialNumber on Mac throws an exception...]]></title>
			<link rel="alternate" href="https://swforum.seekye.com/post/13058/#p13058" />
			<content type="html"><![CDATA[<p>Are the device lists the same on both OSes for that Vendor ID, or is devices[0] referring to something that doesn&#039;t show up on Windows, perhaps?<br />I use serial numbers across all platforms all of the time. It should work.</p>]]></content>
			<author>
				<name><![CDATA[Zer]]></name>
				<uri>https://swforum.seekye.com/user/2/</uri>
			</author>
			<updated>2019-06-01T23:01:38Z</updated>
			<id>https://swforum.seekye.com/post/13058/#p13058</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[GetSerialNumber on Mac throws an exception...]]></title>
			<link rel="alternate" href="https://swforum.seekye.com/post/13057/#p13057" />
			<content type="html"><![CDATA[<p>Hi all -</p><p>The following code:</p><p>var devices = DeviceList.Local.GetHidDevices(4271).ToList();<br />var serialNumber = devices[0].GetSerialNumber();</p><p>Throws a DeviceIoException&nbsp; (&quot;Serial Number Not Found&quot;) on MacOS (Sierra), but works fine on Windows 10 (.Net Core) using the same device.</p><p>Is this a known issue?&nbsp; &nbsp;Are there any suggested work arounds?</p><p>Thanks in advance!</p>]]></content>
			<author>
				<name><![CDATA[johnbizios]]></name>
				<uri>https://swforum.seekye.com/user/14274/</uri>
			</author>
			<updated>2019-05-31T20:07:32Z</updated>
			<id>https://swforum.seekye.com/post/13057/#p13057</id>
		</entry>
</feed>
