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

    iPhone tethering

    Scheduled Pinned Locked Moved General pfSense Questions
    15 Posts 4 Posters 320 Views 6 Watching
    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.
    • QinnQ Offline
      Qinn
      last edited by Qinn

      Hi there,

      I know the drivers are present in FreeBSD. But I can not assign the interface in the GUI, when I connect the iPhone to the router via USB.

      After connecting the iPhone to the router via USB I did a dmesg, it gave

      ugen0.2: <Apple Inc. iPhone> at usbus0
      

      So I guess the driver is loaded. Then I did

      [2.8.1-RELEASE][root@pfSense.localdomain]/: usbconfig | grep Apple
      ugen0.2: <iPhone 5/5C/5S/6/SE/7/8/X/XR Apple, Inc.> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA)
      
      [2.8.1-RELEASE][root@pfSense.localdomain]/: usbconfig -d 0.2 dump_all_config_desc | grep -E '(^ Conf|iConf)'
       Configuration index 0
          iConfiguration = 0x0005  <PTP>
       Configuration index 1
          iConfiguration = 0x0006  <iPod USB Interface>
       Configuration index 2
          iConfiguration = 0x0007  <PTP + Apple Mobile Device>
       Configuration index 3
          iConfiguration = 0x0008  <PTP + Apple Mobile Device + Apple USB Ethernet>
      [2.8.1-RELEASE][root@pfSense.localdomain]/:
      
      

      I think I need the configuration with index 3, as it seems to be related to Ethernet. I think I can configure the device with

      usbconfig -d 0.2 set_config 3
      

      Is this right and will it appear in the GUI in the interfaces assignments and will it stay persistent?

      Thanks in advance on any advice

      Cheers Qinn

      Hardeware: Intel(R) Celeron(R) J4125 CPU @ 2.00GHz 102 GB mSATA SSD (ZFS)
      Firmware: Latest-stable-pfSense CE (amd64)
      Packages: pfBlockerNG devel-beta (beta tester) - Avahi - Notes - Ntopng - PIMD/udpbroadcastrelay - Service Watchdog - System Patches

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

        Yup you will see it attach as an Ethernet interface in the logs. Then it will show as ue0.

        From that USB output, yes you'd need to set config index 3. You might be able to set that in the iphone though. I don't recall other users having to set that.

        QinnQ 1 Reply Last reply Reply Quote 1
        • QinnQ Offline
          Qinn @stephenw10
          last edited by

          @stephenw10 Thanks

          I think that the moment this command is executed and the connection is being made the iPhone will ask it's owner if the computer that wants to make the connection can be trusted.

          From what I read on other phones the assignment can be made solemnly from the GUI, why not with an Apple device, I think not everyone can use the command line interface?

          Hardeware: Intel(R) Celeron(R) J4125 CPU @ 2.00GHz 102 GB mSATA SSD (ZFS)
          Firmware: Latest-stable-pfSense CE (amd64)
          Packages: pfBlockerNG devel-beta (beta tester) - Avahi - Notes - Ntopng - PIMD/udpbroadcastrelay - Service Watchdog - System Patches

          1 Reply Last reply Reply Quote 0
          • QinnQ Offline
            Qinn
            last edited by Qinn

            @stephenw10 I used

            usbconfig -d 0.2 set_config 3
            

            this added ue0 and I saved this port to a new interface., but alas the assignment is not persistent, when I remove the iPhone from the USB connection and then reattach it again. ue0 is gone and the assignment has changed remarkably to another (hardware) port. So I have to start over again.

            Hardeware: Intel(R) Celeron(R) J4125 CPU @ 2.00GHz 102 GB mSATA SSD (ZFS)
            Firmware: Latest-stable-pfSense CE (amd64)
            Packages: pfBlockerNG devel-beta (beta tester) - Avahi - Notes - Ntopng - PIMD/udpbroadcastrelay - Service Watchdog - System Patches

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

              Yup you need to add a usb quirk against the vid/pid: https://man.freebsd.org/cgi/man.cgi?query=usb_quirk#LOADER_TUNABLE

              QinnQ 1 Reply Last reply Reply Quote 1
              • QinnQ Offline
                Qinn @stephenw10
                last edited by Qinn

                @stephenw10

                I did a (see below) to get the vid/pid

                [2.8.1-RELEASE][root@pfSense.localdomain]/root: usbconfig -d 0.2 dump_device_desc
                ugen0.2: <iPhone 5/5C/5S/6/SE/7/8/X/XR Apple, Inc.> at usbus0, 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 = 0x1502
                  iManufacturer = 0x0001  <Apple Inc.>
                  iProduct = 0x0002  <iPhone>
                  iSerialNumber = 0x0003  <000081200011685234EB401E>
                  bNumConfigurations = 0x0004
                
                [2.8.1-RELEASE][root@pfSense.localdomain]/root:
                

                I can't seem to find the LowRevision HighRevision? So should I make them 0x0000 0xffff?

                If so, then below I think is what I should enter in loader.conf or in should it be in
                /boot/loader.conf.local?

                usb_quirk_load="YES"
                hw.usb.quirk.0="0x05ac 0x12a8 0x0000 0xffff UQ_CFG_INDEX_3"
                
                

                Hardeware: Intel(R) Celeron(R) J4125 CPU @ 2.00GHz 102 GB mSATA SSD (ZFS)
                Firmware: Latest-stable-pfSense CE (amd64)
                Packages: pfBlockerNG devel-beta (beta tester) - Avahi - Notes - Ntopng - PIMD/udpbroadcastrelay - Service Watchdog - System Patches

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

                  Yup exactly that. And, yes, just set all revisions like that.

                  QinnQ 1 Reply Last reply Reply Quote 0
                  • QinnQ Offline
                    Qinn @stephenw10
                    last edited by

                    @stephenw10 ๐Ÿ‘

                    Just one final question, should I place these 2 lines in loader.conf or create a loader.conf.local and place it there?

                    sb_quirk_load="YES"
                    hw.usb.quirk.0="0x05ac 0x12a8 0x0000 0xffff UQ_CFG_INDEX_3"
                    
                    

                    Hardeware: Intel(R) Celeron(R) J4125 CPU @ 2.00GHz 102 GB mSATA SSD (ZFS)
                    Firmware: Latest-stable-pfSense CE (amd64)
                    Packages: pfBlockerNG devel-beta (beta tester) - Avahi - Notes - Ntopng - PIMD/udpbroadcastrelay - Service Watchdog - System Patches

                    GertjanG 1 Reply Last reply Reply Quote 0
                    • GertjanG Offline
                      Gertjan @Qinn
                      last edited by Gertjan

                      @Qinn said in iPhone tethering:

                      loader.conf

                      afaik :
                      Can get rewritten (modified) by pfSense.
                      loader.conf.local isn't touched by pfSense.

                      edit : and both are used/read by the kernel.

                      No "help me" PM's please. Use the forum, the community will thank you.
                      Edit : and where are the logs ??

                      QinnQ 1 Reply Last reply Reply Quote 1
                      • QinnQ Offline
                        Qinn @Gertjan
                        last edited by

                        @Gertjan A bit confused, so I should create a loader.conf.local and save these 2 lines there?

                        Hardeware: Intel(R) Celeron(R) J4125 CPU @ 2.00GHz 102 GB mSATA SSD (ZFS)
                        Firmware: Latest-stable-pfSense CE (amd64)
                        Packages: pfBlockerNG devel-beta (beta tester) - Avahi - Notes - Ntopng - PIMD/udpbroadcastrelay - Service Watchdog - System Patches

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

                          Yes, create loader.conf.local and use that.

                          QinnQ 1 Reply Last reply Reply Quote 0
                          • QinnQ Offline
                            Qinn @stephenw10
                            last edited by

                            @stephenw10 Thanks for Chiming in and clarifying it ๐Ÿ‘

                            Hardeware: Intel(R) Celeron(R) J4125 CPU @ 2.00GHz 102 GB mSATA SSD (ZFS)
                            Firmware: Latest-stable-pfSense CE (amd64)
                            Packages: pfBlockerNG devel-beta (beta tester) - Avahi - Notes - Ntopng - PIMD/udpbroadcastrelay - Service Watchdog - System Patches

                            1 Reply Last reply Reply Quote 0
                            • GertjanG Offline
                              Gertjan @Qinn
                              last edited by

                              @Qinn

                              Extra info : Managing Loader Tunables.

                              No "help me" PM's please. Use the forum, the community will thank you.
                              Edit : and where are the logs ??

                              QinnQ 1 Reply Last reply Reply Quote 2
                              • QinnQ Offline
                                Qinn @Gertjan
                                last edited by

                                @Gertjan Thanks for pointing that one out.

                                5d5a210a-0219-4a36-9a26-8930bcc19f8f-image.png

                                Hardeware: Intel(R) Celeron(R) J4125 CPU @ 2.00GHz 102 GB mSATA SSD (ZFS)
                                Firmware: Latest-stable-pfSense CE (amd64)
                                Packages: pfBlockerNG devel-beta (beta tester) - Avahi - Notes - Ntopng - PIMD/udpbroadcastrelay - Service Watchdog - System Patches

                                dennypageD 1 Reply Last reply Reply Quote 0
                                • dennypageD Offline
                                  dennypage @Qinn
                                  last edited by

                                  @Qinn FWIW, if you want the loader.conf.local file backed up in the config, you can create a custom patch in System / Patches. Since you are patching against an empty file, be sure that you do not enable Auto Apply.

                                  1 Reply Last reply Reply Quote 2
                                  • First post
                                    Last post
                                  Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.