D-Link DWM-222 LTE Dongle with 2.5
-
Re: D-Link DWM-222 USB LTE Dongle
Has anyone had any luck getting this to work? Mine didn't work on 2.4.5, but I'm in the process of upgrading to 2.5 and upgrading the firmware of the modem itself-just curious if there are any suggestions...
-
Specifically the errors I get on 2.5 are:
May 30 02:29:34 ppp 30609 [opt1_link0] CHAT: The modem is not responding to "AT" at ModemCmd: label.
May 30 02:29:34 ppp 30609 [opt1_link0] MODEM: chat script failed
May 30 02:29:35 ppp 30609 [opt1_link0] Link: DOWN event
May 30 02:29:35 ppp 30609 [opt1_link0] LCP: Down event -
And I think this is the error most relevant:
94244 [opt1_link0] CHAT: The modem is not responding to "AT" at ModemCmd: label.
-
As is says, the port is not responding to AT commands. You may have the wrong port selected.
Try disabling/removing the ppp config from pfSense and then connceting to the port dircetly from the command line to see if it does respond to AT commands. Try all the ports if there is more than one com port presented.
Steve
-
I'm not terribly familiar with FreeBSD/linux in general-how do I go about connecting to the port directly from the CLI? I'm in and I appear to have found it on ugen3.2 (idVendor=0x2001, idProduct = 0xab00) if that helps, but I don't know how to force a connection from here to see if I can initiate a connection-I guess it's a cu command? Or tip? Can you point me anywhere that might help?
-
Not sure if any of this helps-I'm just going off what I found online elsewhere to try and round up some details:
ugen3.2: <Mobile Connect Mobile Connect> at usbus3, cfg=255 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA)
-
Additionally:
idVendor = 0x2001
idProduct = 0xab00
bcdDevice = 0x0228
iManufacturer = 0x0001 <Mobile Connect>
iProduct = 0x0002 <Mobile Connect>
bNumConfigurations = 0x0001ls -asl /dev/cuau*
0 crw-rw---- 1 uucp dialer 0x50 Jun 1 13:44 /dev/cuau0
0 crw-rw---- 1 uucp dialer 0x51 Jun 1 13:15 /dev/cuau0.init
0 crw-rw---- 1 uucp dialer 0x52 Jun 1 13:15 /dev/cuau0.lock
0 crw-rw---- 1 uucp dialer 0x36 Jun 1 14:26 /dev/cuau2
0 crw-rw---- 1 uucp dialer 0x37 Jun 1 13:15 /dev/cuau2.init
0 crw-rw---- 1 uucp dialer 0x38 Jun 1 13:15 /dev/cuau2.lockSorry about all the updates-got flagged as spam when I tried to submit them all together...
-
Ok first thing I would do is unplug it then plug it back in and check the system logs in the GUI.
If it's a supported device you will probably some entries as u3g creates new com ports. You might also see new usb ethernet devices detected.If it as and new ports are created they will be /dev/cuaU*. The upper case U denotes a USB connected device. Those ports you show above are the on-board com ports not the modem.
Yes, you would connect to it using cu, for example:
[2.4.1-DEVELOPMENT][admin@3100.stevew.lan]/root: cu -l /dev/cuaU0.2 Connected at OK ati Manufacturer: Sierra Wireless, Incorporated Model: EM7305 Revision: SWI9X15C_05.05.06.00 r19523 carmd-fwbuild1 2013/12/06 00:19:40 IMEI: *************** IMEI SV: 9 FSN: *************** +GCAP: +CGSM
Escape that by hitting return then
~~.
Steve
-
It appears to just disappear and then reappear:
Jun 1 20:14:20 kernel ugen3.2: <Mobile Connect Mobile Connect> at usbus3 (disconnected) Jun 1 20:14:42 kernel ugen3.2: <Mobile Connect Mobile Connect> at usbus3
-
And cu (to both cuau0 and cuau2 connect but just give me dead air:
===group
/home/pfadmin: sudo cu -l /dev/cuau2 Connected ~ [EOT]
-
Ok lets see the output of:
usbconfig -d ugen3.2 dump_all_desc
.Steve
-
That device does look like it should be recognised but only in 2.5:
https://github.com/pfsense/FreeBSD-src/blob/RELENG_2_5/sys/dev/usb/usbdevs#L1725It's not shown in 2.4.X. You will need to use a dev snapshot if you need native support.
Steve
-
Sorry about the attachments-pasting just got me spam errors
-
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
-
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
-
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?
-
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#L241If 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
-
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
-
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.
-
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
-
It's brand new, not locked, and works fine on my Windows box with the provided software...
-
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!
-
@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
-
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...
-
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!
-
@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#L1722It 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
-
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
-
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)
-
@rmeskill said in D-Link DWM-222 LTE Dongle with 2.5:
Get the current device configuration ...
Determining the active configuration failed (error -5). AbortThis 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
-
@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
-
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
-
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_USBI'm not sure there is anything we can do about that.
Steve
-
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?
-
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
-
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...
-
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
-
@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. -
@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...
-
@rmeskill
Thank you for the responce. I have Done the same now.. and i hope the huawei model i bought today will work better :)