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

    D-Link DWM-222 LTE Dongle with 2.5

    Scheduled Pinned Locked Moved Hardware
    39 Posts 3 Posters 6.4k 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.
    • R
      rmeskill
      last edited by

      I think you might be right, though, as when it joins to Windows it joins as a CDROM/USB device. I imagine I need to switch it to the correct mode, then, per details on this thread:

      https://www.draisberghof.de/usb_modeswitch/bb/viewtopic.php?f=3&t=2594

      but can't find a series of commands that works. Here's what I get when I follow the same commands from that forum post:

      [2.5.0-DEVELOPMENT][admin@pfSense.localdomain]/root: sudo usb_modeswitch -K -W -v 2001 -p 0x0228
      Take all parameters from the command line
      
      
       * usb_modeswitch: handle USB devices with multiple modes
       * Version 2.6.0 (C) Josua Dietze 2017
       * Based on libusb1/libusbx
      
       ! PLEASE REPORT NEW CONFIGURATIONS !
      
      DefaultVendor=  0x2001
      DefaultProduct= 0x0228
      
      StandardEject=1
      
      Look for default devices ...
        found USB ID 0000:0000
        found USB ID 0000:0000
        found USB ID 0000:0000
        found USB ID 0000:0000
        found USB ID 0000:0000
        found USB ID 0000:0000
        found USB ID 0000:0000
        found USB ID 0000:0000
        found USB ID 2001:ab00
         vendor ID matched
       No devices in default mode found. Nothing to do. Bye!
      
      1 Reply Last reply Reply Quote 0
      • stephenw10S
        stephenw10 Netgate Administrator
        last edited by

        @rmeskill said in D-Link DWM-222 LTE Dongle with 2.5:

        sudo usb_modeswitch -K -W -v 2001 -p 0x0228

        That's the wrong product ID, it's not what you have. Try:
        sudo usb_modeswitch -K -W -v 2001 -p 0xab00

        Not sure why u3g isn't doing that though.

        Steve

        1 Reply Last reply Reply Quote 0
        • R
          rmeskill
          last edited by

          Well that did get us closer...

          [2.5.0-DEVELOPMENT][admin@pfSense.localdomain]/root: sudo usb_modeswitch -K -W -v 2001 -p 0xab00
          Take all parameters from the command line
          
          
           * usb_modeswitch: handle USB devices with multiple modes
           * Version 2.6.0 (C) Josua Dietze 2017
           * Based on libusb1/libusbx
          
           ! PLEASE REPORT NEW CONFIGURATIONS !
          
          DefaultVendor=  0x2001
          DefaultProduct= 0xab00
          
          StandardEject=1
          
          Look for default devices ...
            found USB ID 0000:0000
            found USB ID 0000:0000
            found USB ID 0000:0000
            found USB ID 0000:0000
            found USB ID 0000:0000
            found USB ID 0000:0000
            found USB ID 0000:0000
            found USB ID 0000:0000
            found USB ID 2001:ab00
             vendor ID matched
             product ID matched
           Found devices in default mode (1)
          Access device 002 on bus 007
          Get the current device configuration ...
           Determining the active configuration failed (error -5). Abort
          

          Definitely a different error from last time...

          1 Reply Last reply Reply Quote 0
          • R
            rmeskill
            last edited by

            On a Debian machine (rasberry pi) I get the following:

            pi@raspberrypi:~ $ sudo usb_modeswitch -K -W -v 2001 -p 0xab00
            Take all parameters from the command line
            
            
             * usb_modeswitch: handle USB devices with multiple modes
             * Version 2.5.0 (C) Josua Dietze 2017
             * Based on libusb1/libusbx
            
             ! PLEASE REPORT NEW CONFIGURATIONS !
            
            DefaultVendor=  0x2001
            DefaultProduct= 0xab00
            
            StandardEject=1
            
            Look for default devices ...
              found USB ID 2001:7e35
               vendor ID matched
              found USB ID 0424:ec00
              found USB ID 0424:9514
              found USB ID 1d6b:0002
             No devices in default mode found. Nothing to do. Bye!
            
            1 Reply Last reply Reply Quote 0
            • stephenw10S
              stephenw10 Netgate Administrator
              last edited by

              @rmeskill said in D-Link DWM-222 LTE Dongle with 2.5:

              7e35

              In Debian it has already been switched so usb_modeswitch has nothing to do. 0x7e35 is the modem mode ID:
              https://github.com/pfsense/FreeBSD-src/blob/RELENG_2_5/sys/dev/usb/usbdevs#L1722

              It just needs to be ejected but if it never appears as a virtual CD drive that's.... challenging!

              It looks to be failing reading the config index for some reason but your usbconfig output previously showed it using config index 0 as expected.

              Steve

              1 Reply Last reply Reply Quote 0
              • R
                rmeskill
                last edited by rmeskill

                For clarification, here's the most recent output:

                ugen7.2: <Mobile Connect Mobile Connect> at usbus7, cfg=255 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA)
                
                  bLength = 0x0012
                  bDescriptorType = 0x0001
                  bcdUSB = 0x0201
                  bDeviceClass = 0x0000  <Probed by interface class>
                  bDeviceSubClass = 0x0000
                  bDeviceProtocol = 0x0000
                  bMaxPacketSize0 = 0x0040
                  idVendor = 0x2001
                  idProduct = 0xab00
                  bcdDevice = 0x0228
                

                (Had to pare it back a bit since it kept getting flagged as spam)

                    Interface 0
                      bLength = 0x0009
                      bDescriptorType = 0x0004
                      bInterfaceNumber = 0x0000
                      bAlternateSetting = 0x0000
                      bNumEndpoints = 0x0002
                      bInterfaceClass = 0x0008  <Mass storage>
                      bInterfaceSubClass = 0x0006
                      bInterfaceProtocol = 0x0050
                      iInterface = 0x0004  <Mass Storage>
                
                     Endpoint 0
                        bLength = 0x0007
                        bDescriptorType = 0x0005
                        bEndpointAddress = 0x0081  <IN>
                        bmAttributes = 0x0002  <BULK>
                        wMaxPacketSize = 0x0200
                        bInterval = 0x0000
                        bRefresh = 0x0000
                        bSynchAddress = 0x0000
                
                     Endpoint 1
                        bLength = 0x0007
                        bDescriptorType = 0x0005
                        bEndpointAddress = 0x0001  <OUT>
                        bmAttributes = 0x0002  <BULK>
                        wMaxPacketSize = 0x0200
                        bInterval = 0x0001
                        bRefresh = 0x0000
                        bSynchAddress = 0x0000
                
                1 Reply Last reply Reply Quote 0
                • R
                  rmeskill
                  last edited by rmeskill

                  I also just upgraded the firmware to 2.1.2 rev A1, available here and confirmed a couple things on my Windows machine. It does initially connect as a USB/CD folder, and when you launch the connection program it disconnects that, presumably making the mode change which we need to produce here. I've also tried running it through an unpowered USB hub, just to see if that somehow affected things, but it just comes up as 7.3 (with 7.2 being the hub itself) with no additional CDROM in /dev:

                  [2.5.0-DEVELOPMENT][admin@pfSense.localdomain]/dev: ls
                  acpi       apm        bpf0       cpuctl3    cuau2.init fd         io         label      mixer1     null       reroot     stdout     ttyu2      ttyv3      ttyv9      ugen1.1    ugen7.1    usbctl
                  ada0       apmctl     console    ctty       cuau2.lock fido       kbd0       md0        mlx5ctl    pass0      sequencer0 sysmouse   ttyu2.init ttyv4      ttyva      ugen2.1    ugen7.2    xpt0
                  ada0s1     atkbd0     consolectl cuau0      devctl     full       kbd1       mdctl      music0     pci        sndstat    tcp_log    ttyu2.lock ttyv5      ttyvb      ugen3.1    ugen7.3    zero
                  ada0s1a    audit      cpuctl0    cuau0.init devctl2    geom.ctl   kbdmux0    mem        netdump    pf         speaker    ttyu0      ttyv0      ttyv6      ufsid      ugen4.1    uinput
                  ada0s1b    auditpipe  cpuctl1    cuau0.lock devstat    hpet1      klog       midistat   netmap     pts        stderr     ttyu0.init ttyv1      ttyv7      ufssuspend ugen5.1    urandom
                  agpgart    bpf        cpuctl2    cuau2      dumpdev    input      kmem       mixer0     nfslock    random     stdin      ttyu0.lock ttyv2      ttyv8      ugen0.1    ugen6.1    usb
                  
                  [2.5.0-DEVELOPMENT][admin@pfSense.localdomain]/dev: usbconfig
                  ugen1.1: <Intel UHCI root HUB> at usbus1, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE (0mA)
                  ugen7.1: <Intel EHCI root HUB> at usbus7, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
                  ugen6.1: <Intel UHCI root HUB> at usbus6, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE (0mA)
                  ugen5.1: <Intel UHCI root HUB> at usbus5, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE (0mA)
                  ugen3.1: <Intel EHCI root HUB> at usbus3, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
                  ugen2.1: <Intel UHCI root HUB> at usbus2, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE (0mA)
                  ugen0.1: <Intel UHCI root HUB> at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE (0mA)
                  ugen4.1: <Intel UHCI root HUB> at usbus4, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE (0mA)
                  ugen7.2: <vendor 0x058f product 0x6254> at usbus7, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (100mA)
                  ugen7.3: <Mobile Connect Mobile Connect> at usbus7, cfg=255 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA)
                  
                  1 Reply Last reply Reply Quote 0
                  • stephenw10S
                    stephenw10 Netgate Administrator
                    last edited by

                    @rmeskill said in D-Link DWM-222 LTE Dongle with 2.5:

                    Get the current device configuration ...
                    Determining the active configuration failed (error -5). Abort

                    This indicates there is some issue with the device config values. Does it still show bConfigurationValue = 0x0001?

                    Can you specify it directly, like: usb_modeswitch -v 2001 -p 0xab00 -u 1

                    Steve

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

                      @rmeskill said in D-Link DWM-222 LTE Dongle with 2.5:

                      ugen7.3: <Mobile Connect Mobile Connect> at usbus7, cfg=255 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA)

                      Aha this looks like a clue: cfg=255 is clearly invalid! It should be 0 there is only one config index available.

                      Try this: usbconfig -d ugen7.3 set_config 0

                      If that works we can add it as a device hint.

                      Steve

                      1 Reply Last reply Reply Quote 0
                      • R
                        rmeskill
                        last edited by

                        Still no dice. I swapped things around a few times to see if bus 3 or 7 made a difference and tried everything with both a value of 1 and of 0x0001, but to no avail...

                        [2.5.0-DEVELOPMENT][admin@pfSense.localdomain]/dev: sudo usbconfig -d ugen3.2 set_config 0
                        [2.5.0-DEVELOPMENT][admin@pfSense.localdomain]/dev: usbconfig
                        ugen1.1: <Intel UHCI root HUB> at usbus1, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE (0mA)
                        ugen7.1: <Intel EHCI root HUB> at usbus7, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
                        ugen6.1: <Intel UHCI root HUB> at usbus6, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE (0mA)
                        ugen5.1: <Intel UHCI root HUB> at usbus5, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE (0mA)
                        ugen3.1: <Intel EHCI root HUB> at usbus3, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
                        ugen2.1: <Intel UHCI root HUB> at usbus2, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE (0mA)
                        ugen0.1: <Intel UHCI root HUB> at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE (0mA)
                        ugen4.1: <Intel UHCI root HUB> at usbus4, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE (0mA)
                        ugen3.2: <Mobile Connect Mobile Connect> at usbus3, cfg=255 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA)
                        
                        [2.5.0-DEVELOPMENT][admin@pfSense.localdomain]/dev: usb_modeswitch -v 2001 -p 0xab00 -u 1
                        Look for default devices ...
                         Found devices in default mode (1)
                        Access device 002 on bus 003
                        Get the current device configuration ...
                         Determining the active configuration failed (error -5). Abort
                        
                        1 Reply Last reply Reply Quote 0
                        • stephenw10S
                          stephenw10 Netgate Administrator
                          last edited by

                          Hmm, for some reason it's not able to read the config index value. Seems to be defaulting to 255 whuch indicates the device has not been initialised correctly.
                          https://wiki.freebsd.org/USB#Debugging_USB

                          I'm not sure there is anything we can do about that.

                          Steve

                          1 Reply Last reply Reply Quote 0
                          • R
                            rmeskill
                            last edited by

                            Crap, does this just mean it's hopeless? Do we think it might be the hardware I'm running pfsense on or just the DWM-222 itself? And there's no way to force a config index on boot?

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

                              I don't think so. If it's not being initialised correctly we can't force it to do anything much.

                              I assume it appears like that whether it's connected before or after boot?

                              You might try it in a different port if you can, maybe a usb 2 vs 3 issue?

                              If you can try it in a different pfSense device that would probably be conclusive.

                              Steve

                              1 Reply Last reply Reply Quote 0
                              • R
                                rmeskill
                                last edited by

                                I've tried it in all the available USB ports on that machine, but it's an old one, so all the ports are only USB 2. Does 2.5 (or any PFSense) work on 32-bit hardware? I have another old machine that is only 32-bit but with USB 3 that I could try...

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

                                  No, there is no current pfSense version that will run in 32bit x86 hardware. The last version was 2.3.5.

                                  You could test using FreeBSD though: https://download.freebsd.org/ftp/releases/i386/i386/ISO-IMAGES/12.1/

                                  Steve

                                  1 Reply Last reply Reply Quote 0
                                  • D
                                    DjJoakim @rmeskill
                                    last edited by

                                    @rmeskill said in D-Link DWM-222 LTE Dongle with 2.5:

                                    I've tried it in all the available USB ports on that machine, but it's an old one, so all the ports are only USB 2. Does 2.5 (or any PFSense) work on 32-bit hardware? I have another old machine that is only 32-bit but with USB 3 that I could try...

                                    Hey, did you ever get this to work?
                                    I am in the same boat as you.. and don't really know if i just have to buy another USB modem or if it's possible to get this working with pfsense.

                                    R 1 Reply Last reply Reply Quote 0
                                    • R
                                      rmeskill @DjJoakim
                                      last edited by

                                      @djjoakim Oh wow, I completely forgot about this. No, I eventually gave up, boxed the DWM-222 up and returned it. Sorry to be the bearer of bad news, but it seemed hopeless to me...

                                      D 1 Reply Last reply Reply Quote 0
                                      • D
                                        DjJoakim @rmeskill
                                        last edited by

                                        @rmeskill
                                        Thank you for the responce. I have Done the same now.. and i hope the huawei model i bought today will work better :)

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