• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Identifying port names for users
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Identifying port names for users


  • Subject: Re: Identifying port names for users
  • From: Bernd Löhr <email@hidden>
  • Date: Thu, 10 Apr 2003 16:02:21 +0200

Mark,

Am Donnerstag, 10.04.03 um 13:14 Uhr schrieb Mark Thomas:

Hi Bernd,
The problem I have seen isn't specific to the WebShuttle, but I am seeing
this with the BT Highway box, as I get different names there as well :-(.
Yes, it is the way how the BSD stuff, IOKit and Network config use each others data - or doesn't.

So I was wondering from the MoreSCCreatePortArray which I am using, this
does all the IORegistry searching and pulling all the correct data together
from the USB IORegistry planes ???. Should it be treating things the same
way as the network config, if there are specific specialty required ???.
Well, it doesn't. The user defined name, for example, is either the IOTTYBaseName as mixed case string with '-port' postfix. The device name is the original IOTTYBaseName value and the IOTTYBaseName entry is the original IOTTYBaseName as lower case.
Except if the IOTTYBaseName (in lower case) was found in one of the string lists in /System/Library/PrivateFrameworks.../Network... where it might have been translated into something else - but only if it has no space in it's name.
Easy, isn't it?

0 : <CFString 0x1465ef0 [0x8016024c]>{contents = "Type"} = <CFString
0x1467700 [0x8016024c]>{contents = "PPP"}

...snip...
11 : <CFString 0xdc0b0 [0x8016024c]>{contents = "DeviceName"} =
<CFString 0x1467e70 [0x8016024c]>{contents = "BT Digital Access USB"}
13 : <CFString 0x14674d0 [0x8016024c]>{contents = "SortOrder"} =
<CFNumber 0x14678b0 [0x8016024c]>{value = 4, type = kCFNumberSInt32Type}
14 : <CFString 0x1466990 [0x8016024c]>{contents = "UserDefinedName"} =
<CFString 0x14669b0 [0x8016024c]>{contents = "bt digital access usb-port"}

I did think that if there is a key "IOTTYBaseName", and that values is
within the "UserDefinedName" string, then use the "DeviceName", but that
only half's works (for "bt digital access usb-port") as for the webshuttle
name doesn't even work. I never see "WebShuttle 1 MLPPP".
So, if you do a ls -l /dev you will see the device names from the dicts above as tty and cu names.
And this all you get (and all I got during my former research).

So I am wondering if this is a bug in this code or is it user error
I had to keep the BSD names as short as possible for our devices, because in 10.0.x I ran into trouble with TTY names longer than 16 chars. And we have some long port names like "Leonardo USB (1) MLPPP (A)".
And because of compatibility I cannot change that anymore... :-(

( Quinn any ideas )

I guess other tools are suffering from this maybe ???.

I had a go digging out the USB product name, but I just got back
"WebShuttle", not the "WebShuttle 1 MLPPP", any ideas ???
It should be present as a property in the IOModemSerialStreamSync instance.

Bernd


Hi Mark,

this has to do with the way the Network Setup/Config stuff works. I
tried hard to get a decent port name to be displayed in ZTerm for
instance, but all you get as a serial client is the BSD name (which is
ws_imlppp something).
The internal modem port name is specially treated in Network config;
there might be a translation (German: "Internes Modem") displayed.
Please have a look at:
1.
/System/Library/PrivateFrameworks/NetworkConfig.framework/Versions/A/
Resources
Inside the language directories you'll find some string lists, which
will further confuse you...
2. With the IORegistryExplorer you might have a look at the properties
of the different classes, for WebShuttle:
Search the Service Plane for WebShuttle and you will eventually find
the three ports (IOModemSerialStreamSync and IOSerialBSDClient).
What you'll need is to get the 'Product name' entry out of the
IOModemSerialStreamSync, the BSD name is right there as well.
BTW, the 'Product Name' key also exist on USB CDC devices - USB modems
which do not need a driver.

As I heard through the grapevine the Network configuration stuff will
change quite a bit with 10.3, so, after playing around with patching
here and there to have a more user friendly display of port names, I
finally gave up for now :-( and wait for better times...

Ciao

Bernd


Am Mittwoch, 09.04.03 um 16:04 Uhr schrieb Mark Thomas:

Hi,
Does anyone know what key should you be using when you get a list of
the
port/services from the MoreSCCopyServiceIDs call. As by going by the
kSCPropUserDefinedName doesn't always show the same name which appears
in
the network settings active ports list,

Any ideas why, as using the kSCPropUserDefinedName key gives me the
proper
"Internal modem" string, but doesn't work for all for all devices e.g.
The
WebShuttle device kSCPropUserDefinedName is "ws_imlppp-ports", but the
name
which appears in the active port list is "WebShuttle 1 MLPPP"

So I am wonderig if there's another field which I am suppose to use
???.

Thanks
Mark.
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: Creating multiple OT Contexts
  • Next by Date: Re: Identifying port names for users
  • Previous by thread: Re: AppleTalk socket question
  • Next by thread: Re: Identifying port names for users
  • Index(es):
    • Date
    • Thread