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

    4g modem DLINK DWR910

    Scheduled Pinned Locked Moved Hardware
    15 Posts 3 Posters 1.8k 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.
    • L
      lopemede
      last edited by

      @johnkeates:

      You need to switch the USB mode, this is different and badly documented for every device/vendor. Check pages like http://www.draisberghof.de/usb_modeswitch/bb/viewtopic.php?f=3&t=2173&start=30

      Hey guys
      Thanks for listening!
      So I even checked topics about usb_modeswitch but I noticed that in my Pfsense (2.3.4p1) this command does not exist, is there any way to install it?

      @stephenw10:

      Appear to be just the eject procedure though:

      {0x2001, 0xa40d, none, 0, 0, 2, &modeswitch_std_eject, "D-Link DWR-910"},       //
      

      Does it appear as a virtual cd-rom drive too?

      Steve

      Yes, it goes up as 'cd1'
      another situation I tried using the command "camcontrol eject", without result.

      ugen4.3: <mobile connect="">at usbus4
      umass0: <mass storage="">on usbus4
      da1 at umass-sim0 bus 0 scbus6 target 0 lun 0
      da1: < SD Storage 0000> Removable Direct Access SCSI-2 device
      da1: 40.000MB/s transfers
      da1: Attempt to query device size failed: ILLEGAL REQUEST, Invalid command operation
      da1: quirks=0x2 <no_6_byte>cd1 at umass-sim0 bus 0 scbus6 target 0 lun 1
      cd1: < Mass Storage 0000> Removable CD-ROM SCSI-2 device
      cd1: 40.000MB/s transfers
      cd1: 2MB (1312 2048 byte sectors)
      cd1: quirks=0x10<10_BYTE_ONLY></no_6_byte></mass></mobile>

      Maybe you're doing something wrong?

      1 Reply Last reply Reply Quote 0
      • L
        lopemede
        last edited by

        Yes, I used the command "camcontrol eject cd1" appears like this

        ugen4.3: <mobile connect="">at usbus4 (disconnected)
        umass0: at uhub5, port 2, addr 3 (disconnected)
        da1 at umass-sim0 bus 0 scbus6 target 0 lun 0
        da1: < SD Storage 0000> detached
        cd1 at umass-sim0 bus 0 scbus6 target 0 lun 1
        (da1:cd1: umass-sim0:0:< Mass Storage 0000>0: detached
        0): Periph destroyed
        (cd1:umass-sim0:0:0:1): Periph destroyed

        ugen4.3: <mobile connect="">at usbus4
        umass0: <mass storage="">on usbus4
        da1 at umass-sim0 bus 0 scbus6 target 0 lun 0
        da1: < SD Storage 0000> Removable Direct Access SCSI-2 device
        da1: 40.000MB/s transfers
        da1: Attempt to query device size failed: ILLEGAL REQUEST, Invalid command operation
        da1: quirks=0x2 <no_6_byte>and the PPP interface still does not appear to configure…

        tela.png
        tela.png_thumb</no_6_byte></mass></mobile></mobile>

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

          Check usbconfig after ejecting the virtual drive. Does the device change product ID?

          Steve

          1 Reply Last reply Reply Quote 0
          • L
            lopemede
            last edited by

            before ejecting:

            ugen4.3: <mobile connect="">at usbus4
            umass0: <mass storage="">on usbus4
            da1 at umass-sim0 bus 0 scbus6 target 0 lun 0
            da1: < SD Storage 0000> Removable Direct Access SCSI-2 device
            da1: 40.000MB/s transfers
            da1: Attempt to query device size failed: ILLEGAL REQUEST, Invalid command operation
            da1: quirks=0x2 <no_6_byte>cd1 at umass-sim0 bus 0 scbus6 target 0 lun 1
            cd1: < Mass Storage 0000> Removable CD-ROM SCSI-2 device
            cd1: 40.000MB/s transfers
            cd1: 2MB (1312 2048 byte sectors)
            cd1: quirks=0x10<10_BYTE_ONLY>

            ugen4.3: <mobile connect="" mobile="">at usbus4, cfg=0 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 = 0xa40d**
              bcdDevice = 0x0228
              iManufacturer = 0x0001  <mobile connect="">iProduct = 0x0002  <mobile connect="">iSerialNumber = 0x0003  <1139612372f4>
              bNumConfigurations = 0x0001

            after ejecting:

            ugen4.3: <mobile connect="">at usbus4 (disconnected)
            umass0: at uhub5, port 1, addr 3 (disconnected)
            da1 at umass-sim0 bus 0 scbus6 target 0 lun 0
            da1: < SD Storage 0000> detached
            cd1 at umass-sim0 bus 0 scbus6 target 0 lun 1
            (da1:cd1: umass-sim0:0:< Mass Storage 0000>0: detached
            0): Periph destroyed
            (cd1:umass-sim0:0:0:1): Periph destroyed
            ugen4.3: <mobile connect="">at usbus4
            umass0: <mass storage="">on usbus4
            da1 at umass-sim0 bus 0 scbus6 target 0 lun 0
            da1: < SD Storage 0000> Removable Direct Access SCSI-2 device
            da1: 40.000MB/s transfers
            da1: Attempt to query device size failed: ILLEGAL REQUEST, Invalid command operation
            da1: quirks=0x2 <no_6_byte>ugen4.3: <mobile connect="" mobile="">at usbus4, cfg=0 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 = 0x7e38**
              bcdDevice = 0x0228
              iManufacturer = 0x0001  <mobile connect="">iProduct = 0x0002  <mobile connect="">iSerialNumber = 0x0003  <0123456789ABCDEF>
              bNumConfigurations = 0x0002

            I noticed that it changes the "idProduct"</mobile></mobile></probed></mobile></no_6_byte></mass></mobile></mobile></mobile></mobile></probed></mobile></no_6_byte></mass></mobile>

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

              DWR-910 has 2 configuration after mode switching, RNDIS as config #1 and CDC_ETHER as config #2.

              After ejecting try running:

              usbconfig -d ugen4.3 dump_all_config_desc
              

              Steve

              1 Reply Last reply Reply Quote 0
              • L
                lopemede
                last edited by

                dump shows me all these device information:

                ugen4.3: <mobile connect="" mobile="">at usbus4, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA)

                Configuration index 0

                bLength = 0x0009
                    bDescriptorType = 0x0002
                    wTotalLength = 0x0062
                    bNumInterfaces = 0x0003
                    bConfigurationValue = 0x0001
                    iConfiguration = 0x0000  <no string="">bmAttributes = 0x00a0
                    bMaxPower = 0x00fa

                Additional Descriptor

                bLength = 0x08
                    bDescriptorType = 0x0b
                    bDescriptorSubType = 0x00
                    RAW dump:
                    0x00 | 0x08, 0x0b, 0x00, 0x02, 0xe0, 0x01, 0x03, 0x07

                Interface 0
                      bLength = 0x0009
                      bDescriptorType = 0x0004
                      bInterfaceNumber = 0x0000
                      bAlternateSetting = 0x0000
                      bNumEndpoints = 0x0001
                      bInterfaceClass = 0x00e0  <wireless controller="">bInterfaceSubClass = 0x0001
                      bInterfaceProtocol = 0x0003
                      iInterface = 0x0005  <rndis communications="" control="">Additional Descriptor

                bLength = 0x05
                      bDescriptorType = 0x24
                      bDescriptorSubType = 0x00
                      RAW dump:
                      0x00 | 0x05, 0x24, 0x00, 0x10, 0x01

                Additional Descriptor

                bLength = 0x05
                      bDescriptorType = 0x24
                      bDescriptorSubType = 0x01
                      RAW dump:
                      0x00 | 0x05, 0x24, 0x01, 0x00, 0x01

                Additional Descriptor

                bLength = 0x04
                      bDescriptorType = 0x24
                      bDescriptorSubType = 0x02
                      RAW dump:
                      0x00 | 0x04, 0x24, 0x02, 0x00

                Additional Descriptor

                bLength = 0x05
                      bDescriptorType = 0x24
                      bDescriptorSubType = 0x06
                      RAW dump:
                      0x00 | 0x05, 0x24, 0x06, 0x00, 0x01

                Endpoint 0
                        bLength = 0x0007
                        bDescriptorType = 0x0005
                        bEndpointAddress = 0x0082  <in>bmAttributes = 0x0003  <interrupt>wMaxPacketSize = 0x0008
                        bInterval = 0x0009
                        bRefresh = 0x0000
                        bSynchAddress = 0x0000

                Interface 1
                      bLength = 0x0009
                      bDescriptorType = 0x0004
                      bInterfaceNumber = 0x0001
                      bAlternateSetting = 0x0000
                      bNumEndpoints = 0x0002
                      bInterfaceClass = 0x000a  <cdc-data>bInterfaceSubClass = 0x0000
                      bInterfaceProtocol = 0x0000
                      iInterface = 0x0006  <rndis ethernet="" data="">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 = 0x0000
                        bRefresh = 0x0000
                        bSynchAddress = 0x0000

                Interface 2
                      bLength = 0x0009
                      bDescriptorType = 0x0004
                      bInterfaceNumber = 0x0002
                      bAlternateSetting = 0x0000
                      bNumEndpoints = 0x0002
                      bInterfaceClass = 0x0008  <mass storage="">bInterfaceSubClass = 0x0006
                      bInterfaceProtocol = 0x0050
                      iInterface = 0x0004  <mass storage="">Endpoint 0
                        bLength = 0x0007
                        bDescriptorType = 0x0005
                        bEndpointAddress = 0x0083  <in>bmAttributes = 0x0002  <bulk>wMaxPacketSize = 0x0200
                        bInterval = 0x0000
                        bRefresh = 0x0000
                        bSynchAddress = 0x0000

                Endpoint 1
                        bLength = 0x0007
                        bDescriptorType = 0x0005
                        bEndpointAddress = 0x0002  <out>bmAttributes = 0x0002  <bulk>wMaxPacketSize = 0x0200
                        bInterval = 0x0001
                        bRefresh = 0x0000
                        bSynchAddress = 0x0000

                Configuration index 1

                bLength = 0x0009
                    bDescriptorType = 0x0002
                    wTotalLength = 0x0067
                    bNumInterfaces = 0x0003
                    bConfigurationValue = 0x0002
                    iConfiguration = 0x0000  <no string="">bmAttributes = 0x00a0
                    bMaxPower = 0x00fa

                Interface 0
                      bLength = 0x0009
                      bDescriptorType = 0x0004
                      bInterfaceNumber = 0x0000
                      bAlternateSetting = 0x0000
                      bNumEndpoints = 0x0001
                      bInterfaceClass = 0x0002  <communication device="">bInterfaceSubClass = 0x0006
                      bInterfaceProtocol = 0x0000
                      iInterface = 0x0008  <cdc ethernet="" control="" model="" (ecm)="">Additional Descriptor

                bLength = 0x05
                      bDescriptorType = 0x24
                      bDescriptorSubType = 0x00
                      RAW dump:
                      0x00 | 0x05, 0x24, 0x00, 0x10, 0x01

                Additional Descriptor

                bLength = 0x05
                      bDescriptorType = 0x24
                      bDescriptorSubType = 0x06
                      RAW dump:
                      0x00 | 0x05, 0x24, 0x06, 0x00, 0x01

                Additional Descriptor

                bLength = 0x0d
                      bDescriptorType = 0x24
                      bDescriptorSubType = 0x0f
                      RAW dump:
                      0x00 | 0x0d, 0x24, 0x0f, 0x0a, 0x00, 0x00, 0x00, 0x00,
                      0x08 | 0xea, 0x05, 0x00, 0x00, 0x00

                Endpoint 0
                        bLength = 0x0007
                        bDescriptorType = 0x0005
                        bEndpointAddress = 0x0082  <in>bmAttributes = 0x0003  <interrupt>wMaxPacketSize = 0x0010
                        bInterval = 0x0009
                        bRefresh = 0x0000
                        bSynchAddress = 0x0000

                Interface 1
                      bLength = 0x0009
                      bDescriptorType = 0x0004
                      bInterfaceNumber = 0x0001
                      bAlternateSetting = 0x0000
                      bNumEndpoints = 0x0000
                      bInterfaceClass = 0x000a  <cdc-data>bInterfaceSubClass = 0x0000
                      bInterfaceProtocol = 0x0000
                      iInterface = 0x0000  <no string="">Interface 1 Alt 1
                      bLength = 0x0009
                      bDescriptorType = 0x0004
                      bInterfaceNumber = 0x0001
                      bAlternateSetting = 0x0001
                      bNumEndpoints = 0x0002
                      bInterfaceClass = 0x000a  <cdc-data>bInterfaceSubClass = 0x0000
                      bInterfaceProtocol = 0x0000
                      iInterface = 0x0009  <cdc ethernet="" data="">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 = 0x0000
                        bRefresh = 0x0000
                        bSynchAddress = 0x0000

                Interface 2
                      bLength = 0x0009
                      bDescriptorType = 0x0004
                      bInterfaceNumber = 0x0002
                      bAlternateSetting = 0x0000
                      bNumEndpoints = 0x0002
                      bInterfaceClass = 0x0008  <mass storage="">bInterfaceSubClass = 0x0006
                      bInterfaceProtocol = 0x0050
                      iInterface = 0x0004  <mass storage="">Endpoint 0
                        bLength = 0x0007
                        bDescriptorType = 0x0005
                        bEndpointAddress = 0x0083  <in>bmAttributes = 0x0002  <bulk>wMaxPacketSize = 0x0200
                        bInterval = 0x0000
                        bRefresh = 0x0000
                        bSynchAddress = 0x0000

                Endpoint 1
                        bLength = 0x0007
                        bDescriptorType = 0x0005
                        bEndpointAddress = 0x0002  <out>bmAttributes = 0x0002  <bulk>wMaxPacketSize = 0x0200
                        bInterval = 0x0001
                        bRefresh = 0x0000
                        bSynchAddress = 0x0000

                and nothing new in interfaces and interfaces / PPPs</bulk></out></bulk></in></mass></mass></bulk></out></bulk></in></cdc></cdc-data></no></cdc-data></interrupt></in></cdc></communication></no></bulk></out></bulk></in></mass></mass></bulk></out></bulk></in></rndis></cdc-data></interrupt></in></rndis></wireless></no></mobile>

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

                  Try running:

                  usbconfig -d  ugen4.3 set_config 1
                  

                  Does it appear as a USB Ethernet device? ue0?

                  If so you can add a usb quirk to make that always happen. Or add it as a shellcmd.

                  Steve

                  1 Reply Last reply Reply Quote 0
                  • L
                    lopemede
                    last edited by

                    Great! Thanks
                    We are on the way … :)

                    In interfaces now this is showing me "ue0", I tried to activate the interface but it still does not show me the port for the PPP settings for the modem model ...

                    tela0.png
                    tela0.png_thumb
                    tela1.png
                    tela1.png_thumb

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

                      Yes, it appears that modem cannot, easily, appear as a ppp device. It's running in 'router mode' (HiLink mode).

                      If you assign ue0 as you would any other interface and set it to dhcp it will probably get an IP and gateway. That gateway might be your provider directly or it might be the modem. You might be able to change that mode in the modem, try browsing to it.

                      Steve

                      1 Reply Last reply Reply Quote 0
                      • L
                        lopemede
                        last edited by

                        Solved here, Steve! :)
                        That's it! I know the interface as DHCP, everything ok the LINK …
                        I'll set up a quirk usb now to finalize the settings ...

                        Thanks a lot for the help!

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

                          No problem.  :)

                          There are some issues. pfSense will have a mini freak out if one of it's assigned interfaces goes missing. It will not boot up again for example because ue0 is not present and it will leave you at the interfaces assign screen.

                          So that means, don't unplug the modem and also don't allow it to go into some power saving mode which some modems do.

                          In this case the device does not appear at all until it's been 'ejected' so that makes it even harder to work with.  :-\

                          Using earlyshellcmd may not be early enough. You might have to do something with a devd script….

                          It may be possible to disable that virtual CD mode entirely from the modems gui, some do allow that.

                          Steve

                          1 Reply Last reply Reply Quote 0
                          • L
                            lopemede
                            last edited by

                            Okay, I'll check these cases and monitor …

                            Thanks again!

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