Web lists-archives.com

Using wvdial and usb_modeswitch to connect to internet with usb internet key

Usually to connect to internet my linux box (with gnome), I insert in a usb port my dongle 3G/4g and selecting in Network Manager the broad band connection configured the first time, selecting _Connect_ the pc goes in internet without problems (% of success 99.999).

Now I have to use a debian 8.0 version in an embedded system (Raspberry Pi 3), without graphical interface (if I use the version with any X Window System my code runs slowly), and connect this device to internet with the same internet usb key.

After google search I define a procedure to connect to internet but the % of success is 50%. So I think that somethings is wrong or is not present in my procedure. For this reason I ask your help.

Tools used wvdial, usb_modeswith

The conf file are:
# Configuration for the usb_modeswitch package, a mode switching tool for
# USB devices providing multiple states or modes
# Evaluated by the wrapper script /usr/sbin/usb_modeswitch_dispatcher
# To enable an option, set it to "1", "yes" or "true" (case doesn't matter)
# Everything else counts as "disable"

# Disable automatic mode switching globally (e.g. to access the original
# install storage)


# Onda MT8205 LTE





# Enable logging (results in a extensive report file in /var/log, named
# "usb_modeswitch_<interface-name>" and probably others


# Optional increase of "delay_use" for the usb-storage driver; there are hints
# that a recent kernel default change to 1 sec. may lead to problems, particu-
# larly with USB 3.0 ports. Set this to at least 3 (seconds) in that case.
# Does nothing if the current system value is same or higher



[Dialer Defaults]
Auto DNS = yes
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Modem Type = Analog Modem
; Phone = <Target Phone Number>
ISDN = 0
; Password = <Your Password>
New PPPD = yes
; Username = <Your Login Name>
Modem = /dev/ttyUSB2
Baud = 9600

[Dialer ondaTim]
Init1 = ATH
Init2 = ATE1
Init3 = AT+CGDCONT=1,"IP","stringaAPN"
Stupid mode = yes
Phone = *99***1#
Modem = /dev/ttyUSB2
Username = blank
Dial Command = ATD
Password = blank
Baud = 460800

sudo usb_modeswitch -c /etc/usb_modeswitch.conf

verify if in the output of lsusb the product number is in modem mode (my is 0x0265)

sudo modprobe usbserial vendor=0x19d2 product=0x0265

sudo wvdialconf /etc/wvdial.conf

sudo wvdial ondaTim
Can you hemp me to understand what is wrong or what is not present?