Bug 516124 - [PATCH] Add support for Iphone 3GS
Summary: [PATCH] Add support for Iphone 3GS
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: libiphone
Version: 11
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Peter Robinson
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-08-06 20:37 UTC by Adel Gadllah
Modified: 2009-08-18 21:16 UTC (History)
3 users (show)

Fixed In Version: 0.9.3-4.fc10
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-08-18 21:11:25 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Add support for the Iphone 3GS (1.52 KB, patch)
2009-08-06 20:38 UTC, Adel Gadllah
no flags Details | Diff

Description Adel Gadllah 2009-08-06 20:37:29 UTC
Description of problem:

The current release shipped in Fedora does not support the Iphone 3gs, supporting it is just a matter of adding the device id.

Patch is attached, I tested it and it works fine here.

Please consider applying it to the current package (can also commit it myself after you ack it).

Comment 1 Adel Gadllah 2009-08-06 20:38:20 UTC
Created attachment 356582 [details]
Add support for the Iphone 3GS

Comment 2 Peter Robinson 2009-08-06 20:52:47 UTC
There's a new version of libiphone due out momentarily that will not only add support for the GS but also tethering support and various other bits. I was actually just testing the current git head to make sure it all compiles properly. It should be released shortly and will be headed to updates-testing shortly there after.

