• 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: Waiting for a USB device to connect
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Waiting for a USB device to connect
      • From: Ilan Volow <email@hidden>
References: 
 >Waiting for a USB device to connect (From: Patrick Quinn-Graham <email@hidden>)

  • Prev by Date: Re: [ANN] RegexKit - An Objective-C Framework for Regular Expressions Using the PCRE Library
  • Next by Date: Re: Propagating change in object graph
  • Previous by thread: Waiting for a USB device to connect
  • Next by thread: Re: Waiting for a USB device to connect
  • Index(es):
    • Date
    • Thread