IPhone USB Tethering to Pfsense ($150)
-
This might help if you haven't seen it already. http://forums.freebsd.org/showthread.php?t=19995
This would have some practical applications. I've had a think about how needed it is vs. putting a compatible wireless NIC in place (which I've seen for ~£5 on eBay) and connecting to an iPhone in AP mode (Android user speaking, not sure if iOS offers that) and plugging the phone into a USB port for power also and I am interested in what situation it would be the ideal solution for? This is not to criticize, just to understand.
-
Saw this and thought I would reply…
I have recently just tried this, as I have tethering available on my iPhone. Seems the iphone requires ADHOC connection to connect the native IOS Wifi Hotspot. In Pfsense 2.0.1, if I configure my wireless interface as ADHOC, the machine reboots and I get a kernel panic over and over again upon reboot until I physically remove the card. I've tried this multiple times, not sure if it's my on WRAP having issues, or maybe my Artheros card.
Anyone gotten an ADHOC connection working in Pfsense 2.0.1? This is probably not something that is used/configured all that much.
-
My Android phone connects to at least a few different APs. I have never had to try it in ad hoc mode. :-)
Some time ago I did try adhoc mode on a number of devices with distinct RALINK chipsets and got kernel panics very quickly after enabling them. I agree with your conclusion that adhoc mode is probably not configured/used very often with FreeBSD.
-
My android phone works without an issue too, not that this helps you, I'm mentioning for anyone else that comes across this post. You can get dirt cheap android devices that support AP mode, could be a cheap work around in the mean time. I may be getting an iPhone for work and I shall give it a go if it happens. What iOS version did you try on by the way?
-
I too have never been able to get the wireless AP mode on the iPhone to connect properly to a wireless adapter used by pfsense. My offer of $100 still stands for a true USB-tethering solution for iPhone to pfsense. This would be especially nice now that the iPhone 5 is coming with LTE support.
On a side note, I have an iPhone 4S (CDMA Sprint, unlocked outside of US). I'll probably upgrade to an iPhone 5 around the end of this year. If I can get a pfsense developer to commit to giving pfsense users an true USB-iPhone tethering solution solution, I will gladly donate my used (jailbroken) iPhone for that cause.
-
I too have never been able to get the wireless AP mode on the iPhone to connect properly to a wireless adapter used by pfsense. My offer of $100 still stands for a true USB-tethering solution for iPhone to pfsense.
I wonder what USB device the iPhone pretends to be when it is USB-tethering. Could you enable USB tethering mode on your iPhone then
1. connect your iPhone to your pfSense system and post the ouput of the pfSense shell command```usbconfig show_ifdrv
#usbconfig dump_device_desc
2. connect your iPhone to a linux system and post the output of the Linux shell command``` # lsusb # dmesg | tail -10 # lsusb -v
When I have my Android phone in USB tethering mode and connect it to my Linux netbook the system reports a new cdc-ether interface. OpenBSD appears to have the cdce and cdcef drivers which MIGHT be "relatively" easy to port to FreeBSD.
Unfortunately, at commercial rates the $150 offered so far wouldn't go very far towards completing the task, even if it does turn out to be "relatively" easy.
-
I have done a bit more research and found there are a couple of interesting devices drivers in the FreeBSD source tree which are undocumented on man pages and don't seem to have been documented in the release notes:
cdce which looks as if it should talk with my Android phone USB tethered; and
ipheth which claims to be a driver for iPhone as a USB Ethernet interface.I have attached files from the FreeBSD 8.3 release which should work with pfSense 2.1 snapshot builds. Download the files, remove the .png at the end of the name and put them in /boot/kernel Then the appropriate driver can be loaded in the kernel on demand by (for example):```
kldload if_cdce
I possibly won't be able to check my Android phone with the driver for a few days and I have no iPhone to try the ipheth driver. I have posted the drivers for interested parties to try and report back. It has been reported elsewhere that pfSense needs some work to deal intelligent with interfaces that aren't connected permanently but that shouldn't stop anyone with suitable gear doing some experimenting. [if_cdce.ko.png](/public/_imported_attachments_/1/if_cdce.ko.png) [if_cdce.ko.symbols.png](/public/_imported_attachments_/1/if_cdce.ko.symbols.png) [if_ipheth.ko.png](/public/_imported_attachments_/1/if_ipheth.ko.png) [if_ipheth.ko.symbols.png](/public/_imported_attachments_/1/if_ipheth.ko.symbols.png)
-
There are two fair sized problems here that will need to be overcome.
1. Assuming that the iPhone can be made to tether successfully, the second link above suggests it can, you would have to work around the fact that pfSense does not handle having an interface removed. You would have to permanently leave your iPhone attached and prevent it ever going into standby.
2. If you end up using the cdce driver it has a quirk to be aware of. It will use a fake MAC address for the device even if one is provided by it; you can see this in the first link above. This means that even if you have worked around point 1 it will appear as a new interface, with a different Mac, the every time its connected.cdce0: <apple 0="" 5="" inc.="" iphone,="" class="" 0,="" rev="" 2.00="" 0.01,="" addr=""> on usbus1 cdce0: faking MAC address ue0: <usb ethernet=""> on cdce0 ue0: Ethernet address: 2a:ba:b8:d4:02:00 .... cdce0: <apple 0="" 5="" inc.="" iphone,="" class="" 0,="" rev="" 2.00="" 0.01,="" addr=""> on usbus1 cdce0: faking MAC address ue0: <usb ethernet=""> on cdce0 ue0: Ethernet address: 2a:75:5f:d7:02:00</usb></apple></usb></apple>
I ran into both these issues trying to connect an old PDA. I would think it would be far easier to integrate with pfSense if it's possible to talk to it as a serial modem.
Steve
-
I too have never been able to get the wireless AP mode on the iPhone to connect properly to a wireless adapter used by pfsense. My offer of $100 still stands for a true USB-tethering solution for iPhone to pfsense.
I wonder what USB device the iPhone pretends to be when it is USB-tethering. Could you enable USB tethering mode on your iPhone then
1. connect your iPhone to your pfSense system and post the ouput of the pfSense shell command```usbconfig show_ifdrv
#usbconfig dump_device_desc
2. connect your iPhone to a linux system and post the output of the Linux shell command``` # lsusb # dmesg | tail -10 # lsusb -v
When I have my Android phone in USB tethering mode and connect it to my Linux netbook the system reports a new cdc-ether interface. OpenBSD appears to have the cdce and cdcef drivers which MIGHT be "relatively" easy to port to FreeBSD.
Unfortunately, at commercial rates the $150 offered so far wouldn't go very far towards completing the task, even if it does turn out to be "relatively" easy.
From Pfsense:
No iPhone connected:
[2.0.1-RELEASE][admin@pfsense.strider.local]/root(7): usbconfig show_ifdrv ugen0.1: <uhci root="" hub="" intel="">at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON ugen0.1.0: uhub0: <intel 1="" 9="" uhci="" root="" hub,="" class="" 0,="" rev="" 1.00="" 1.00,="" addr="">ugen1.1: <uhci root="" hub="" intel="">at usbus1, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON ugen1.1.0: uhub1: <intel 1="" 9="" uhci="" root="" hub,="" class="" 0,="" rev="" 1.00="" 1.00,="" addr="">ugen2.1: <uhci root="" hub="" intel="">at usbus2, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON ugen2.1.0: uhub2: <intel 1="" 9="" uhci="" root="" hub,="" class="" 0,="" rev="" 1.00="" 1.00,="" addr="">ugen3.1: <uhci root="" hub="" intel="">at usbus3, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON ugen3.1.0: uhub3: <intel 1="" 9="" uhci="" root="" hub,="" class="" 0,="" rev="" 1.00="" 1.00,="" addr="">ugen4.1: <ehci root="" hub="" intel="">at usbus4, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON ugen4.1.0: uhub4: <intel 1="" 9="" ehci="" root="" hub,="" class="" 0,="" rev="" 2.00="" 1.00,="" addr="">ugen4.2: <usb2.0 hub="" vendor="" 0x05e3="">at usbus4, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE ugen4.2.0: uhub5:</usb2.0></intel></ehci></intel></uhci></intel></uhci></intel></uhci></intel></uhci>
From Pfsense, iPhone connected:
[2.0.1-RELEASE][admin@pfsense.strider.local]/root(8): usbconfig show_ifdrv ugen0.1: <uhci root="" hub="" intel=""> at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON ugen0.1.0: uhub0: <intel 1="" 9="" uhci="" root="" hub,="" class="" 0,="" rev="" 1.00="" 1.00,="" addr=""> ugen1.1: <uhci root="" hub="" intel=""> at usbus1, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON ugen1.1.0: uhub1: <intel 1="" 9="" uhci="" root="" hub,="" class="" 0,="" rev="" 1.00="" 1.00,="" addr=""> ugen2.1: <uhci root="" hub="" intel=""> at usbus2, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON ugen2.1.0: uhub2: <intel 1="" 9="" uhci="" root="" hub,="" class="" 0,="" rev="" 1.00="" 1.00,="" addr=""> ugen3.1: <uhci root="" hub="" intel=""> at usbus3, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON ugen3.1.0: uhub3: <intel 1="" 9="" uhci="" root="" hub,="" class="" 0,="" rev="" 1.00="" 1.00,="" addr=""> ugen4.1: <ehci root="" hub="" intel=""> at usbus4, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON ugen4.1.0: uhub4: <intel 1="" 9="" ehci="" root="" hub,="" class="" 0,="" rev="" 2.00="" 1.00,="" addr=""> ugen4.2: <usb2.0 hub="" vendor="" 0x05e3=""> at usbus4, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE ugen4.2.0: uhub5: <vendor 2="" 9="" 0x05e3="" usb2.0="" hub,="" class="" 0,="" rev="" 2.00="" 77.63,="" addr=""> ugen4.3: <iphone vendor="" 0x05ac=""> at usbus4, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON [2.0.1-RELEASE][admin@pfsense.strider.local]/root(9):</iphone></vendor></usb2.0></intel></ehci></intel></uhci></intel></uhci></intel></uhci></intel></uhci>
-
From Pfsense, iPhone connected: ugen4.3: <iphone vendor="" 0x05ac="">at usbus4, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON [2.0.1-RELEASE][admin@pfsense.strider.local]/root(9):
Unfortunately, this is incomplete - it shows the vendor code but not the device code. I found the ipheth driver after I requested the device codes. I suggest you try the driver with your phone then we work on getting more USB information about your iphone if it seems necessary.