Raspberry Pi and D-Link DWM-222

I’m not sure why every tutorial talk about usb-modeswitch because I haven’t use it and I can connect to internets with my D-Link DWM-222 without any problems.

I might have understood something wrong (if I have please comment and let me know) but this is how I do it.

Hardware:

  • D-Link DWM-222
  • Raspberry Pi 3 Model B+

Software:

  • Raspbian Stretch (2018-04-18-raspbian-stretch)
  • wvdial

After normal apt update and apt upgrade I just did:

apt install wvdial

And then edited /etc/wvdial.conf


[Dialer defaults]
Modem = /dev/ttyUSB1
Init = AT+CGDCONT=1,"IP","internet"
Phone = *99#
Stupid Mode = 1
Username = " "
Password = " "

And then run wvdial and I’m connected to the internets:


root@raspberrypi:/home/pi# wvdial
--> WvDial: Internet dialer version 1.61
--> Initializing modem.
--> Sending: AT+CGDCONT=1,"IP","internet"
AT+CGDCONT=1,"IP","internet"
OK
--> Modem initialized.
--> Sending: ATDT*99#
--> Waiting for carrier.
ATDT*99#
CONNECT 150000000
--> Carrier detected. Starting PPP immediately.
--> Starting pppd at Wed May 16 15:17:28 2018
--> Pid of pppd: 1274
--> Using interface ppp0
--> pppd: ▒▒▒v▒8R
--> pppd: ▒▒▒v▒8R
--> pppd: ▒▒▒v▒8R
--> pppd: ▒▒▒v▒8R
--> pppd: ▒▒▒v▒8R
--> pppd: ▒▒▒v▒8R
--> local IP address 37.136.23.149
--> pppd: ▒▒▒v▒8R
--> remote IP address 10.64.64.64
--> pppd: ▒▒▒v▒8R
--> primary DNS address 62.241.198.245
--> pppd: ▒▒▒v▒8R
--> secondary DNS address 62.241.198.246
--> pppd: ▒▒▒v▒8R

and ifconfig of the ppp0 interface:


root@raspberrypi:/home/pi# ifconfig ppp0
ppp0: flags=4305 mtu 1500
inet 37.136.23.149 netmask 255.255.255.255 destination 10.64.64.64
ppp txqueuelen 3 (Point-to-Point Protocol)
RX packets 100164 bytes 132252304 (126.1 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 67536 bytes 27687873 (26.4 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

and I’m also happy with the speeds:


root@raspberrypi:/home/pi# speedtest
Retrieving speedtest.net configuration...
Testing from DNA Oyj (37.136.23.149)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by Telia (Helsinki) [0.11 km]: 55.077 ms
Testing download speed................................................................................
Download: 51.67 Mbit/s
Testing upload speed....................................................................................................
Upload: 18.99 Mbit/s
root@raspberrypi:/home/pi#

1 comment to Raspberry Pi and D-Link DWM-222

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

  

  

  

This site uses Akismet to reduce spam. Learn how your comment data is processed.