Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / Mac Programming / July 2008



Tip: Looking for answers? Try searching our database.

how to find all usb modems

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
skokiedude - 30 Jul 2008 20:52 GMT
Hi,

I am a Windows/C/C++ programmer who is trying write some code to find
and list all usb modems using Xcode 2.5.
Any help would be greatly appreciated.

Thanks.

Lee
skokiedude - 30 Jul 2008 21:05 GMT
> Hi,
>
[quoted text clipped - 5 lines]
>
> Lee

Additional info:
All my usb modems appear in the terminal with names that begin with
tty.usbmodem in the /dev folder.

Is there a MAC equivalent of findfirst/findnext of "dev/
tty.usbmodem*"?

Thanks again.
Reinder Verlinde - 30 Jul 2008 22:10 GMT
In article
<f2ccf7b9-b0b5-401a-ba2c-824cf85f5253@k13g2000hse.googlegroups.com>,

> > Hi,
> >
> > I am a Windows/C/C++ programmer who is trying write some code to find
> > and list all usb modems using Xcode 2.5.

Is there a reason you do not use a newer version?

> Additional info:
> All my usb modems appear in the terminal with names that begin with
> tty.usbmodem in the /dev folder.

That may be the case with all your USB modems, but how can you be sure
that that is the case for all USB modems?

> Is there a MAC equivalent of findfirst/findnext of "dev/
> tty.usbmodem*"?

You probably want to go a different route, for instance by calling
system_profiler (check the GUI app System Profiler first. If it provides
the info you need, system_profiler should be able to provide it, too) or
by using I/O Kit, iterating over all USB devices, and checking which
ones are modems. See
<http://developer.apple.com/documentation/DeviceDrivers/Conceptual/USBBoo
k/USBDeviceInterfaces/chapter_3_section_3.html#//apple_ref/doc/uid/TP4000
2645-BBIDDHCI>

Reinder
skokiedude - 31 Jul 2008 10:20 GMT
> In article
> <f2ccf7b9-b0b5-401a-ba2c-824cf85f5...@k13g2000hse.googlegroups.com>,
[quoted text clipped - 26 lines]
>
> Reinder

Thanks for your help. I'll look into it.
Gregory Weston - 31 Jul 2008 00:50 GMT
In article
<2f4451b7-1245-47cf-b564-331ca50aa890@59g2000hsb.googlegroups.com>,

> Hi,
>
> I am a Windows/C/C++ programmer who is trying write some code to find
> and list all usb modems using Xcode 2.5.
> Any help would be greatly appreciated.

<http://developer.apple.com/samplecode/SerialPortSample/index.html>

The code there does not restrict itself to USB modems, but you could
certainly add that kind of filtering of the result list if you need to.

Signature

"Harry?" Ron's voice was a mere whisper. "Do you smell something ... burning?"
  - Harry Potter and the Odor of the Phoenix

skokiedude - 31 Jul 2008 10:19 GMT
> In article
> <2f4451b7-1245-47cf-b564-331ca50aa...@59g2000hsb.googlegroups.com>,
[quoted text clipped - 13 lines]
> "Harry?" Ron's voice was a mere whisper. "Do you smell something ... burning?"
>    - Harry Potter and the Odor of the Phoenix

Thanks for help. I'll look into it.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.