Subject: Setting up D Link DWM-156 on Alpine for Data

From: Farooq Karimi Zadeh <[email-masked]>
Date: Mon, 22 Dec 2025 19:52:05 +0330

Hello.

I've bought an old D Link DWM-156 3G(or 3.75G?) USB modem for me PC. And 
I need some hints on setting it

up for using it for Internet.

The modem is found by ModemManager and `mmcli -m 1` reports:

```

   --------------------------------
   General  |                 path: /org/freedesktop/ModemManager1/Modem/1
            |            device id: 7423702de5132c5d2b887b2b5038bcd793c239a6
   --------------------------------
   Hardware |         manufacturer: MTK1
            |                model: MTK2
            |    firmware revision: 2.0.8
            |            supported: gsm-umts
            |              current: gsm-umts
            |         equipment id: 355619054965791
   --------------------------------
   System   |               device: 
/sys/devices/pci0000:00/0000:00:08.1/0000:0c:00.3/usb3/3-1
            |              physdev: 
/sys/devices/pci0000:00/0000:00:08.1/0000:0c:00.3/usb3/3-1
            |              drivers: cdc_mbim, option
            |               plugin: generic
            |         primary port: ttyUSB0
            |                ports: ttyUSB0 (at), ttyUSB1 (at), wwan0 
(ignored)
   --------------------------------
   Status   |                state: registered
            |          power state: on
            |          access tech: hspa
            |       signal quality: 100% (recent)
   --------------------------------
   Modes    |            supported: allowed: 2g, 3g; preferred: none
            |              current: allowed: 2g, 3g; preferred: none
   --------------------------------
   IP       |            supported: ipv4, ipv6, ipv4v6
   --------------------------------
   3GPP     |                 imei: ..........
            |          operator id: 43235
            |        operator name: 43235
            |         registration: home
            | packet service state: attached
   --------------------------------
   SIM      |     primary sim path: /org/freedesktop/ModemManager1/SIM/1
```
Also `mmcli -m 1 --simple-connect='apn=...'` gives this:

```

error: couldn't connect the modem: 
'GDBus.Error:org.freedesktop.ModemManager1.Error.Core.NotFound: Not 
found: Couldn't validate update of profile '1': Profile '1' not found'

```

I wonder where am I wrong.

Thanks in advance,

Farooq.

---

From: Farooq Karimi Zadeh <[email-masked]>
Date: Wed, 31 Dec 2025 11:10:06 +0330

On 12/22/25 19:52, Farooq Karimi Zadeh wrote:

> Hello.
>
> I've bought an old D Link DWM-156 3G(or 3.75G?) USB modem for me PC. 
> And I need some hints on setting it
>

Something which I've noticed comparing to Mint(in which the modem is 
working) is that it has an extra port and wwan is no ignored:

   --------------------------------
   General  |                 path: /org/freedesktop/ModemManager1/Modem/0
            |            device id: d435bc4d0debc341fe543dad3dda8f00d4ef7364
   --------------------------------
   Hardware |         manufacturer: D-Link,Inc
            |                model: D-Link DWM-156
            |    firmware revision: MOLY.WR8.W1231.DC.WG.MP.V3.P2
            |         h/w revision: MTK2
            |            supported: gsm-umts
            |              current: gsm-umts
            |         equipment id: ...
   --------------------------------
   System   |               device: 
/sys/devices/pci0000:00/0000:00:01.3/0000:02:00.0/usb1/1-7
            |              physdev: 
/sys/devices/pci0000:00/0000:00:01.3/0000:02:00.0/usb1/1-7
            |              drivers: option, cdc_mbim
            |               plugin: generic
            |         primary port: cdc-wdm2
            |                ports: cdc-wdm2 (mbim), ttyUSB0 (at), 
ttyUSB1 (at), wwan0 (net)
   --------------------------------
   Status   |       unlock retries: unknown (0)
            |                state: connected
            |          power state: on
            |          access tech: hsdpa, hsupa
            |       signal quality: 0% (cached)
   --------------------------------
   Modes    |            supported: allowed: 2g, 3g; preferred: none
            |              current: allowed: 2g, 3g; preferred: none
   --------------------------------
   IP       |            supported: ipv4, ipv6, ipv4v6
   --------------------------------
   3GPP     |                 imei: ...
            |        enabled locks: net-pers, net-sub-pers, 
provider-pers, corp-pers
            |          operator id: 43220
            |        operator name: 43220
            |         registration: home
            | packet service state: attached
   --------------------------------
   SIM      |     primary sim path: /org/freedesktop/ModemManager1/SIM/0
   --------------------------------
   Bearer   |                paths: /org/freedesktop/ModemManager1/Bearer/0

