Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #179143 > unrolled thread

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

Started byDaniele Disco <arkkimede@gmail.com>
First post2017-03-22 10:40 +0100
Last post2017-03-22 21:30 +0100
Articles 5 — 4 participants

Back to article view | Back to linux.debian.user


Contents

  Using wvdial and usb_modeswitch to connect to internet with usb  internet key Daniele Disco <arkkimede@gmail.com> - 2017-03-22 10:40 +0100
    Re: Using wvdial and usb_modeswitch to connect to internet with usb   internet key Daniele Disco <arkkimede@gmail.com> - 2017-03-22 20:00 +0100
      Re: Using wvdial and usb_modeswitch to connect to internet with usb  internet key didier gaumet <didier.gaumet@gmail.com> - 2017-03-22 20:20 +0100
    Re: Using wvdial and usb_modeswitch to connect to internet with usb  internet key "tv.debian@googlemail.com" <tv.debian@googlemail.com> - 2017-03-22 21:20 +0100
    Re: Using wvdial and usb_modeswitch to connect to internet with usb  internet key David Wright <deblis@lionunicorn.co.uk> - 2017-03-22 21:30 +0100

#179143 — Using wvdial and usb_modeswitch to connect to internet with usb internet key

FromDaniele Disco <arkkimede@gmail.com>
Date2017-03-22 10:40 +0100
SubjectUsing wvdial and usb_modeswitch to connect to internet with usb internet key
Message-ID<tnKUh-es-1@gated-at.bofh.it>
Hi!
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:
----------------usb_modeswitch.conf-----------------------------
# 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)

DisableSwitching=1

# Onda MT8205 LTE

DefaultVendor=0x19d2
DefaultProduct=0x0266

TargetVendor=0x19d2
TargetProduct=0x0265

StandardEject=1

MessageContent="55534243d8a523862400000080000685000000240000000000000000000000"

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

EnableLogging=0


# 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

SetStorageDelay=4

----------------usb_modeswitch.conf----------------------------- 

----------------wvdial.conf-------------------------------------
[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
----------------wvdial.conf------------------------------------- 

----------------Procedure---------------------------------------
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
----------------Procedure---------------------------------------
   
Can you hemp me to understand what is wrong or what is not present?
TIA

[toc] | [next] | [standalone]


#179164 — Re: Using wvdial and usb_modeswitch to connect to internet with usb internet key

FromDaniele Disco <arkkimede@gmail.com>
Date2017-03-22 20:00 +0100
SubjectRe: Using wvdial and usb_modeswitch to connect to internet with usb internet key
Message-ID<tnTEe-6Xw-5@gated-at.bofh.it>
In reply to#179143
Nobody can help me?

[toc] | [prev] | [next] | [standalone]


#179165

Fromdidier gaumet <didier.gaumet@gmail.com>
Date2017-03-22 20:20 +0100
Message-ID<tnTXz-7mv-15@gated-at.bofh.it>
In reply to#179164
I cannot help you with wvdial, I have used this rarely looong ago for
simple dial-up (no 3G/4G).

NetworkManager itself (not its applet) does not depend upon any GUI part
and nmcli (command line) and nmtui (ncurses text interface, roughly
equivalent to nm-applet) are included in the package.
NetworkManager depending on Modemmanager and usb_modeswitch, it would be
easy for you to manage your 3G/4G dongle.

[toc] | [prev] | [next] | [standalone]


#179166

From"tv.debian@googlemail.com" <tv.debian@googlemail.com>
Date2017-03-22 21:20 +0100
Message-ID<tnUTE-85w-13@gated-at.bofh.it>
In reply to#179143
On 22/03/2017 12:10, Daniele Disco wrote:
> Hi!
> 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:
> ----------------usb_modeswitch.conf-----------------------------
> # 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)
>
> DisableSwitching=1
>
> # Onda MT8205 LTE
>
> DefaultVendor=0x19d2
> DefaultProduct=0x0266
>
> TargetVendor=0x19d2
> TargetProduct=0x0265
>
> StandardEject=1
>
> MessageContent="55534243d8a523862400000080000685000000240000000000000000000000"
>
> # Enable logging (results in a extensive report file in /var/log, named
> # "usb_modeswitch_<interface-name>" and probably others
>
> EnableLogging=0
>
>
> # 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
>
> SetStorageDelay=4
>
> ----------------usb_modeswitch.conf-----------------------------
>
> ----------------wvdial.conf-------------------------------------
> [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
> ----------------wvdial.conf-------------------------------------
>
> ----------------Procedure---------------------------------------
> 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
> ----------------Procedure---------------------------------------
>
> Can you hemp me to understand what is wrong or what is not present?
> TIA
>

Hi, I have a similar installation on a LEDE (ex-OpenWRT) router that 
connect through a 3G usb dongle, and I use usb modems on Debian too. On 
all systems I have:

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

set to "0", otherwise switching the usb device from mass storage to 
modem hangs more often than not. Any reason why you need "1" here ?

I can't look into the LEDE chat script right now, but will do tomorrow 
and report any difference with your setup that strikes me.

Cheers.

[toc] | [prev] | [next] | [standalone]


#179168

FromDavid Wright <deblis@lionunicorn.co.uk>
Date2017-03-22 21:30 +0100
Message-ID<tnV3k-89A-15@gated-at.bofh.it>
In reply to#179143
On Wed 22 Mar 2017 at 02:10:24 (-0700), Daniele Disco wrote:
> Hi!
> 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:
> ----------------usb_modeswitch.conf-----------------------------
> # 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)
> 
> DisableSwitching=1
> 
> # Onda MT8205 LTE
> 
> DefaultVendor=0x19d2
> DefaultProduct=0x0266
> 
> TargetVendor=0x19d2
> TargetProduct=0x0265
> 
> StandardEject=1
> 
> MessageContent="55534243d8a523862400000080000685000000240000000000000000000000"
> 
> # Enable logging (results in a extensive report file in /var/log, named
> # "usb_modeswitch_<interface-name>" and probably others
> 
> EnableLogging=0

Perhaps you should set this to find out what's going on both when
you have success and failure, to see if there's a difference.

> # 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
> 
> SetStorageDelay=4
> 
> ----------------usb_modeswitch.conf----------------------------- 
> 
> ----------------wvdial.conf-------------------------------------
> [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
> ----------------wvdial.conf------------------------------------- 
> 
> ----------------Procedure---------------------------------------
> 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
> ----------------Procedure---------------------------------------
>    
> Can you hemp me to understand what is wrong or what is not present?

IIRC (15 years) wvdial uses ppp. I know that ppp can be made to log
debug information. I can't remember whether wvdial does. (I never
used it but I helped occasionally.) So once again you need to look
at the logs when it works and when it doesn't.

Cheers,
David.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web