The misunderstanding is likely all in my head, but I’m having difficulties 
starting with the mount point to obtain the pid/vid, and vice versa. I can get 
all the mount points but have no way to associate them with a particular 
pid/vid. And I can obtain the pid/vid, as you mention, but have no way to find 
out what the mount point for them is. IORegistryExplorer doesn’t show you the 
mount point, does it?

-Carl

> On Jul 8, 2015, at 5:07 PM, Roland King <[email protected]> wrote:
> 
> Isn’t this just the flip side of the question you asked last month here 
> http://lists.apple.com/archives/usb/2015/Jun/msg00005.html 
> <http://lists.apple.com/archives/usb/2015/Jun/msg00005.html>
> 
> There you said you started with the VID/PID and wanted the name, so if you 
> have that code and you used the VID/PID to find the name, then you know what 
> the VID/PID combination was because you used it to do the search in the first 
> place. 
> 
> Alternatively since you can see it in the explorer then just do what the 
> explorer does, get the IOUSBProperties for the io_object, either all of them 
> or the one for the vendor/product id code. If it doesn’t have one there then 
> get its parent and look there, exactly what you’d do if you were hunting up 
> the io registry explorer, there are properties at each level. The function 
> for getting one property by name is in that thread, getting them all is in 
> the same header as that function and the function for getting parents etc and 
> walking your way up and down the tree aren’t too hard to find in the 
> documentation. 
> 
> 
>> On 9 Jul 2015, at 04:34, Carl Hoefs <[email protected] 
>> <mailto:[email protected]>> wrote:
>> 
>> Gordon,
>> 
>> The devices we’re using are not the same, nor from the same vendor. One has 
>> an assigned PID/VID, the other only has a VID (PID is 0x0). iSerialNumber 
>> for both show 0x0 in IORegistryExplorer. 
>> 
>> So… what I’m hoping is either:
>> - To find the BSD mount point based on PID/VID, or
>> - To find PID/VID based on BSD mount point
>> 
>> If I could do either of these, I’d be in business. As it stands, my app can 
>> find all mount points for modem-type devices, but I have no programmatic way 
>> to match them to a specific PID/VID.
>> -Carl
>> 
>> 
>>> On Jul 8, 2015, at 12:17 PM, Gordon Rankin <[email protected] 
>>> <mailto:[email protected]>> wrote:
>>> 
>>> Carl,
>>> 
>>> If the devices are identical and they do not have a unique serial number or 
>>> something differentiating them then the mount point will not be easy to 
>>> determine.
>>> 
>>> We had this problem with USB Audio devices that had the same vid, pid and 
>>> serial number. We are now shipping all products with unique serial numbers 
>>> so the devices will be easier to find.
>>> 
>>> Thanks,
>>> Gordon
>>> 
>>> On 7/8/15 3:00 PM, [email protected] 
>>> <mailto:[email protected]> wrote:
>>>> Message: 1
>>>> Date: Tue, 07 Jul 2015 16:15:51 -0700
>>>> From: Carl Hoefs <[email protected] 
>>>> <mailto:[email protected]>>
>>>> To: [email protected] <mailto:[email protected]>
>>>> Subject: USB devices and BSD mount points
>>>> Message-ID:
>>>>    <[email protected] 
>>>> <mailto:[email protected]>>
>>>> Content-Type: text/plain; charset=utf-8
>>>> 
>>>> I have a Cocoa app (10.10.4) that needs to connect to two USB devices. For 
>>>> one device, the system will assign it a BSD mount point like 
>>>> “/dev/cu.usbmodem431”, and for the other device, “/dev/cu.usbmodem641”. 
>>>> However, sometimes the number changes, so the 431 will be 471, or the 641 
>>>> will be 671, etc.
>>>> 
>>>> Since the mount point is not fixed, what method can I rely on to determine 
>>>> which device is which? Will the one device always have an enumeration in 
>>>> the 400s, and the other in the 600s, or is this a completely arbitrary 
>>>> number? (It seems not to be arbitrary since the one device always shows up 
>>>> in the 400s and the other always in the 600s, but this seems like a very 
>>>> fragile assumption.)
>>>> 
>>>> -Carl
>>> 
> 

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Usb mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/usb/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to