Re: Waiting for a USB device to connect
Re: Waiting for a USB device to connect
- Subject: Re: Waiting for a USB device to connect
- From: "Finlay Dobbie" <email@hidden>
- Date: Thu, 6 Sep 2007 15:09:00 +0100
IOKit is almost certainly the way forward. At that point, this stops
being a Cocoa specific question, and you might want to try one of the
other lists (I believe there is one specifically for USB).
There is a wealth of information and sample code on the ADC site.
-- Finlay
On 06/09/07, Patrick Quinn-Graham <email@hidden> wrote:
> Howdy all,
>
> I have a little app that shows information from an attached Huawei
> E220 HSDPA modem, does this by reading from /dev/tty.HUAWEIMobile-
> Pcui. In general, not too difficult.
>
> The only problem I have is with detecting it being plugged in. It's
> easy to check (can we open the /dev/tty?), so a quick check on
> startup is fine for that. But, if one isn't plugged in (or it's
> unplugged while the app is running), then polling in the app to check
> if it is there seems like totally the wrong way to do it - to me at
> least.
>
> Can I get a suggestion on the right way to do this? Is their a
> notification I could subscribe to for USB devices being plugged in?
> Or is there a "won't cause my head to explode too badly" way to watch
> (without polling myself) to see if the /dev/tty comes into existence?
>
> cheers,
>
> Patrick Quinn-Graham - +44 78 7217 2213 - http://about.patrick.geek.nz
>
> There's a 20% chance of tomorrow.
> -- /usr/games/fortune
>
>
>
>
>
>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden