bea2
![]() |
|
|
|
|
|||||||
| Howtos & FAQs (Moderated) Would you like to share some of your solutions for certain problems? Tips or tricks? Post here. All new topics are automatically moderated. |
![]() |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
This will probably also work for iPod/iPad also, but i don't have those.
Enable "tethering" (don't you just love these web2.0 yuppie words? pfff...) in your device. Go to settings, network, internet tethering, and activate it. 1. Kernel iPhone USB ethernet support There's a kernel module if_ipheth.ko in FreeBSD 8-STABLE (8.2-PRERELEASE as of writing this text), i'm not sure about earlier versions. I had the file in 8.1-RELEASE, but i can't say would it work because i haven't completed the whole procedure under 8.1-RELEASE. So just kldload that file and/or include it in your /boot/loader.conf 2. USB libraries needed for communication We'll need libimobiledevice, libplist, usbmuxd and ipheth_pair. usbmuxd will establish connection to iPhone, and it needs libimobiledevice as a main dependency. libplist comes as libimobiledevice dependency. ipheth_pair will do actual pairing, communicating with device via usbmuxd. Before that happens we can't use iPhone as gateway. $ wget --no-check-certificate http://github.com/downloads/JonathanBeck/libplist/libplist-1.3.tar.bz2$ tar xvfj libplist-1.3.tar.bz2 && cd libplist-1.3$ mkdir build && cd build && cmake ..$ su# make install$ http://www.libimobiledevice.org/downloads/libimobiledevice-1.0.4.tar.bz2$ tar xvfj libimobiledevice-1.0.4.tar.bz2 && cd libimobiledevice-1.0.4$ ./configure LDFLAGS="-L/usr/local/lib/"$ su# make install$ wget http://marcansoft.com/uploads/usbmuxd/usbmuxd-1.0.6.tar.bz2$ tar xvfj usbmuxd-1.0.6.tar.bz2 && cd usbmuxd-1.0.6$ mkdir build && cd build && cmake ..$ su# make installIf all goes ok, you'll have a functioning usbmuxd under /usr/local/sbin/usbmuxd. Now we need to take care of pairing program; $ git clone git://github.com/dgiagio/ipheth.git$ cd ipheth/ipheth-pairForget the Makefile and just run this; $ cc -Wall -O2 ipheth-pair.c -o ipheth-pair -L/usr/local/lib -I/usr/local/include -limobiledevice3. Running / testing procedure Hook up your iPhone to USB port, and you should see something like this from your kernel output; Code:
ugen7.2: <Apple Inc.> at usbus7 # /usr/local/sbin/usbmuxd -U root -fThis output indicates that communication to device has been established; Code:
[14:33:13.113][3] usbmuxd v1.0.6 starting up [14:33:13.119][3] Could not check kernel ownership of interface 0 for device 7-2: -99 [14:33:13.170][3] Connecting to new device on location 0x70002 as ID 1 [14:33:13.170][3] Initialization complete [14:33:13.171][3] Connected to v1.0 device 1 on location 0x70002 with serial number 37edfec09f8b80ea839ddbf01cf44030d942551b Code:
ipheth0: <Apple Inc. iPhone, class 0/0, rev 2.00/0.01, addr 2> on usbus7 ue0: <USB Ethernet> on ipheth0 ue0: Ethernet address: 78:ca:39:75:f8:ab Just poll the device via DHCP and you're good to go. # dhclient ue0Note : for some reason, DHCP client does not push default gateway to my routing table and DNS server entry into resolv.conf. Default gw is the address you'll get your lease from (in my case 172.10.20.1), but the DNS server isn't, in my case it's 10.48.65.30 (note it's still private scope). I had to connect my phone to Windows machine to see what kind of address USB<->ETH adapter over there gets. I haven't had time to check stability of this mechanism. |
| The Following User Says Thank You to Zare For This Useful Post: | ||
vermaden (December 9th, 2010) | ||
|
#2
|
||||
|
||||
|
Does it work for ANY iPhone, or only for older ones, or only for lates ones?
Does it work for hacked/jailbroken iPhones?
__________________
Religions, worst damnation of mankind. "FreeBSD has always been the operating system that GNU/Linux should have been." Frank Pohlmann, IBM http://vermaden.blogspot.com Last edited by DutchDaemon; December 9th, 2010 at 02:23. |
|
#3
|
|||
|
|||
|
I have iPhone 3GS. It should work with 3G and 4 also. And author of ipheth driver says it should work on 2G's with some patches. Since this mechanism is using Apple's protocol (you have same functionality in Windows or OSX), your phone doesn't have to be jailbroken.
I'm sorry, you asked does it work for jailbroken phones? Yes it does, my phone is jailbroken. Because jailed iPhone is really a dumb brick. Keep in mind that jailbreaking doesn't modify system software, which recent cases against Apple proved. On the other hand, unlocking modifies system baseband code and i'm not sure would it work. There's no sane reason why it shouldn't but my phone isn't unlocked so i can't be 100% sure. Last edited by Zare; December 9th, 2010 at 15:47. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| USB Internet connection | bishop_raven1989 | Peripheral Hardware | 5 | August 26th, 2010 18:55 |
| [Solved] Internet Connection Sharing in FreeBSD? | mefizto | Networking | 4 | July 29th, 2010 02:35 |
| how to configure Huawei EC 325 USB modem for an internet connection in Freebsd 8.0 | dalfish | Peripheral Hardware | 2 | March 6th, 2010 01:09 |
| [Solved] Internet sharing question... | trybeingarun | Firewalls | 21 | February 16th, 2010 13:37 |
| Internet connection with Huawei or other 3G USB modem | alie | Off-Topic | 6 | December 9th, 2009 07:27 |