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

    D-Link DWM-157 USB Stock not recognized

    Scheduled Pinned Locked Moved Hardware
    39 Posts 6 Posters 9.0k 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.
    • stephenw10S
      stephenw10 Netgate Administrator
      last edited by

      There are examples of people having done it for other devices. I would start by looking on the FreeBSD forums for other threads. And then opening your own thread if it's not obvious.
      Ultimately you would be looking to make a patch against udbdevs and u3g and then issue a pull request for it.

      It would be much easier to test if u3g was a loadable kernel module but I don't think that s possible.

      Steve

      1 Reply Last reply Reply Quote 0
      • C
        chedxb
        last edited by

        I found this, https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196362

        I will post shortly with the experience we had here.

        C 1 Reply Last reply Reply Quote 0
        • C
          chedxb @chedxb
          last edited by

          @chedxb said in D-Link DWM-157 USB Stock not recognized:

          I found this, https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196362

          I will post shortly with the experience we had here.

          As explained here, I tried
          usb_modeswitch -v 2001 -p a407 -m 1 -M 555342431234567800000000000003f0010300000000000000000000000000 -R 1

          and I got this,

          Apr 16 16:51:21 kernel da0: quirks=0x2<NO_6_BYTE>
          Apr 16 16:51:21 kernel da0: Attempt to query device size failed: ILLEGAL REQUEST, Invalid field in CDB
          Apr 16 16:51:21 kernel da0: 40.000MB/s transfers
          Apr 16 16:51:21 kernel da0: <HSPA USB SCSI CD-ROM 6225> Removable Direct Access SCSI device
          Apr 16 16:51:21 kernel da0 at umass-sim0 bus 0 scbus2 target 0 lun 0
          Apr 16 16:51:21 kernel umass0: <Mass Storage > on usbus4
          Apr 16 16:51:21 kernel umass0 on uhub1
          Apr 16 16:51:21 kernel ue0: Ethernet address: 02:00:ff:aa:aa:aa
          Apr 16 16:51:21 kernel ue0: <USB Ethernet> on cdce0

          Apr 16 16:51:21 kernel cdce0: <COMcommif> on usbus4
          Apr 16 16:51:21 kernel cdce0 on uhub1
          Apr 16 16:51:21 kernel ugen4.2: <D-Link,Inc D-Link DWM-157> at usbus4
          Apr 16 16:51:19 kernel ugen4.2: <D-Link,Inc D-Link DWM-157> at usbus4 (disconnected)
          Apr 16 16:51:19 kernel umass0: detached
          Apr 16 16:51:19 kernel (cd0:umass-sim0:0:0:0): Periph destroyed
          Apr 16 16:51:19 kernel cd0: <HSPA USB SCSI CD-ROM 6225> s/n 531399703502680 detached
          Apr 16 16:51:19 kernel cd0 at umass-sim0 bus 0 scbus2 target 0 lun 0
          Apr 16 16:51:19 kernel umass0: at uhub1, port 1, addr 2 (disconnected)

          I see it under Available network ports: as well. I will test in the evening if it works or not.

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

            Ah, OK that's mostly all done then. Nice!

            So yeah you can see that's a two line change to two files. Should be easy enough to replicate for the new ID.

            Can you try this against your modem?
            https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196362#c9

            Does it then show up as ue0 as shown there?

            Steve

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

              Ah cross posted I see you did! Yeah see what happens when you assign it.

              FreeBSD/pfSense handles serial port modems much better but the speed is limited there.

              It would be interesting to see hoe usbconfig sees the modem when it's in Ethernet mode like that.

              Steve

              1 Reply Last reply Reply Quote 0
              • C
                chedxb
                last edited by

                I assigned as a new interface and then added usb_modeswitch -v 2001 -p a407 -m 1 -M 555342431234567800000000000003f0010300000000000000000000000000 -R 1 on
                Shellcmd Configuration as earlyshellcmd and rebooted. So far so good :) I just need a SIM card to test the data connection.

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

                  The big problem with USB Ethernet type devices is that pfSense does not have any way to handle them disconnecting. If you reboot and unplug the modem pfSense will stop booting at the interfaces assign screen at the console because ue0 is no9 longer present on the system but is assigned in the config. There are workarounds but they are all hacky....

                  What speeds do you expect to get from that device?

                  Steve

                  1 Reply Last reply Reply Quote 0
                  • C
                    chedxb
                    last edited by

                    I am planning to use it as a backup connection. I will cap download 5Mbps and upload 1Mbps with Traffic Shaper.

                    Is it possible to put a timer for the interfaces? Say, if ue0 is not present for 10s, then continue booting without it.

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

                      Well you can script whatever you want but the further you move away from the default install the harder things will be or you at upgrade for example.

                      You can easily get those speeds over a serial interface though so I would still with that if you can.

                      Steve

                      1 Reply Last reply Reply Quote 0
                      • C
                        chedxb
                        last edited by

                        Thanks Steve, do you recommend any particular serial interface modem?

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

                          I personally have a Sierra em7305. It's an internal m.2 card but usb connected. That provides serial ports. I get 20-30Mbps over it. The newer em7455 also works fine.

                          Hard to recommend anything I don't actually use myself.

                          Other than that external Ethernet connected modems are generally much easier to deal with like the Netgear lb1120.

                          Steve

                          1 Reply Last reply Reply Quote 0
                          • M mcury referenced this topic on
                          • M mcury referenced this topic on
                          • First post
                            Last post
                          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.