Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    IPhone Tethering to pfSense

    Scheduled Pinned Locked Moved Hardware
    64 Posts 7 Posters 16.8k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • E
      eiger3970
      last edited by eiger3970

      Not sure what to do with the GitHub code?
      Think I'll file a bug report.

      1 Reply Last reply Reply Quote 0
      • E
        eiger3970
        last edited by

        I thought this Cellular Wireless guide might help.

        However, unable to type in the pfSense 2.4.4-RELEASE-p2 > Interfaces > PPPs > PPP Configuration > Link Interface(s): /dev/ugen4.2

        1 Reply Last reply Reply Quote 0
        • stephenw10S
          stephenw10 Netgate Administrator
          last edited by

          I'm pretty sure ipheth does not provide any interfaces you could use with PPP. It will appear as a USB Ethernet device when it's working.

          You should put that loader line in loader.conf.local to avoid it being overwritten. Create that file since you don't have it yet.

          Try running kldstat to see that the module is loaded.

          Connect the phone then check the system log or dmesg to see what pfSense did.

          What phone are you connecting? ipgeth appears to have specific support for iphones 1-5:
          https://github.com/pfsense/FreeBSD-src/blob/RELENG_2_5/sys/dev/usb/net/if_ipheth.c#L136

          Though it also tries to match any Apple device with the correct interface class.

          Steve

          1 Reply Last reply Reply Quote 1
          • A
            akuma1x
            last edited by

            I know we're trying to get an iPhone tethered to pfsense and get it working, but why don't you try this?

            GL.iNet GL-AR750 Travel AC Router
            https://www.amazon.com/GL-iNet-GL-AR750-300Mbps-pre-Installed-Included/dp/B07712LKJM

            There are a few lower-spec'd models, since you don't need the wifi on this travel router box.

            That would provide an ethernet interface, and still use the iPhone to grab the internet connection from your cellular provider. It works pretty well, if you've got a good signal.

            Jeff

            1 Reply Last reply Reply Quote 0
            • E
              eiger3970
              last edited by eiger3970

              Thanks @stephenw10,
              The kernel module is running:

              [2.4.4-RELEASE][admin@pfSense.localdomain]/.ssh: kldstat
              Id Refs Address            Size     Name
               1    8 0xffffffff80200000 2d9a7d0  kernel
               2    1 0xffffffff82f9c000 4318     if_ipheth.ko
               3    1 0xffffffff83019000 10a0     cpuctl.ko
              

              dmesg shows pfSense has found the iPhone (18th line from the bottom):

              [2.4.4-RELEASE][admin@pfSense.localdomain]/.ssh: dmesg:
              Copyright (c) 1992-2018 The FreeBSD Project.
              Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
              	The Regents of the University of California. All rights reserved.
              FreeBSD is a registered trademark of The FreeBSD Foundation.
              FreeBSD 11.2-RELEASE-p6 #3 518496b29ae(RELENG_2_4_4): Wed Dec 12 07:41:44 EST 2018
                  root@buildbot2.nyi.netgate.com:/build/ce-crossbuild-244/obj/amd64/ZfGpH5cd/build/ce-crossbuild-244/pfSense/tmp/FreeBSD-src/sys/pfSense amd64
              FreeBSD clang version 6.0.0 (tags/RELEASE_600/final 326565) (based on LLVM 6.0.0)
              VT(vga): text 80x25
              CPU: Common KVM processor (3092.92-MHz K8-class CPU)
                Origin="GenuineIntel"  Id=0xf61  Family=0xf  Model=0x6  Stepping=1
                Features=0x783fbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE,SSE2>
                Features2=0x80202001<SSE3,CX16,x2APIC,HV>
                AMD Features=0x20100800<SYSCALL,NX,LM>
                AMD Features2=0x1<LAHF>
              Hypervisor: Origin = "KVMKVMKVM"
              real memory  = 1073741824 (1024 MB)
              avail memory = 981479424 (936 MB)
              Event timer "LAPIC" quality 100
              ACPI APIC Table: <BOCHS  BXPCAPIC>
              ioapic0 <Version 1.1> irqs 0-23 on motherboard
              Timecounter "TSC-low" frequency 1546458305 Hz quality 800
              ipw_bss: You need to read the LICENSE file in /usr/share/doc/legal/intel_ipw.LICENSE.
              ipw_bss: If you agree with the license, set legal.intel_ipw.license_ack=1 in /boot/loader.conf.
              module_register_init: MOD_LOAD (ipw_bss_fw, 0xffffffff80680430, 0) error 1
              random: entropy device external interface
              ipw_ibss: You need to read the LICENSE file in /usr/share/doc/legal/intel_ipw.LICENSE.
              ipw_ibss: If you agree with the license, set legal.intel_ipw.license_ack=1 in /boot/loader.conf.
              module_register_init: MOD_LOAD (ipw_ibss_fw, 0xffffffff806804e0, 0) error 1
              ipw_monitor: You need to read the LICENSE file in /usr/share/doc/legal/intel_ipw.LICENSE.
              ipw_monitor: If you agree with the license, set legal.intel_ipw.license_ack=1 in /boot/loader.conf.
              module_register_init: MOD_LOAD (ipw_monitor_fw, 0xffffffff80680590, 0) error 1
              iwi_bss: You need to read the LICENSE file in /usr/share/doc/legal/intel_iwi.LICENSE.
              iwi_bss: If you agree with the license, set legal.intel_iwi.license_ack=1 in /boot/loader.conf.
              module_register_init: MOD_LOAD (iwi_bss_fw, 0xffffffff806a7460, 0) error 1
              iwi_ibss: You need to read the LICENSE file in /usr/share/doc/legal/intel_iwi.LICENSE.
              iwi_ibss: If you agree with the license, set legal.intel_iwi.license_ack=1 in /boot/loader.conf.
              module_register_init: MOD_LOAD (iwi_ibss_fw, 0xffffffff806a7510, 0) error 1
              iwi_monitor: You need to read the LICENSE file in /usr/share/doc/legal/intel_iwi.LICENSE.
              iwi_monitor: If you agree with the license, set legal.intel_iwi.license_ack=1 in /boot/loader.conf.
              module_register_init: MOD_LOAD (iwi_monitor_fw, 0xffffffff806a75c0, 0) error 1
              wlan: mac acl policy registered
              kbd1 at kbdmux0
              netmap: loaded module
              module_register_init: MOD_LOAD (vesa, 0xffffffff81209800, 0) error 19
              nexus0
              vtvga0: <VT VGA driver> on motherboard
              cryptosoft0: <software crypto> on motherboard
              padlock0: No ACE support.
              acpi0: <BOCHS BXPCRSDT> on motherboard
              acpi0: Power Button (fixed)
              cpu0: <ACPI CPU> on acpi0
              atrtc0: <AT realtime clock> port 0x70-0x71,0x72-0x77 irq 8 on acpi0
              atrtc0: registered as a time-of-day clock, resolution 1.000000s
              Event timer "RTC" frequency 32768 Hz quality 0
              hpet0: <High Precision Event Timer> iomem 0xfed00000-0xfed003ff on acpi0
              Timecounter "HPET" frequency 100000000 Hz quality 950
              Timecounter "ACPI-fast" frequency 3579545 Hz quality 900
              acpi_timer0: <24-bit timer at 3.579545MHz> port 0x608-0x60b on acpi0
              pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
              pci0: <ACPI PCI bus> on pcib0
              isab0: <PCI-ISA bridge> at device 1.0 on pci0
              isa0: <ISA bus> on isab0
              atapci0: <Intel PIIX3 WDMA2 controller> port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xe120-0xe12f at device 1.1 on pci0
              ata0: <ATA channel> at channel 0 on atapci0
              ata1: <ATA channel> at channel 1 on atapci0
              uhci0: <Intel 82371SB (PIIX3) USB controller> port 0xe040-0xe05f irq 11 at device 1.2 on pci0
              usbus0 on uhci0
              pci0: <bridge> at device 1.3 (no driver attached)
              vgapci0: <VGA-compatible display> mem 0xfa000000-0xfbffffff,0xfea90000-0xfea90fff at device 2.0 on pci0
              vgapci0: Boot video device
              virtio_pci0: <VirtIO PCI Balloon adapter> port 0xe060-0xe07f mem 0xfc000000-0xfc7fffff irq 11 at device 3.0 on pci0
              vtballoon0: <VirtIO Balloon Adapter> on virtio_pci0
              virtio_pci1: <VirtIO PCI Block adapter> port 0xe000-0xe03f mem 0xfea91000-0xfea91fff,0xfc800000-0xfcffffff irq 10 at device 10.0 on pci0
              vtblk0: <VirtIO Block Adapter> on virtio_pci1
              vtblk0: 8192MB (16777216 512 byte sectors)
              virtio_pci2: <VirtIO PCI Network adapter> port 0xe080-0xe09f mem 0xfea92000-0xfea92fff,0xfd000000-0xfd7fffff irq 10 at device 18.0 on pci0
              vtnet0: <VirtIO Networking Adapter> on virtio_pci2
              vtnet0: Ethernet address: 42:63:7c:e4:6c:e3
              000.000971 [ 421] vtnet_netmap_attach       max rings 1
              vtnet0: netmap queues/slots: TX 1/1024, RX 1/1024
              000.000972 [ 426] vtnet_netmap_attach       virtio attached txq=1, txd=1024 rxq=1, rxd=1024
              virtio_pci3: <VirtIO PCI Network adapter> port 0xe0a0-0xe0bf mem 0xfea93000-0xfea93fff,0xfd800000-0xfdffffff irq 11 at device 19.0 on pci0
              vtnet1: <VirtIO Networking Adapter> on virtio_pci3
              vtnet1: Ethernet address: a6:2d:d5:4f:6c:f3
              000.000973 [ 421] vtnet_netmap_attach       max rings 1
              vtnet1: netmap queues/slots: TX 1/1024, RX 1/1024
              000.000974 [ 426] vtnet_netmap_attach       virtio attached txq=1, txd=1024 rxq=1, rxd=1024
              uhci1: <Intel 82801I (ICH9) USB controller> port 0xe0c0-0xe0df irq 10 at device 29.0 on pci0
              usbus1 on uhci1
              uhci2: <Intel 82801I (ICH9) USB controller> port 0xe0e0-0xe0ff irq 10 at device 29.1 on pci0
              usbus2 on uhci2
              uhci3: <Intel 82801I (ICH9) USB controller> port 0xe100-0xe11f irq 11 at device 29.2 on pci0
              usbus3 on uhci3
              ehci0: <Intel 82801I (ICH9) USB 2.0 controller> mem 0xfea94000-0xfea94fff irq 11 at device 29.7 on pci0
              usbus4: EHCI version 1.0
              usbus4 on ehci0
              pcib1: <ACPI PCI-PCI bridge> mem 0xfea95000-0xfea950ff irq 10 at device 30.0 on pci0
              pci1: <ACPI PCI bus> on pcib1
              pcib2: <ACPI PCI-PCI bridge> mem 0xfea96000-0xfea960ff irq 11 at device 31.0 on pci0
              pci2: <ACPI PCI bus> on pcib2
              acpi_syscontainer0: <System Container> on acpi0
              acpi_syscontainer1: <System Container> port 0xaf00-0xaf0b on acpi0
              acpi_syscontainer2: <System Container> port 0xafe0-0xafe3 on acpi0
              acpi_syscontainer3: <System Container> port 0xae00-0xae13 on acpi0
              atkbdc0: <Keyboard controller (i8042)> port 0x60,0x64 irq 1 on acpi0
              atkbd0: <AT Keyboard> irq 1 on atkbdc0
              kbd0 at atkbd0
              atkbd0: [GIANT-LOCKED]
              psm0: <PS/2 Mouse> irq 12 on atkbdc0
              psm0: [GIANT-LOCKED]
              psm0: model IntelliMouse Explorer, device ID 4
              fdc0: <floppy drive controller (FDE)> port 0x3f2-0x3f5,0x3f7 irq 6 drq 2 on acpi0
              fdc0: does not respond
              device_attach: fdc0 attach returned 6
              orm0: <ISA Option ROM> at iomem 0xed000-0xeffff on isa0
              vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
              attimer0: <AT timer> at port 0x40 on isa0
              Timecounter "i8254" frequency 1193182 Hz quality 0
              Event timer "i8254" frequency 1193182 Hz quality 100
              fdc0: No FDOUT register!
              ppc0: cannot reserve I/O port range
              Timecounters tick every 10.000 msec
              usbus0: 12Mbps Full Speed USB v1.0
              usbus1: 12Mbps Full Speed USB v1.0
              usbus2: 12Mbps Full Speed USB v1.0
              usbus3: 12Mbps Full Speed USB v1.0
              usbus4: 480Mbps High Speed USB v2.0
              ugen1.1: <Intel UHCI root HUB> at usbus1
              uhub0: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus1
              ugen0.1: <Intel UHCI root HUB> at usbus0
              uhub1: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus0
              ugen3.1: <Intel UHCI root HUB> at usbus3
              uhub2: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus3
              ugen2.1: <Intel UHCI root HUB> at usbus2
              uhub3: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus2
              ugen4.1: <Intel EHCI root HUB> at usbus4
              uhub4: <Intel EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus4
              uhub0: 2 ports with 2 removable, self powered
              uhub1: 2 ports with 2 removable, self powered
              uhub2: 2 ports with 2 removable, self powered
              uhub3: 2 ports with 2 removable, self powered
              ugen0.2: <QEMU QEMU USB Tablet> at usbus0
              uhid0 on uhub1
              uhid0: <QEMU QEMU USB Tablet, class 0/0, rev 2.00/0.00, addr 2> on usbus0
              uhub4: 6 ports with 6 removable, self powered
              ugen4.2: <Apple Inc. iPhone> at usbus4
              cd0 at ata1 bus 0 scbus1 target 0 lun 0
              cd0: <QEMU QEMU DVD-ROM 2.5+> Removable CD-ROM SCSI device
              cd0: Serial Number QM00003
              cd0: 16.700MB/s transfers (WDMA2, ATAPI 12bytes, PIO 65534bytes)
              cd0: 655MB (335744 2048 byte sectors)
              Trying to mount root from ufs:/dev/ufsid/5c46b3cebae05a43 [rw]...
              random: unblocking device.
              CPU: Common KVM processor (3092.92-MHz K8-class CPU)
                Origin="GenuineIntel"  Id=0xf61  Family=0xf  Model=0x6  Stepping=1
                Features=0x78bfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2>
                Features2=0x80202001<SSE3,CX16,x2APIC,HV>
                AMD Features=0x20100800<SYSCALL,NX,LM>
                AMD Features2=0x1<LAHF>
              Hypervisor: Origin = "KVMKVMKVM"
              vtnet0: link state changed to UP
              vtnet1: link state changed to UP
              pflog0: promiscuous mode enabled
              

              I'm using an old iPhone 5C, works fine on other OSes with USB hotspot.
              I suspect it's the VM or FreeBSD factor.
              I think I solved the VM factor by passing the USB through the hypervisor correctly.

              @akuma1x Thanks, however:

              1. that would be a failure.
              2. bit like 'just reboot the computer'. I prefer to find and solve the issue at hand, for future reference.
              3. I'm trying to make the network as efficient as possible.
              4. The fewer hardware devices:
                4.1 the less points of failure
                4.2 the less power costs
                4.3 possibly less network bottlenecks
                4.3.1 possibly less speed delays
              5. reduces fiscal expense
              6. cleaner network topology map
              7. less unnecessary products
              1 Reply Last reply Reply Quote 0
              • stephenw10S
                stephenw10 Netgate Administrator
                last edited by

                Ok check: usbconfig -d ugen4.2 dump_all_desc

                1 Reply Last reply Reply Quote 1
                • E
                  eiger3970
                  last edited by eiger3970

                  Wow, a lot of output. It's beyond my understanding.

                  [2.4.4-RELEASE][admin@pfSense.localdomain]/.ssh: usbconfig -d ugen4.2 dump_all_desc
                  ugen4.2: <Apple Inc. iPhone> at usbus4, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA)
                  
                    bLength = 0x0012 
                    bDescriptorType = 0x0001 
                    bcdUSB = 0x0200 
                    bDeviceClass = 0x0000  <Probed by interface class>
                    bDeviceSubClass = 0x0000 
                    bDeviceProtocol = 0x0000 
                    bMaxPacketSize0 = 0x0040 
                    idVendor = 0x05ac 
                    idProduct = 0x12a8 
                    bcdDevice = 0x0530 
                    iManufacturer = 0x0001  <Apple Inc.>
                    iProduct = 0x0002  <iPhone>
                    iSerialNumber = 0x0003  <redactedFromPublicViewByForumPostingAuthor>
                    bNumConfigurations = 0x0004 
                  
                   Configuration index 0
                  
                      bLength = 0x0009 
                      bDescriptorType = 0x0002 
                      wTotalLength = 0x0027 
                      bNumInterfaces = 0x0001 
                      bConfigurationValue = 0x0001 
                      iConfiguration = 0x0005  <PTP>
                      bmAttributes = 0x00c0 
                      bMaxPower = 0x00fa 
                  
                      Interface 0
                        bLength = 0x0009 
                        bDescriptorType = 0x0004 
                        bInterfaceNumber = 0x0000 
                        bAlternateSetting = 0x0000 
                        bNumEndpoints = 0x0003 
                        bInterfaceClass = 0x0006  <Still imaging>
                        bInterfaceSubClass = 0x0001 
                        bInterfaceProtocol = 0x0001 
                        iInterface = 0x0000  <no string>
                  
                       Endpoint 0
                          bLength = 0x0007 
                          bDescriptorType = 0x0005 
                          bEndpointAddress = 0x0002  <OUT>
                          bmAttributes = 0x0002  <BULK>
                          wMaxPacketSize = 0x0200 
                          bInterval = 0x000a 
                          bRefresh = 0x0000 
                          bSynchAddress = 0x0000 
                  
                       Endpoint 1
                          bLength = 0x0007 
                          bDescriptorType = 0x0005 
                          bEndpointAddress = 0x0081  <IN>
                          bmAttributes = 0x0002  <BULK>
                          wMaxPacketSize = 0x0200 
                          bInterval = 0x000a 
                          bRefresh = 0x0000 
                          bSynchAddress = 0x0000 
                  
                       Endpoint 2
                          bLength = 0x0007 
                          bDescriptorType = 0x0005 
                          bEndpointAddress = 0x0083  <IN>
                          bmAttributes = 0x0003  <INTERRUPT>
                          wMaxPacketSize = 0x0040 
                          bInterval = 0x000a 
                          bRefresh = 0x0000 
                          bSynchAddress = 0x0000 
                  
                  
                  
                   Configuration index 1
                  
                      bLength = 0x0009 
                      bDescriptorType = 0x0002 
                      wTotalLength = 0x0095 
                      bNumInterfaces = 0x0003 
                      bConfigurationValue = 0x0002 
                      iConfiguration = 0x0006  <iPod USB Interface>
                      bmAttributes = 0x00c0 
                      bMaxPower = 0x00fa 
                  
                      Interface 0
                        bLength = 0x0009 
                        bDescriptorType = 0x0004 
                        bInterfaceNumber = 0x0000 
                        bAlternateSetting = 0x0000 
                        bNumEndpoints = 0x0000 
                        bInterfaceClass = 0x0001  <Audio device>
                        bInterfaceSubClass = 0x0001 
                        bInterfaceProtocol = 0x0000 
                        iInterface = 0x0000  <no string>
                  
                        Additional Descriptor
                  
                        bLength = 0x09
                        bDescriptorType = 0x24
                        bDescriptorSubType = 0x01
                         RAW dump: 
                         0x00 | 0x09, 0x24, 0x01, 0x00, 0x01, 0x1e, 0x00, 0x01, 
                         0x08 | 0x01
                  
                        Additional Descriptor
                  
                        bLength = 0x0c
                        bDescriptorType = 0x24
                        bDescriptorSubType = 0x02
                         RAW dump: 
                         0x00 | 0x0c, 0x24, 0x02, 0x01, 0x01, 0x02, 0x02, 0x02, 
                         0x08 | 0x03, 0x00, 0x00, 0x00
                  
                  
                        Additional Descriptor
                  
                        bLength = 0x09
                        bDescriptorType = 0x24
                        bDescriptorSubType = 0x03
                         RAW dump: 
                         0x00 | 0x09, 0x24, 0x03, 0x02, 0x01, 0x01, 0x01, 0x01, 
                         0x08 | 0x00
                  
                  
                      Interface 1
                        bLength = 0x0009 
                        bDescriptorType = 0x0004 
                        bInterfaceNumber = 0x0001 
                        bAlternateSetting = 0x0000 
                        bNumEndpoints = 0x0000 
                        bInterfaceClass = 0x0001  <Audio device>
                        bInterfaceSubClass = 0x0002 
                        bInterfaceProtocol = 0x0000 
                        iInterface = 0x0000  <no string>
                  
                  
                      Interface 1 Alt 1
                        bLength = 0x0009 
                        bDescriptorType = 0x0004 
                        bInterfaceNumber = 0x0001 
                        bAlternateSetting = 0x0001 
                        bNumEndpoints = 0x0001 
                        bInterfaceClass = 0x0001  <Audio device>
                        bInterfaceSubClass = 0x0002 
                        bInterfaceProtocol = 0x0000 
                        iInterface = 0x0000  <no string>
                  
                        Additional Descriptor
                  
                        bLength = 0x07
                        bDescriptorType = 0x24
                        bDescriptorSubType = 0x01
                         RAW dump: 
                         0x00 | 0x07, 0x24, 0x01, 0x02, 0x01, 0x01, 0x00
                  
                  
                        Additional Descriptor
                  
                        bLength = 0x23
                        bDescriptorType = 0x24
                        bDescriptorSubType = 0x02
                         RAW dump: 
                         0x00 | 0x23, 0x24, 0x02, 0x01, 0x02, 0x02, 0x10, 0x09, 
                         0x08 | 0x40, 0x1f, 0x00, 0x11, 0x2b, 0x00, 0xe0, 0x2e, 
                         0x10 | 0x00, 0x80, 0x3e, 0x00, 0x22, 0x56, 0x00, 0xc0, 
                         0x18 | 0x5d, 0x00, 0x00, 0x7d, 0x00, 0x44, 0xac, 0x00, 
                         0x20 | 0x80, 0xbb, 0x00
                  
                  
                       Endpoint 0
                          bLength = 0x0009 
                          bDescriptorType = 0x0005 
                          bEndpointAddress = 0x0081  <IN>
                          bmAttributes = 0x0001  <ISOCHRONOUS>
                          wMaxPacketSize = 0x00c0 
                          bInterval = 0x0004 
                          bRefresh = 0x0000 
                          bSynchAddress = 0x0000 
                  
                        Additional Descriptor
                  
                        bLength = 0x07
                        bDescriptorType = 0x25
                        bDescriptorSubType = 0x01
                         RAW dump: 
                         0x00 | 0x07, 0x25, 0x01, 0x01, 0x00, 0x00, 0x00
                  
                  
                  
                      Interface 2
                        bLength = 0x0009 
                        bDescriptorType = 0x0004 
                        bInterfaceNumber = 0x0002 
                        bAlternateSetting = 0x0000 
                        bNumEndpoints = 0x0001 
                        bInterfaceClass = 0x0003  <HID device>
                        bInterfaceSubClass = 0x0000 
                        bInterfaceProtocol = 0x0000 
                        iInterface = 0x0000  <no string>
                  
                        Additional Descriptor
                  
                        bLength = 0x09
                        bDescriptorType = 0x21
                        bDescriptorSubType = 0x11
                         RAW dump: 
                         0x00 | 0x09, 0x21, 0x11, 0x01, 0x00, 0x01, 0x22, 0xd0, 
                         0x08 | 0x00
                  
                       Endpoint 0
                          bLength = 0x0007 
                          bDescriptorType = 0x0005 
                          bEndpointAddress = 0x0083  <IN>
                          bmAttributes = 0x0003  <INTERRUPT>
                          wMaxPacketSize = 0x0040 
                          bInterval = 0x0001 
                          bRefresh = 0x0000 
                          bSynchAddress = 0x0000 
                  
                  
                  
                   Configuration index 2
                  
                      bLength = 0x0009 
                      bDescriptorType = 0x0002 
                      wTotalLength = 0x003e 
                      bNumInterfaces = 0x0002 
                      bConfigurationValue = 0x0003 
                      iConfiguration = 0x0007  <PTP + Apple Mobile Device>
                      bmAttributes = 0x00c0 
                      bMaxPower = 0x00fa 
                  
                      Interface 0
                        bLength = 0x0009 
                        bDescriptorType = 0x0004 
                        bInterfaceNumber = 0x0000 
                        bAlternateSetting = 0x0000 
                        bNumEndpoints = 0x0003 
                        bInterfaceClass = 0x0006  <Still imaging>
                        bInterfaceSubClass = 0x0001 
                        bInterfaceProtocol = 0x0001 
                        iInterface = 0x0000  <no string>
                  
                       Endpoint 0
                          bLength = 0x0007 
                          bDescriptorType = 0x0005 
                          bEndpointAddress = 0x0002  <OUT>
                          bmAttributes = 0x0002  <BULK>
                          wMaxPacketSize = 0x0200 
                          bInterval = 0x000a 
                          bRefresh = 0x0000 
                          bSynchAddress = 0x0000 
                  
                       Endpoint 1
                          bLength = 0x0007 
                          bDescriptorType = 0x0005 
                          bEndpointAddress = 0x0081  <IN>
                          bmAttributes = 0x0002  <BULK>
                          wMaxPacketSize = 0x0200 
                          bInterval = 0x000a 
                          bRefresh = 0x0000 
                          bSynchAddress = 0x0000 
                  
                       Endpoint 2
                          bLength = 0x0007 
                          bDescriptorType = 0x0005 
                          bEndpointAddress = 0x0083  <IN>
                          bmAttributes = 0x0003  <INTERRUPT>
                          wMaxPacketSize = 0x0040 
                          bInterval = 0x000a 
                          bRefresh = 0x0000 
                          bSynchAddress = 0x0000 
                  
                  
                      Interface 1
                        bLength = 0x0009 
                        bDescriptorType = 0x0004 
                        bInterfaceNumber = 0x0001 
                        bAlternateSetting = 0x0000 
                        bNumEndpoints = 0x0002 
                        bInterfaceClass = 0x00ff  <Vendor specific>
                        bInterfaceSubClass = 0x00fe 
                        bInterfaceProtocol = 0x0002 
                        iInterface = 0x000d  <Apple USB Multiplexor>
                  
                       Endpoint 0
                          bLength = 0x0007 
                          bDescriptorType = 0x0005 
                          bEndpointAddress = 0x0004  <OUT>
                          bmAttributes = 0x0002  <BULK>
                          wMaxPacketSize = 0x0200 
                          bInterval = 0x0000 
                          bRefresh = 0x0000 
                          bSynchAddress = 0x0000 
                  
                       Endpoint 1
                          bLength = 0x0007 
                          bDescriptorType = 0x0005 
                          bEndpointAddress = 0x0085  <IN>
                          bmAttributes = 0x0002  <BULK>
                          wMaxPacketSize = 0x0200 
                          bInterval = 0x0000 
                          bRefresh = 0x0000 
                          bSynchAddress = 0x0000 
                  
                  
                  
                   Configuration index 3
                  
                      bLength = 0x0009 
                      bDescriptorType = 0x0002 
                      wTotalLength = 0x0075 
                      bNumInterfaces = 0x0003 
                      bConfigurationValue = 0x0004 
                      iConfiguration = 0x0008  <PTP + Apple Mobile Device + Apple USB Ethernet>
                      bmAttributes = 0x00c0 
                      bMaxPower = 0x00fa 
                  
                      Interface 0
                        bLength = 0x0009 
                        bDescriptorType = 0x0004 
                        bInterfaceNumber = 0x0000 
                        bAlternateSetting = 0x0000 
                        bNumEndpoints = 0x0003 
                        bInterfaceClass = 0x0006  <Still imaging>
                        bInterfaceSubClass = 0x0001 
                        bInterfaceProtocol = 0x0001 
                        iInterface = 0x0000  <no string>
                  
                       Endpoint 0
                          bLength = 0x0007 
                          bDescriptorType = 0x0005 
                          bEndpointAddress = 0x0002  <OUT>
                          bmAttributes = 0x0002  <BULK>
                          wMaxPacketSize = 0x0200 
                          bInterval = 0x000a 
                          bRefresh = 0x0000 
                          bSynchAddress = 0x0000 
                  
                       Endpoint 1
                          bLength = 0x0007 
                          bDescriptorType = 0x0005 
                          bEndpointAddress = 0x0081  <IN>
                          bmAttributes = 0x0002  <BULK>
                          wMaxPacketSize = 0x0200 
                          bInterval = 0x000a 
                          bRefresh = 0x0000 
                          bSynchAddress = 0x0000 
                  
                       Endpoint 2
                          bLength = 0x0007 
                          bDescriptorType = 0x0005 
                          bEndpointAddress = 0x0083  <IN>
                          bmAttributes = 0x0003  <INTERRUPT>
                          wMaxPacketSize = 0x0040 
                          bInterval = 0x000a 
                          bRefresh = 0x0000 
                          bSynchAddress = 0x0000 
                  
                  
                      Interface 1
                        bLength = 0x0009 
                        bDescriptorType = 0x0004 
                        bInterfaceNumber = 0x0001 
                        bAlternateSetting = 0x0000 
                        bNumEndpoints = 0x0002 
                        bInterfaceClass = 0x00ff  <Vendor specific>
                        bInterfaceSubClass = 0x00fe 
                        bInterfaceProtocol = 0x0002 
                        iInterface = 0x000d  <Apple USB Multiplexor>
                  
                       Endpoint 0
                          bLength = 0x0007 
                          bDescriptorType = 0x0005 
                          bEndpointAddress = 0x0004  <OUT>
                          bmAttributes = 0x0002  <BULK>
                          wMaxPacketSize = 0x0200 
                          bInterval = 0x0000 
                          bRefresh = 0x0000 
                          bSynchAddress = 0x0000 
                  
                       Endpoint 1
                          bLength = 0x0007 
                          bDescriptorType = 0x0005 
                          bEndpointAddress = 0x0085  <IN>
                          bmAttributes = 0x0002  <BULK>
                          wMaxPacketSize = 0x0200 
                          bInterval = 0x0000 
                          bRefresh = 0x0000 
                          bSynchAddress = 0x0000 
                  
                  
                      Interface 2
                        bLength = 0x0009 
                        bDescriptorType = 0x0004 
                        bInterfaceNumber = 0x0002 
                        bAlternateSetting = 0x0000 
                        bNumEndpoints = 0x0000 
                        bInterfaceClass = 0x00ff  <Vendor specific>
                        bInterfaceSubClass = 0x00fd 
                        bInterfaceProtocol = 0x0001 
                        iInterface = 0x0000  <no string>
                  
                  
                      Interface 2 Alt 1
                        bLength = 0x0009 
                        bDescriptorType = 0x0004 
                        bInterfaceNumber = 0x0002 
                        bAlternateSetting = 0x0001 
                        bNumEndpoints = 0x0002 
                        bInterfaceClass = 0x00ff  <Vendor specific>
                        bInterfaceSubClass = 0x00fd 
                        bInterfaceProtocol = 0x0001 
                        iInterface = 0x0000  <no string>
                  
                       Endpoint 0
                          bLength = 0x0007 
                          bDescriptorType = 0x0005 
                          bEndpointAddress = 0x0086  <IN>
                          bmAttributes = 0x0002  <BULK>
                          wMaxPacketSize = 0x0200 
                          bInterval = 0x0000 
                          bRefresh = 0x0000 
                          bSynchAddress = 0x0000 
                  
                       Endpoint 1
                          bLength = 0x0007 
                          bDescriptorType = 0x0005 
                          bEndpointAddress = 0x0005  <OUT>
                          bmAttributes = 0x0002  <BULK>
                          wMaxPacketSize = 0x0200 
                          bInterval = 0x0000 
                          bRefresh = 0x0000 
                          bSynchAddress = 0x0000 
                  
                  
                      Interface 2 Alt 2
                        bLength = 0x0009 
                        bDescriptorType = 0x0004 
                        bInterfaceNumber = 0x0002 
                        bAlternateSetting = 0x0002 
                        bNumEndpoints = 0x0002 
                        bInterfaceClass = 0x00ff  <Vendor specific>
                        bInterfaceSubClass = 0x00fd 
                        bInterfaceProtocol = 0x0001 
                        iInterface = 0x0000  <no string>
                  
                       Endpoint 0
                          bLength = 0x0007 
                          bDescriptorType = 0x0005 
                          bEndpointAddress = 0x0086  <IN>
                          bmAttributes = 0x0002  <BULK>
                          wMaxPacketSize = 0x0200 
                          bInterval = 0x0000 
                          bRefresh = 0x0000 
                          bSynchAddress = 0x0000 
                  
                       Endpoint 1
                          bLength = 0x0007 
                          bDescriptorType = 0x0005 
                          bEndpointAddress = 0x0005  <OUT>
                          bmAttributes = 0x0002  <BULK>
                          wMaxPacketSize = 0x0200 
                          bInterval = 0x0000 
                          bRefresh = 0x0000 
                          bSynchAddress = 0x0000 
                  
                  1 Reply Last reply Reply Quote 0
                  • stephenw10S
                    stephenw10 Netgate Administrator
                    last edited by

                    The important part appears to be this though:

                    Configuration index 3
                    
                        bLength = 0x0009 
                        bDescriptorType = 0x0002 
                        wTotalLength = 0x0075 
                        bNumInterfaces = 0x0003 
                        bConfigurationValue = 0x0004 
                        iConfiguration = 0x0008  <PTP + Apple Mobile Device + Apple USB Ethernet>
                        bmAttributes = 0x00c0 
                        bMaxPower = 0x00fa 
                    

                    It needs to be using index 3. Try:
                    usbconfig -d ugen4.2 set_config 3

                    Steve

                    1 Reply Last reply Reply Quote 1
                    • stephenw10S
                      stephenw10 Netgate Administrator
                      last edited by

                      @eiger3970 said in IPhone Tethering to pfSense:

                      idVendor = 0x05ac
                      idProduct = 0x12a8

                      That looks like it should be recognised as an iphone5 actually:
                      https://github.com/pfsense/FreeBSD-src/blob/RELENG_2_4_4/sys/dev/usb/usbdevs#L1168

                      1 Reply Last reply Reply Quote 1
                      • E
                        eiger3970
                        last edited by eiger3970

                        Oh wow!
                        pfSense GUI > Interfaces > Interface Assignments > shows Available network ports: ue0

                        I will try to follow a GUI guide now for the final setup.

                        Yes, the USB device is an iPhone 5C.

                        'It' needs to be using index 3...is it referring to the iPhone or pfSense?

                        1 Reply Last reply Reply Quote 0
                        • E
                          eiger3970
                          last edited by eiger3970

                          Ok, pfSense reboot needs the setup run each time. I won't be rebooting the router much, so that's ok, until perhaps the kernel module if_ipheth.ko udates the code?
                          I.e.:
                          usbconfig -d ugen4.2 set_config 3.

                          So, running the GUI:
                          pfSense 2.4.4-RELEASE-p2 > Interfaces > Assignments > Add ue0 (Ma:cA:dd:re:ss:00) > OPT1 ue0 appears > Save > Interfaces > OPT1 > General Configuration > Enable: tick Enable interface > IPv4 Configuration Type: DHCP > Save > Apply Changes > System > Routing > Gateways > OPT1_DHCP should be Default > pfSense shell: netstat -r > Enter > problem as ue0 is in Internet 6 and not in Internet?

                          1 Reply Last reply Reply Quote 0
                          • E
                            eiger3970
                            last edited by

                            If it helps, here are my network topologies from Ethernet modem to USB modem.
                            Ethernet modem:
                            alt text

                            USB modem:
                            alt text

                            Perhaps the USB modem topology needs the net0 = vmbr1 to be updated to OPT1 = vmbr1?

                            1 Reply Last reply Reply Quote 0
                            • stephenw10S
                              stephenw10 Netgate Administrator
                              last edited by

                              Ok great if config index 3 works you can have that set every time at boot using a usb quirk
                              https://www.freebsd.org/cgi/man.cgi?query=usb_quirk

                              Add to /boot/loader.conf.local:
                              hw.usb.quirk.0="0x05ac 0x12a8 0 0xffff UQ_CFG_INDEX_3"

                              There real issue with this type of setup is that if the phone switches off or is unplugged or in some other way is no longer present and you reboot pfSense it will fail to boot. It will stop at the interfaces assign screen because it has ue0 in it's config and it isn't there.

                              Steve

                              1 Reply Last reply Reply Quote 1
                              • E
                                eiger3970
                                last edited by eiger3970

                                Thank you, that works after a reboot.
                                I updated file /boot/loader.conf, there was not file /boot/loader.conf.local.

                                So, the final thing is configuring pfSense GUI to pass data.
                                Interfaces > Assignments > OPT1 ue0 (53:f9:38:33:18:4f).
                                Interfaces > OPT > Enabled interface. IPv4 Configuration Type: DHCP.
                                System > Routing > Gateways > OPT1_DHCP is Default (IPv4).
                                Dashboard > Interfaces > OPT1 > green up arrow with IP 0.0.0.0.

                                1 Reply Last reply Reply Quote 0
                                • stephenw10S
                                  stephenw10 Netgate Administrator
                                  last edited by

                                  Yeah, you will have to create the .local file but you should put both lines in there. The standard loader.conf file can be overwritten by changes in pfSense.

                                  If it's not pulling an IP address that would seem to be some setting in the iphone. Is tethering actually enabled there?
                                  Does it work as a wireless hotspot?

                                  Steve

                                  1 Reply Last reply Reply Quote 1
                                  • E
                                    eiger3970
                                    last edited by eiger3970

                                    Oh, thank you.
                                    Done.

                                    Tethering is enabled. No wifi on the hypervisor.
                                    I'll check the hardware tomorrow.

                                    [2.4.4-RELEASE][admin@pfSense.localdomain]/boot: netstat -r
                                    Routing tables
                                    
                                    Internet:
                                    Destination        Gateway            Flags     Netif Expire
                                    0.0.0.0/8          link#1             U        vtnet0
                                    localhost          link#4             UH          lo0
                                    192.168.1.0/24     link#2             U        vtnet1
                                    pfSense            link#2             UHS         lo0
                                    
                                    Internet6:
                                    Destination        Gateway            Flags     Netif Expire
                                    localhost          link#4             UH          lo0
                                    fe80::%vtnet0/64   link#1             U        vtnet0
                                    fe80::4063:7cff:fe link#1             UHS         lo0
                                    fe80::%vtnet1/64   link#2             U        vtnet1
                                    fe80::a42d:d5ff:fe link#2             UHS         lo0
                                    fe80::%lo0/64      link#4             U           lo0
                                    fe80::1%lo0        link#4             UHS         lo0
                                    fe80::%ue0/64      link#7             U           ue0
                                    fe80::5cf9:38ff:fe link#7             UHS         lo0
                                    
                                    1 Reply Last reply Reply Quote 0
                                    • stephenw10S
                                      stephenw10 Netgate Administrator
                                      last edited by

                                      Yeah just to check the iphone is capable of doing this. Maybe connect it to something else, a laptop.

                                      1 Reply Last reply Reply Quote 0
                                      • E
                                        eiger3970
                                        last edited by eiger3970

                                        Yes, the iPhone is capable of providing tethered internet via USB.
                                        The iPhone tethering worked on other machines previously, however I wanted to triple check before this response.

                                        There's something in the pfSense configuration I don't know needs to be done?
                                        According to post 6, point 8, the Default Gateway should be in IPv4, not IPv6 in my case.

                                        1 Reply Last reply Reply Quote 0
                                        • stephenw10S
                                          stephenw10 Netgate Administrator
                                          last edited by

                                          Is it giving you an IP address now? You won't have a gateway on the iphone at all until it responds to dhcp.

                                          1 Reply Last reply Reply Quote 1
                                          • E
                                            eiger3970
                                            last edited by

                                            OPT1 IP address 0.0.0.0.

                                            On the iPhone, I do what I do to make the USB tether work on other machines.
                                            iPhone > passcode > Settings > Hotspot > turn on > Enable USB: yes.

                                            [2.4.4-RELEASE][root@pfSense.localdomain]/root: netstat -r
                                            Routing tables
                                            
                                            Internet:
                                            Destination        Gateway            Flags     Netif Expire
                                            0.0.0.0/8          link#1             U        vtnet0
                                            localhost          link#4             UH          lo0
                                            192.168.1.0/24     link#2             U        vtnet1
                                            pfSense            link#2             UHS         lo0
                                            
                                            Internet6:
                                            Destination        Gateway            Flags     Netif Expire
                                            localhost          link#4             UH          lo0
                                            fe80::%vtnet0/64   link#1             U        vtnet0
                                            fe80::4063:7cff:fe link#1             UHS         lo0
                                            fe80::%vtnet1/64   link#2             U        vtnet1
                                            fe80::a42d:d5ff:fe link#2             UHS         lo0
                                            fe80::%lo0/64      link#4             U           lo0
                                            fe80::1%lo0        link#4             UHS         lo0
                                            fe80::%ue0/64      link#7             U           ue0
                                            fe80::5cf9:38ff:fe link#7             UHS         lo0
                                            
                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.