SG-1000: Cannot assign ugenx.y



  • Using 2.4.0 beta I had my Sony mobile connected successfully as a USB-tethered LTE gateway on the SG-1000.

    Updated to 2.4.2 today and that went smoothly but I can no longer tether to the Sony.

    When I plug the phone in and enable USB tethering pfSense sees the device on ugen0.2 but doesn't offer that as a valid WAN interface name - only cpsw0 and cpsw1.

    Could this be related to the change of interface naming from, in the case of the SG-1000, from "ue0" to ugenx.y?


  • Netgate Administrator

    ugenX implies a generic USB device it doesn't have a driver for or for which the driver failed to attach.

    ue is a USB Ethernet device that is created when the driver did attach.

    Hard to see what might have changed there between 2.4beta and 2.4.2. The base FreeBSD version moved from 11 to 11.1 but that would not normally remove the driver.

    You never had to add a kernel module in 2.4b? Like urndis for example?

    Steve



  • Thanks for the reply, Steve.

    No, didn't have to add anything to bring up ue0 as a WAN interface under 2.4 beta.  I was a bit surprised by that, TBH.

    I'm starting wonder whether something might have changed with Android 7.x.  That update happened not long ago.


  • Netgate Administrator

    That could certainly be it if it's presenting a different USB device ID or default config.

    Are you able to re-test it against a 2.4.0 snap?

    Steve



  • @stephenw10:

    Are you able to re-test it against a 2.4.0 snap?

    I was thinking about that but I'm unsure about the process for obtaining a 2.4.0 snap and installing it over the top of 2.4.2 on the SG-1000.

    Also thought about whether "USB debugging mode" in Android actually provides any easy to use tools that might shed some light on the problem.



  • No luck.

    Reinstalled 2.4.0 RELEASE
    Still not talking but at least recognizing the Sony.

    Downloaded the ADB tools and ran "settings put global tether_dun_required 0" from a shell, a recommended by someone.
    Now not talking and not recognizing the Sony:

    FreeBSD/arm (pfSense.localdomain) (ttyu0)
    
    Netgate SG-1000 - Serial: [redacted]
    
    *** Welcome to pfSense 2.4.0-RELEASE (arm) on pfSense ***
    
     WAN (wan)       -> cpsw0      ->
     LAN (lan)       -> cpsw1      -> v4: 192.168.1.1/24
    
     0) Logout (SSH only)                  9) pfTop
     1) Assign Interfaces                 10) Filter Logs
     2) Set interface(s) IP address       11) Restart webConfigurator
     3) Reset webConfigurator password    12) PHP shell + pfSense tools
     4) Reset to factory defaults         13) Update from console
     5) Reboot system                     14) Enable Secure Shell (sshd)
     6) Halt system                       15) Restore recent configuration
     7) Ping host                         16) Restart PHP-FPM
     8) Shell
    
    Enter an option: ugen0.2: <unknown>at usbus0 (disconnected)
    ugen0.2: <unknown>at usbus0 (disconnected)
    1
    
    Valid interfaces are:
    
    cpsw0   68:9e:19:9c:88:30 (down) Ethernet Switch Port
    cpsw1   68:9e:19:9c:88:32 (down) Ethernet Switch Port</unknown></unknown> 
    

    So it does look like Android 7.1.1 has done this but I can't find anything out there that specifically mentions USB tethering as broken.



  • Any clever ways to troubleshoot this from the pfSense side?


  • Netgate Administrator

    The first thing I would do is see how the phone appears in pfSense. Try running:

    usbconfig dump_device_desc
    

    That will give you the vendor and product IDs for the phone. You can chekc that in the different modes.

    Then try running:

    usbconfig -d ugenX.Y dump_all_config_desc
    

    For whichever device is the phone.

    If it has more than one config available you can switch it by using a USB device quirk loader line. There might be a different config that is recognised.

    Steve



  • Thanks, Steve.

    It's taken me a while to get back to this but now I'm getting the following whenever I connect the phone to the SG-1000.

    [2.4.2-RELEASE][root@pfSense.localdomain]/root: ugen0.2: <unknown>at usbus0 (disconnected)</unknown> 
    

    So the output from those commands doesn't provide a lot of info.

    
    [2.4.2-RELEASE][root@pfSense.localdomain]/root: usbconfig dump_device_desc
    ugen1.1: <mentor graphics="" otg="" root="" hub=""> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
    
      bLength = 0x0012
      bDescriptorType = 0x0001
      bcdUSB = 0x0200
      bDeviceClass = 0x0009  <hub>
      bDeviceSubClass = 0x0000
      bDeviceProtocol = 0x0001
      bMaxPacketSize0 = 0x0040
      idVendor = 0x0000
      idProduct = 0x0000
      bcdDevice = 0x0100
      iManufacturer = 0x0001  <mentor graphics="">
      iProduct = 0x0002  <otg root="" hub="">
      iSerialNumber = 0x0000  <no string="">
      bNumConfigurations = 0x0001
    
    ugen0.1: <mentor graphics="" otg="" root="" hub=""> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
    
      bLength = 0x0012
      bDescriptorType = 0x0001
      bcdUSB = 0x0200
      bDeviceClass = 0x0009  <hub>
      bDeviceSubClass = 0x0000
      bDeviceProtocol = 0x0001
      bMaxPacketSize0 = 0x0040
      idVendor = 0x0000
      idProduct = 0x0000
      bcdDevice = 0x0100
      iManufacturer = 0x0001  <mentor graphics="">
      iProduct = 0x0002  <otg root="" hub="">
      iSerialNumber = 0x0000  <no string="">
      bNumConfigurations = 0x0001
    
    [2.4.2-RELEASE][root@pfSense.localdomain]/root: usbconfig -d ugen0.2 dump_all_config_desc
    No device match or lack of permissions.</no></otg></mentor></hub></mentor></no></otg></mentor></hub></mentor>
    

    The phone refuses to even recognize the SG-1000 and won't allow USB tethering to be enabled. 
    If I connect the phone to a Win 10 laptop via USB, the connection is recognized and I can enable USB tethering.


  • Netgate Administrator

    Hmm, not much we can do if the phone just disconnects itself.  :-\

    It's not even appearing there.

    Steve


  • Banned

    If you connect the phone it should show a notification about how the USB connection should be used, on newer Android versions (at least on Sony phones) this defaults to charging only. Make sure it is set to a mode that allows communication. If the notification does not appear enable developer mode on the phone and activate USB debugging, then connect it again. This usually brings the notification back.



  • Thanks for the suggestion Grimson.  I was using the "Transfer files" mode.

    I did briefly get a connection after rebooting the phone and captured this information:

    ugen0.2: <sony e5823="">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 = 0x0fce
      idProduct = 0x71da
      bcdDevice = 0x0310
      iManufacturer = 0x0001  <sony>iProduct = 0x0002  <e5823>iSerialNumber = 0x0003  <cb5a28vzkv>bNumConfigurations = 0x0001</cb5a28vzkv></e5823></sony></probed></sony> 
    ``` 
    
    Unfortunately, it disconnected again before I could run usbconfig -d ugen0.2 dump_all_config_desc

  • Netgate Administrator

    Hmm, 71da does not appear to be listed as a USB PID anywhere I can see.

    Some drivers can seemingly attach based on the config type though such as urndi but without seeing the out full config dump there's no way to tell. And even if it does attach if the phone just shuts it down that won't help.

    We really need the phone to present a stable device to pfSense.

    Steve


Log in to reply