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.9k 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

      8dea0afb-e350-49e4-885a-a6060aec8e68-image.png

      ugen3.2.txt

      Sorry about the attachments-pasting just got me spam errors

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

        Did you just upgrade to 2.5? If so check the system log again when you connect it.

        You should see it shown as the correct device at least.

        Steve

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

          No, I’ve been on 2.5 since I opened this ticket. The logs above are from 2.5-the device isn’t being recognized

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

            The system log (again on 2.5) only shows the connection at 3.2 and then the failures to respond to AT. Do you perhaps have any further suggestions?

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

              Hmm, what I expect to see here is the device initially come up as an emulated CD drive and then be ejected by u3g:
              https://github.com/pfsense/FreeBSD-src/blob/RELENG_2_5/sys/dev/usb/serial/u3g.c#L241

              If you reboot and check the boot log do you see that?

              Do you see a cd drive listed in /dev that has no business being there? If so try ejecting it.

              Steve

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

                Rebooting seems to have frozen it-I'll need to get a monitor out tomorrow and take a look at what happened, but I did get an output of /dev at first-nothing obviously cdrom in there:

                /dev: ls
                acpi       atkbd0     cpuctl1    cuau2.init full       klog       mixer1     pci        stderr     ttyu2      ttyv5      ufssuspend ugen7.1
                ada0       audit      cpuctl2    cuau2.lock geom.ctl   kmem       mlx5ctl    pf         stdin      ttyu2.init ttyv6      ugen0.1    uinput
                ada0s1     auditpipe  cpuctl3    devctl     hpet1      label      music0     pts        stdout     ttyu2.lock ttyv7      ugen1.1    urandom
                ada0s1a    bpf        ctty       devctl2    input      md0        netdump    random     sysmouse   ttyv0      ttyv8      ugen2.1    usb
                ada0s1b    bpf0       cuau0      devstat    io         mdctl      netmap     reroot     tcp_log    ttyv1      ttyv9      ugen3.1    usbctl
                agpgart    console    cuau0.init dumpdev    kbd0       mem        nfslock    sequencer0 ttyu0      ttyv2      ttyva      ugen4.1    xpt0
                apm        consolectl cuau0.lock fd         kbd1       midistat   null       sndstat    ttyu0.init ttyv3      ttyvb      ugen5.1    zero
                apmctl     cpuctl0    cuau2      fido       kbdmux0    mixer0     pass0      speaker    ttyu0.lock ttyv4      ufsid      ugen6.1
                
                1 Reply Last reply Reply Quote 0
                • R
                  rmeskill
                  last edited by

                  No idea what happened, but something got corrupted and had to fully reinstall. But now can confirm both no unexpected CDROMs in /dev (it looks the exact same as above), it continues to mount on 7.2 and it doesn't work.

                  [2.5.0-DEVELOPMENT][admin@pfSense.localdomain]/root: usbconfig
                  ugen2.1: <Intel UHCI root HUB> at usbus2, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE (0mA)
                  ugen6.1: <Intel UHCI root HUB> at usbus6, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE (0mA)
                  ugen1.1: <Intel UHCI root HUB> at usbus1, 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)
                  ugen4.1: <Intel UHCI root HUB> at usbus4, 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)
                  ugen0.1: <Intel UHCI root HUB> at usbus0, 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)
                  ugen7.2: <Mobile Connect Mobile Connect> at usbus7, cfg=255 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA)
                  

                  Additionally (both before and after I create a PPP Interface) cu -l /dev/cuau* don't give me any interactive responses-I just get a dead cursor until I disconnect.

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

                    Hmm, I would try it in some other OS at this point and see what it does there. It may be stuck in some odd mode perhaps.
                    Do you know the history of that device?

                    Steve

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

                      It's brand new, not locked, and works fine on my Windows box with the provided software...

                      1 Reply Last reply Reply Quote 0
                      • 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
                                            • First post
                                              Last post
                                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.