Re: iPad2 and iPhone4S USB messages

2012-01-31 Thread David Coppa
On Tue, Jan 31, 2012 at 12:36 AM, Brynet  wrote:
> On Mon, Jan 30, 2012 at 03:52:42PM -0500, Dave Anderson wrote:
>> Rather belatedly:
>>
>> ..
>> iPad(0x129f), Apple Inc.(0x05ac)
>> ...
>>
>>   Dave
>>
>> --
>> Dave Anderson
>> 
>
> Okay.. so try this, run make in dev/usb before building.
>
> Index: uaudio.c
> ===
> RCS file: /cvs/src/sys/dev/usb/uaudio.c,v
> retrieving revision 1.94
> diff -u -p -u -r1.94 uaudio.c
> --- dev/usb/uaudio.c26 Jan 2012 09:00:36 -  1.94
> +++ dev/usb/uaudio.c30 Jan 2012 23:25:23 -
> @@ -207,6 +207,10 @@ struct uaudio_devs {
>UAUDIO_FLAG_BAD_AUDIO },
>{ { USB_VENDOR_APPLE, USB_PRODUCT_APPLE_IPOD_TOUCH_4G },
>UAUDIO_FLAG_BAD_AUDIO },
> +   { { USB_VENDOR_APPLE, USB_PRODUCT_APPLE_IPAD },
> +   UAUDIO_FLAG_BAD_AUDIO },
> +   { { USB_VENDOR_APPLE, USB_PRODUCT_APPLE_IPAD2 },
> +   UAUDIO_FLAG_BAD_AUDIO },
>{ { USB_VENDOR_CREATIVE, USB_PRODUCT_CREATIVE_EMU0202 },
>UAUDIO_FLAG_VENDOR_CLASS | UAUDIO_FLAG_EMU0202 |
>UAUDIO_FLAG_DEPENDENT },
> Index: usb_quirks.c
> ===
> RCS file: /cvs/src/sys/dev/usb/usb_quirks.c,v
> retrieving revision 1.65
> diff -u -p -u -r1.65 usb_quirks.c
> --- dev/usb/usb_quirks.c1 Dec 2011 23:02:12 -   1.65
> +++ dev/usb/usb_quirks.c30 Jan 2012 23:25:23 -
> @@ -120,7 +120,9 @@ const struct usbd_quirk_entry {
>  { USB_VENDOR_APPLE, USB_PRODUCT_APPLE_IPOD_TOUCH, ANY,{ UQ_BAD_HID
}},
>  { USB_VENDOR_APPLE, USB_PRODUCT_APPLE_IPOD_TOUCH_2G,  ANY,{ UQ_BAD_HID
}},
>  { USB_VENDOR_APPLE, USB_PRODUCT_APPLE_IPOD_TOUCH_3G,  ANY,{ UQ_BAD_HID
}},
> - { USB_VENDOR_APPLE, USB_PRODUCT_APPLE_IPOD_TOUCH_4G,  ANY,{ UQ_BAD_HID
}},
> + { USB_VENDOR_APPLE, USB_PRODUCT_APPLE_IPOD_TOUCH_4G,  ANY,{ UQ_BAD_HID
}},
> + { USB_VENDOR_APPLE, USB_PRODUCT_APPLE_IPAD,   ANY,{ UQ_BAD_HID
}},
> + { USB_VENDOR_APPLE, USB_PRODUCT_APPLE_IPAD2,  ANY,{ UQ_BAD_HID
}},
>  { USB_VENDOR_APPLE, USB_PRODUCT_APPLE_SPEAKERS,   ANY,{ UQ_BAD_HID
}},
>  { USB_VENDOR_BELKIN, USB_PRODUCT_BELKIN_F6C100,   ANY,{ UQ_BAD_HID
}},
>  { USB_VENDOR_BELKIN, USB_PRODUCT_BELKIN_F6C120,   ANY,{ UQ_BAD_HID
}},
> Index: usbdevs
> ===
> RCS file: /cvs/src/sys/dev/usb/usbdevs,v
> retrieving revision 1.570
> diff -u -p -u -r1.570 usbdevs
> --- dev/usb/usbdevs 29 Jan 2012 10:59:23 -  1.570
> +++ dev/usb/usbdevs 30 Jan 2012 23:25:24 -
> @@ -893,8 +893,10 @@ product APPLE IPOD_TOUCH_2G0x1293  iPod
>  product APPLE IPHONE_3GS   0x1294  iPhone 3GS
>  product APPLE IPHONE_4_GSM 0x1297  iPhone 4 GSM
>  product APPLE IPOD_TOUCH_3G0x1299  iPod Touch 3G
> +product APPLE IPAD 0x129a  iPad
>  product APPLE IPHONE_4_CDMA0x129c  iPhone 4 CDMA
>  product APPLE IPOD_TOUCH_4G0x129e  iPod Touch 4G
> +product APPLE IPAD20x129f  iPad 2
>  product APPLE IPHONE_4S0x12a0  iPhone 4S
>  product APPLE ETHERNET 0x1402  Ethernet A1277
>  product APPLE BLUETOOTH2   0x8205  Bluetooth

reads fine. ok for me

ciao,
David



Re: iPad2 and iPhone4S USB messages

2012-01-30 Thread Brynet
On Mon, Jan 30, 2012 at 03:52:42PM -0500, Dave Anderson wrote:
> Rather belatedly:
> 
> ..
> iPad(0x129f), Apple Inc.(0x05ac)
> ...
> 
>   Dave
> 
> -- 
> Dave Anderson
> 

Okay.. so try this, run make in dev/usb before building.

Index: uaudio.c
===
RCS file: /cvs/src/sys/dev/usb/uaudio.c,v
retrieving revision 1.94
diff -u -p -u -r1.94 uaudio.c
--- dev/usb/uaudio.c26 Jan 2012 09:00:36 -  1.94
+++ dev/usb/uaudio.c30 Jan 2012 23:25:23 -
@@ -207,6 +207,10 @@ struct uaudio_devs {
UAUDIO_FLAG_BAD_AUDIO },
{ { USB_VENDOR_APPLE, USB_PRODUCT_APPLE_IPOD_TOUCH_4G },
UAUDIO_FLAG_BAD_AUDIO },
+   { { USB_VENDOR_APPLE, USB_PRODUCT_APPLE_IPAD },
+   UAUDIO_FLAG_BAD_AUDIO },
+   { { USB_VENDOR_APPLE, USB_PRODUCT_APPLE_IPAD2 },
+   UAUDIO_FLAG_BAD_AUDIO },
{ { USB_VENDOR_CREATIVE, USB_PRODUCT_CREATIVE_EMU0202 },
UAUDIO_FLAG_VENDOR_CLASS | UAUDIO_FLAG_EMU0202 |
UAUDIO_FLAG_DEPENDENT },
Index: usb_quirks.c
===
RCS file: /cvs/src/sys/dev/usb/usb_quirks.c,v
retrieving revision 1.65
diff -u -p -u -r1.65 usb_quirks.c
--- dev/usb/usb_quirks.c1 Dec 2011 23:02:12 -   1.65
+++ dev/usb/usb_quirks.c30 Jan 2012 23:25:23 -
@@ -120,7 +120,9 @@ const struct usbd_quirk_entry {
  { USB_VENDOR_APPLE, USB_PRODUCT_APPLE_IPOD_TOUCH, ANY,{ UQ_BAD_HID }},
  { USB_VENDOR_APPLE, USB_PRODUCT_APPLE_IPOD_TOUCH_2G,  ANY,{ UQ_BAD_HID }},
  { USB_VENDOR_APPLE, USB_PRODUCT_APPLE_IPOD_TOUCH_3G,  ANY,{ UQ_BAD_HID }},
- { USB_VENDOR_APPLE, USB_PRODUCT_APPLE_IPOD_TOUCH_4G,  ANY,{ UQ_BAD_HID 
}}, 
+ { USB_VENDOR_APPLE, USB_PRODUCT_APPLE_IPOD_TOUCH_4G,  ANY,{ UQ_BAD_HID }},
+ { USB_VENDOR_APPLE, USB_PRODUCT_APPLE_IPAD,   ANY,{ UQ_BAD_HID }},
+ { USB_VENDOR_APPLE, USB_PRODUCT_APPLE_IPAD2,  ANY,{ UQ_BAD_HID }},
  { USB_VENDOR_APPLE, USB_PRODUCT_APPLE_SPEAKERS,   ANY,{ UQ_BAD_HID }},
  { USB_VENDOR_BELKIN, USB_PRODUCT_BELKIN_F6C100,   ANY,{ UQ_BAD_HID }},
  { USB_VENDOR_BELKIN, USB_PRODUCT_BELKIN_F6C120,   ANY,{ UQ_BAD_HID }},
Index: usbdevs
===
RCS file: /cvs/src/sys/dev/usb/usbdevs,v
retrieving revision 1.570
diff -u -p -u -r1.570 usbdevs
--- dev/usb/usbdevs 29 Jan 2012 10:59:23 -  1.570
+++ dev/usb/usbdevs 30 Jan 2012 23:25:24 -
@@ -893,8 +893,10 @@ product APPLE IPOD_TOUCH_2G0x1293  iPod 
 product APPLE IPHONE_3GS   0x1294  iPhone 3GS
 product APPLE IPHONE_4_GSM 0x1297  iPhone 4 GSM
 product APPLE IPOD_TOUCH_3G0x1299  iPod Touch 3G
+product APPLE IPAD 0x129a  iPad
 product APPLE IPHONE_4_CDMA0x129c  iPhone 4 CDMA
 product APPLE IPOD_TOUCH_4G0x129e  iPod Touch 4G
+product APPLE IPAD20x129f  iPad 2
 product APPLE IPHONE_4S0x12a0  iPhone 4S
 product APPLE ETHERNET 0x1402  Ethernet A1277
 product APPLE BLUETOOTH2   0x8205  Bluetooth



Re: iPad2 and iPhone4S USB messages

2012-01-30 Thread Dave Anderson
On Sat, 24 Dec 2011, Dave Anderson wrote:

>On Fri, 23 Dec 2011, Brynet wrote:
>
>>On Fri, Dec 23, 2011 at 09:30:44PM -0500, Dave Anderson wrote:
>>> For the iPhone, yes, but evidently not for the iPad2.
>>
>>Yes, it will be a manual effort for as long as Apple releases new devices.
>>
>>> >If you want to use libusb ports (..like gphoto2), you'll need to add 
>>> >similars
>>> >quirks for the iPad2.
>>> >
>>> >You didn't post the product ID.
>>>
>>> I assumed (perhaps foolishly) that this was already known since the
>>> device was recognized as '"Apple Inc. iPad" rev 2.00/0.01'.  And I don't
>>> _have_ the product ID anywhere I know of (other than by looking in the
>>> source).
>>
>>That is the product name obtained from the device itself, you'll need to add 
>>it
>>to usbdevs and regen first. Patches for other iDevices are on the lists, it
>>should be easy enough for you to find them in the archives.
>>
>>Each model has it's own product ID, AFAIK they're not published by Apple.
>>
>>Look at usbdevs(8), specifically the verbose option.
>
>Ungh.  I think I was confusing what appears in the dmesg for PCI devices
>with what appears for USB devices.  Apologies to all.  I'll run usbdevs
>and report the product ID when I get the chance.  There's no urgency
>from my side; I'm not trying to do anything with this (yet).

Rather belatedly:

# usbdevs -v
Controller /dev/usb0:
addr 1: high speed, self powered, config 1, EHCI root hub(0x), 
Intel(0x8086), rev 1.00
 port 1 addr 2: high speed, self powered, config 1, Rate Matching Hub(0x0024), 
Intel(0x8087), rev 0.00
  port 1 addr 3: full speed, power 100 mA, config 1, product 0x0018(0x0018), 
vendor 0x138a(0x138a), rev 0.78, iSerialNumber 723ca8ccb3ec
  port 2 addr 4: high speed, power 500 mA, config 1, HP TrueVision HD(0xd281), S
uYin
(0x064e), rev 1.10, iSerialNumber HF1016-A821-OV011-VH-R01.01.00
  port 3 powered
  port 4 powered
  port 5 powered
  port 6 powered
 port 2 powered
Controller /dev/usb1:
addr 1: high speed, self powered, config 1, EHCI root hub(0x), 
Intel(0x8086), rev 1.00
 port 1 addr 2: high speed, self powered, config 1, Rate Matching Hub(0x0024), 
Intel(0x8087), rev 0.00
  port 1 addr 3: high speed, power 500 mA, config 2, iPad(0x129f), Apple 
Inc.(0x05ac), rev 0.01, iSerialNumber 0180f6af0eec5919c2d1b373dc8253afcabd1925
  port 2 powered
  port 3 powered
  port 4 powered
  port 5 powered
  port 6 powered
 port 2 powered
#

Dave

-- 
Dave Anderson




Re: iPad2 and iPhone4S USB messages

2011-12-23 Thread Dave Anderson
On Fri, 23 Dec 2011, Brynet wrote:

>On Fri, Dec 23, 2011 at 09:30:44PM -0500, Dave Anderson wrote:
>> For the iPhone, yes, but evidently not for the iPad2.
>
>Yes, it will be a manual effort for as long as Apple releases new devices.
>
>> >If you want to use libusb ports (..like gphoto2), you'll need to add 
>> >similars
>> >quirks for the iPad2.
>> >
>> >You didn't post the product ID.
>>
>> I assumed (perhaps foolishly) that this was already known since the
>> device was recognized as '"Apple Inc. iPad" rev 2.00/0.01'.  And I don't
>> _have_ the product ID anywhere I know of (other than by looking in the
>> source).
>
>That is the product name obtained from the device itself, you'll need to add it
>to usbdevs and regen first. Patches for other iDevices are on the lists, it
>should be easy enough for you to find them in the archives.
>
>Each model has it's own product ID, AFAIK they're not published by Apple.
>
>Look at usbdevs(8), specifically the verbose option.

Ungh.  I think I was confusing what appears in the dmesg for PCI devices
with what appears for USB devices.  Apologies to all.  I'll run usbdevs
and report the product ID when I get the chance.  There's no urgency
from my side; I'm not trying to do anything with this (yet).

Dave

-- 
Dave Anderson




Re: iPad2 and iPhone4S USB messages

2011-12-23 Thread Brynet
On Fri, Dec 23, 2011 at 09:30:44PM -0500, Dave Anderson wrote:
> For the iPhone, yes, but evidently not for the iPad2.

Yes, it will be a manual effort for as long as Apple releases new devices.

> >If you want to use libusb ports (..like gphoto2), you'll need to add similars
> >quirks for the iPad2.
> >
> >You didn't post the product ID.
> 
> I assumed (perhaps foolishly) that this was already known since the
> device was recognized as '"Apple Inc. iPad" rev 2.00/0.01'.  And I don't
> _have_ the product ID anywhere I know of (other than by looking in the
> source).

That is the product name obtained from the device itself, you'll need to add it 
to usbdevs and regen first. Patches for other iDevices are on the lists, it 
should be easy enough for you to find them in the archives.

Each model has it's own product ID, AFAIK they're not published by Apple.

Look at usbdevs(8), specifically the verbose option.

-Bryan.



Re: iPad2 and iPhone4S USB messages

2011-12-23 Thread Dave Anderson
On Fri, 23 Dec 2011, Brynet wrote:

>Yup,

>Any new iDevice will show up as uaudio/uhid, dhill@ already committed
>something so they'll attach as ugen(4) instead.

For the iPhone, yes, but evidently not for the iPad2.

>If you want to use libusb ports (..like gphoto2), you'll need to add similars
>quirks for the iPad2.
>
>You didn't post the product ID.

I assumed (perhaps foolishly) that this was already known since the
device was recognized as '"Apple Inc. iPad" rev 2.00/0.01'.  And I don't
_have_ the product ID anywhere I know of (other than by looking in the
source).

>-Bryan.

Dave

-- 
Dave Anderson




Re: iPad2 and iPhone4S USB messages

2011-12-23 Thread Brynet
Yup,

Any new iDevice will show up as uaudio/uhid, dhill@ already committed something 
so they'll attach as ugen(4) instead.

If you want to use libusb ports (..like gphoto2), you'll need to add similars 
quirks for the iPad2.

You didn't post the product ID.

-Bryan.



iPad2 and iPhone4S USB messages

2011-12-22 Thread Dave Anderson
A few days ago someone posted info about what happened when a couple of
Apple devices were plugged into a USB port on an OpenBSD system.  I just
had the opportunity to try this with an iPad2 and an iPhone4S on an
amd64 system running current (source tree updated to about 2200 EST
2011/12/20 before rebuilding the system); here are the results.

Insert iPad2:

uaudio0 at uhub3 port 1 configuration 2 interface 0 "Apple Inc. iPad" rev 
2.00/0.01 addr 3
uaudio0: audio rev 1.00, 0 mixer controls
audio1 at uaudio0
uhidev0 at uhub3 port 1 configuration 2 interface 2 "Apple Inc. iPad" rev 
2.00/0.01 addr 3
uhidev0: iclass 3/0, 21 report ids
uhid0 at uhidev0 reportid 1: input=5, output=0, feature=0
uhid1 at uhidev0 reportid 2: input=9, output=0, feature=0
uhid2 at uhidev0 reportid 3: input=13, output=0, feature=0
uhid3 at uhidev0 reportid 4: input=17, output=0, feature=0
uhid4 at uhidev0 reportid 5: input=25, output=0, feature=0
uhid5 at uhidev0 reportid 6: input=49, output=0, feature=0
uhid6 at uhidev0 reportid 7: input=95, output=0, feature=0
uhid7 at uhidev0 reportid 8: input=193, output=0, feature=0
uhid8 at uhidev0 reportid 9: input=257, output=0, feature=0
uhid9 at uhidev0 reportid 10: input=385, output=0, feature=0
uhid10 at uhidev0 reportid 11: input=513, output=0, feature=0
uhid11 at uhidev0 reportid 12: input=767, output=0, feature=0
uhid12 at uhidev0 reportid 13: input=0, output=5, feature=0
uhid13 at uhidev0 reportid 14: input=0, output=9, feature=0
uhid14 at uhidev0 reportid 15: input=0, output=13, feature=0
uhid15 at uhidev0 reportid 16: input=0, output=17, feature=0
uhid16 at uhidev0 reportid 17: input=0, output=25, feature=0
uhid17 at uhidev0 reportid 18: input=0, output=49, feature=0
uhid18 at uhidev0 reportid 19: input=0, output=95, feature=0
uhid19 at uhidev0 reportid 20: input=0, output=193, feature=0
uhid20 at uhidev0 reportid 21: input=0, output=255, feature=0

Remove iPad2:

audio1 detached
uaudio0 detached
uhid0 detached
uhid1 detached
uhid2 detached
uhid3 detached
uhid4 detached
uhid5 detached
uhid6 detached
uhid7 detached
uhid8 detached
uhid9 detached
uhid10 detached
uhid11 detached
uhid12 detached
uhid13 detached
uhid14 detached
uhid15 detached
uhid16 detached
uhid17 detached
uhid18 detached
uhid19 detached
uhid20 detached
uhidev0 detached

Insert iPhone4S:

ugen1 at uhub3 port 1 "Apple Inc. iPhone" rev 2.00/0.01 addr 3

Remove iPhone4S:

ugen1 detached

Dave

-- 
Dave Anderson