Comment 3 Adel Gadllah 2009-08-06 21:29:40 UTC
(In reply to comment #2)
> There's a new version of libiphone due out momentarily that will not only add
> support for the GS but also tethering support and various other bits. I was
> actually just testing the current git head to make sure it all compiles
> properly. It should be released shortly and will be headed to updates-testing
> shortly there after.  

OK, wasn't aware of that.

"also tethering support"

Are you sure about that? This would require a usbnet device driver in the kernel.

Comment 4 Peter Robinson 2009-08-06 21:51:23 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > There's a new version of libiphone due out momentarily that will not only add
> > support for the GS but also tethering support and various other bits. I was
> > actually just testing the current git head to make sure it all compiles
> > properly. It should be released shortly and will be headed to updates-testing
> > shortly there after.  
> 
> OK, wasn't aware of that.
> 
> "also tethering support"
> 
> Are you sure about that? This would require a usbnet device driver in the
> kernel.  

No it wouldn't, it would need a libusb device and a means to multiplex multiple connections over is. The later will be provided by usbmuxd which is in review.

Comment 5 Dan Williams 2009-08-06 22:29:18 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > (In reply to comment #2)
> > > There's a new version of libiphone due out momentarily that will not only add
> > > support for the GS but also tethering support and various other bits. I was
> > > actually just testing the current git head to make sure it all compiles
> > > properly. It should be released shortly and will be headed to updates-testing
> > > shortly there after.  
> > 
> > OK, wasn't aware of that.
> > 
> > "also tethering support"
> > 
> > Are you sure about that? This would require a usbnet device driver in the
> > kernel.  
> 
> No it wouldn't, it would need a libusb device and a means to multiplex multiple
> connections over is. The later will be provided by usbmuxd which is in review.  

From the NetworkManager perspective, how is the iPhone's USB ethernet going to be exposed?  Via a normal eth device?  Or something like a TAP device?

One problem you'll have if you're not writing a real kernel driver is that you'll be completely outside the device tree.  We won't be able to get any hardware information for the device using udev or whatever, and we won't be able to figure out what the net interface's hardware parent device is, and thus what its details are.  That's a problem with something like a TAP device too, which is really just a virtual driver not tied to a hardware device.  But the iPhone ethernet *is* tied to a hardware device, so a TAP interface isn't really appropriate here.

Second, we won't be able to use udev events (which are normal kernel events really) for hotplug for the device AFAIK.

Not writing a real kernel driver for it means you're completely outside the normal hardware discovery and information mechanisms and thus painting yourself into a corner, requiring apps to have specialized knowledge about your (and ever other non-kernel) driver before they can use it.

Unless I'm mistaken and it will show up in sysfs with the right device links and everything?  Basically, if the ethernet interface doesn't show up in sysfs with the right links to it's parent USB device, then this effort is just a hack...

Comment 6 Peter Robinson 2009-08-06 22:42:41 UTC
> From the NetworkManager perspective, how is the iPhone's USB ethernet going to
> be exposed?  Via a normal eth device?  Or something like a TAP device?

Not sure, I don't have an iPhone GS. I'll test it when I catch up with a mate that does.

> One problem you'll have if you're not writing a real kernel driver is that
> you'll be completely outside the device tree.  We won't be able to get any
> hardware information for the device using udev or whatever, and we won't be
> able to figure out what the net interface's hardware parent device is, and thus
> what its details are.  That's a problem with something like a TAP device too,
> which is really just a virtual driver not tied to a hardware device.  But the
> iPhone ethernet *is* tied to a hardware device, so a TAP interface isn't really
> appropriate here.
> 
> Second, we won't be able to use udev events (which are normal kernel events
> really) for hotplug for the device AFAIK.

It has udev support, Bastien Nocera has been dealing with a chunk of that so I think its mostly in hand.

> Not writing a real kernel driver for it means you're completely outside the
> normal hardware discovery and information mechanisms and thus painting yourself
> into a corner, requiring apps to have specialized knowledge about your (and
> ever other non-kernel) driver before they can use it.
> 
> Unless I'm mistaken and it will show up in sysfs with the right device links
> and everything?  Basically, if the ethernet interface doesn't show up in sysfs
> with the right links to it's parent USB device, then this effort is just a
> hack...  

I think it exposes a NAP interface, but don't quote me as I can't seem to find the email atm.

Comment 7 Dan Williams 2009-08-07 13:47:01 UTC
You seem to be referring to Bluetooth support.  I thought earlier you were talking about actual USB ethernet support.  In any case, however it gets done (as long as it's the right way :) I don't really care, as long as people can use the phones.  Cheers.

Comment 8 Peter Robinson 2009-08-07 13:59:49 UTC
Yes, you are right. Looking back through my email the pending NEWS file looks something like this for usbmuxd:

usbmuxd:
* New daemon to allow multiple connections to devices
* Add iPhone 3GS support and expose new tethering USB interface
* First public release available
* Fix race condition using multiple clients simultaneously
* Fix various usbmux protocol bugs

Comment 9 Bastien Nocera 2009-08-07 14:34:34 UTC
(In reply to comment #8)
> Yes, you are right. Looking back through my email the pending NEWS file looks
> something like this for usbmuxd:
> 
> usbmuxd:
> * New daemon to allow multiple connections to devices
> * Add iPhone 3GS support and expose new tethering USB interface

I think this is the "iproxy" which can forward TCP connections from the phone, over usbmuxd. The example is setting up an ssh-tunnel over the phone. I don't think this is tethering per se...

Comment 10 Fedora Update System 2009-08-11 21:38:34 UTC
ifuse-0.9.3-1.fc11,libiphone-0.9.3-1.fc11,usbmuxd-0.1.4-1.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/ifuse-0.9.3-1.fc11,libiphone-0.9.3-1.fc11,usbmuxd-0.1.4-1.fc11

Comment 11 Fedora Update System 2009-08-11 22:07:19 UTC
ifuse-0.9.3-4.fc10,libiphone-0.9.3-1.fc10,usbmuxd-0.1.4-1.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/ifuse-0.9.3-4.fc10,libiphone-0.9.3-1.fc10,usbmuxd-0.1.4-1.fc10

Comment 12 Fedora Update System 2009-08-12 20:53:28 UTC
ifuse-0.9.3-4.fc10, libiphone-0.9.3-1.fc10, usbmuxd-0.1.4-1.fc10 has been pushed to the Fedora 10 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update ifuse libiphone usbmuxd'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F10/FEDORA-2009-8500

Comment 13 Fedora Update System 2009-08-12 20:57:02 UTC
ifuse-0.9.3-1.fc11, libiphone-0.9.3-1.fc11, usbmuxd-0.1.4-1.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update ifuse libiphone usbmuxd'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-8509

Comment 14 Fedora Update System 2009-08-18 21:11:20 UTC
ifuse-0.9.3-1.fc11, libiphone-0.9.3-1.fc11, usbmuxd-0.1.4-1.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 15 Fedora Update System 2009-08-18 21:16:50 UTC
ifuse-0.9.3-4.fc10, libiphone-0.9.3-1.fc10, usbmuxd-0.1.4-1.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.