Also a firmware is loaded into the device it seems. Am I correct 
assuming that the right firmware is not loaded onto the device on Alpine?

---

From: Stefan Hartmann SH <[email-masked]>
Date: Wed, 31 Dec 2025 09:54:04 +0000

I run an old DMM-222 connected via USB, on an Alpine RPI, diskless 
setup, headless, via qmi.
Perhaps this ca be helpfull for you.

Nb: sorry for formatting

# cat /etc/network/interfaces

#auto wwan0	# delay start with /etc/local.d/50-ifup-wwan0.start
iface wwan0
	use dhcp
	udhcpc_opts -S
	pre-up usb_modeswitch -v 0x2001 -p 0xab00 -K ||
		echo "$$: pre-up ERROR: usb_modeswitch"
	pre-up i=0; until test -c /dev/cdc-wdm0; do sleep 1; i=$(( i + 1 )); if 
test $i -ge 16; then echo "$$: pre-up ERROR: timeout /dev/cdc-wdm0 not 
existent"; exit 1; fi; done
	pre-up j=0; until qmicli -d /dev/cdc-wdm0 --dms-get-operating-mode | 
grep -Eq "^\s+Mode: 'online'$"; do sleep 4; j=$(( j + 1 )); if
test $j -ge 16; then echo "$$: pre-up ERROR: timeout qmicli 
dms-get-operating-mode not online"; exit 1; fi; done

	pre-up k=0; until qmicli -d /dev/cdc-wdm0 --nas-get-home-network 
 >/dev/null 2>&1; do sleep 4; k=$(( k + 1 )); if test $k -ge 16; then 
echo "$$: pre-up ERROR: timeout qmicli nas-get-home-network not 
success"; exit 1; fi; done; sleep 10

	pre-up qmi-network /dev/cdc-wdm0 start
	up ip link set dev $IFACE up
	post-up sysctl net.ipv6.conf.$IFACE.disable_ipv6=1
	#post-up if qmicli -d /dev/cdc-wdm0 --wds-get-autoconnect-settings | 
grep -Eq "^\s+Status: 'disabled'$"; then qmicli -d /dev/cdc-wdm0 
--wds-set-autoconnect-settings=enabled,home-only || echo "post-up WARN: 
wds-set-autoconnect-settings"; fi
	post-down qmi-network /dev/cdc-wdm0 stop

-- 
Stefan Hartmann - ib.hafenthal.de

On 12/31/25  07:40, Farooq Karimi Zadeh wrote:
>>   System   |               device: /sys/devices/ 
>> pci0000:00/0000:00:08.1/0000:0c:00.3/usb3/3-1
>>            |              physdev: /sys/devices/ 
>> pci0000:00/0000:00:08.1/0000:0c:00.3/usb3/3-1
>    System   |               device: /sys/devices/ 
> pci0000:00/0000:00:01.3/0000:02:00.0/usb1/1-7
>             |              physdev: /sys/devices/ 
> pci0000:00/0000:00:01.3/0000:02:00.0/usb1/1-7
>             |        enabled locks: net-pers, net-sub-pers, provider- 
> pers, corp-pers
>             |          operator id: 43220
>             |        operator name: 43220
>             |         registration: home

---

From: Farooq Karimi Zadeh <[email-masked]>
Date: Wed, 31 Dec 2025 14:22:04 +0330

On 12/31/25 13:24, Stefan Hartmann SH wrote:

>     pre-up i=0; until test -c /dev/cdc-wdm0; do sleep 1; i=$(( i + 1 
> )); if test $i -ge 16; then echo "$$: pre-up ERROR: timeout 
> /dev/cdc-wdm0 not existent"; exit 1; fi; done
>     pre-up j=0; until qmicli -d /dev/cdc-wdm0 --dms-get-operating-mode 
> | grep -Eq "^\s+Mode: 'online'$"; do sleep 4; j=$(( j + 1 )); if
>     #post-up if qmicli -d /dev/cdc-wdm0 --wds-get-autoconnect-settings 
> | grep -Eq "^\s+Status: 'disabled'$"; then qmicli -d /dev/cdc-wdm0 
> --wds-set-autoconnect-settings=enabled,home-only || echo "post-up 
> WARN: wds-set-autoconnect-settings"; fi

Thanks. Unfortunately for me, these QMI stuff give "[/dev/cdc-wdm0] MBIM 
error: NoDeviceSupport" error.

Regrading the formatting, it's okay IMO. Better than have them in a 
pastebin and then see the pastebin vanish next 5 years ;)