Escolar Documentos
Profissional Documentos
Cultura Documentos
WvdialArchWiki
Wvdial
FromArchWiki
WvDialisaPointtoPointProtocoldialer:itdialsamodemandstartspppdinordertoconnecttothe
Internet.
Contents
1Configuration
2Usingwvdial
2.1Usingsuid
2.2Usingadialoutgroup
2.3Usingsudo
3TipsandTricks
3.1Lowconnectionspeed
3.1.1QoSparameter
3.1.2Baudparameter
3.2AutoReconnect
3.3Multipledevices
Configuration
WhenWvDialstarts,itfirstloadsitsconfigurationfrom /etc/wvdial.conf and ~/.wvdialrc .If
/etc/wvdial.conf isnotpresent,theeasiestwaytocreateitistousetheprovidedconfigurationutility
wvdialconf.
wvdialconf/etc/wvdial.conf
IthelpsingeneratingtheconfigurationfileneededbyWvDial.wvdialconfdetectsyourmodem,andfills
inautomaticallytheModem,maximumBaudrate,andagoodinitializationstring(Initoptions)and
generatesorupdatestheWvDialconfigurationfile( /etc/wvdial.conf )basedonthisinformation.
Itissafetorunwvdialconfifaconfigurationfilealreadyexists.Inthatcase,onlytheModem,Baud,
Init,andInit2optionsarechangedinthe[DialerDefaults]section,andonlyifautodetectionis
successful.
Note:Wvdialconfdoesnotautomaticallyfillinyourlogininformation.Youneedtoedit
/etc/wvdial.conf andspecifythephonenumber,loginname,andpasswordofyourinternetaccount
inorderforWvDialtowork.
Afteryouhavefilledinyourlogininformation,wvdialoughttowork.Youcanmovetothenextsection.
HoweverforprovidersofUSBmodemsthatrequireaspecificInitstringanduser/password
combination,mkwvconfgit(https://aur.archlinux.org/packages/mkwvconfgit/)AURinAURcan
https://wiki.archlinux.org/index.php/Wvdial
1/5
8/7/2015
WvdialArchWiki
helpgenerateawvdialconfiguration(basedonthemobilebroadbandproviderinfogit
(https://aur.archlinux.org/packages/mobilebroadbandproviderinfogit/)AURpackage).
Usingwvdial
Thereareafewdifferentwaysofgivingregularuserstheabilitytousewvdialtodialapppconnection.
Thisdocumentdescribesthreedifferentways,eachofthemdifferindifficultytosetupandthe
implicationonsecurity.
wvdialistoberunasrootwiththefollowingcommand:
#wvdial<section>
Usingsuid
Thisisarguabletheeasiestsetupbuthasmajorimpactonsystemsecuritysinceitmeansthateveryuser
canrunwvdialasroot.Pleaseconsiderusingoneoftheothersolutionsinstead.
Asnormaluserscannotusewvdialtodialapppconnectionbydefault,changepermissions:
#chmodu+s/usr/bin/wvdial
Youshouldseethefollowingpermissions:
#lsl/usr/bin/wvdial
rwsrxrx1rootroot1143682005120719:21/usr/bin/wvdial
https://wiki.archlinux.org/index.php/Wvdial
2/5
8/7/2015
WvdialArchWiki
Usingadialoutgroup
Another,slightlymoresecurewayistosetupagroupcalleddialout(callthegroupasprefered)and
givemembersofthisgrouppermissiontorun wvdial asroot.
Firstcreatethegroupandaddtheuserstoit:
#groupadddialout
#gpasswdausernamedialout
Note:Youneedtologoutandlogbackinforthecurrentuser'sgrouplisttobeupdated.
Thensetthegroupandadjustthepermissionson wvdial :
#chgrpdialout/usr/bin/wvdial
#chmodu+s,o=/usr/bin/wvdial
Thefilesshouldhavethefollowingpermissions:
$lsl/usr/bin/wvdial
rwsrx1rootdialout1143682005120719:21/usr/bin/wvdial
Usingsudo
Seemainarticle:sudo
sudoarguablyoffersthemostsecureoptiontoallowregularuserstoestablishdialupconnectionsusing
wvdial .Itcanbeusedtogivepermissionbothonaperuserandgroupbasis.Anotherbenefitofusing
sudo isthatitisonlyneededtodothesetuponcebothprevioussolutionswillbe"undone"whenanew
packageof wvdial isinstalled.
Use visudo toeditthefile /etc/sudoers :
#visudo
If ipaddr showsapppdentry,itmeansthatthesessionisready.
TipsandTricks
https://wiki.archlinux.org/index.php/Wvdial
3/5
8/7/2015
WvdialArchWiki
ThefollowingareapplicabletoUSBmodems.
Lowconnectionspeed
SomeoneclaimsthattheconnectionspeedunderlinuxislowerthanWindows.
https://bbs.archlinux.org/viewtopic.php?id=111513
Ashortsummaryforpossiblesolutionswhicharenotfullyverified.Inmostofconditions,thelowspeed
iscausedbybadreceiversignalsandtoomanypeopleincell.Butyoustillcouldusethefollowing
methodtotrytoimprovetheconnectionspeed.
QoSparameter
AT+CGEQMINandAT+CGEQREQcommandcouldusedtosettheQoscommand.Andalsoitshould
bepossibletousedtodecreaseandlimittheconnectspeed.AddthefollowingInitcommandin
/etc/wvdial.conf .
Init6=AT+CGEQMIN=1,4,64,640,64,640
Init7=AT+CGEQREQ=1,4,64,640,64,640
Baudparameter
Baudparameterin /etc/wvdial.conf couldbeusedtoincreasetheconnectionspeed.
Baud=460800
ItisadvisabletoseethebaudratesetbytheofficialmodemapplicationunderWindows.
AutoReconnect
Ifwvdialrandomlydropsconnectionyoucanusescriptbelow.
#!/bin/bash
(
while:;do
wvdial
sleep10
done
)&
Multipledevices
Oftentherewillbeseveraldevices(at/dev/ttyUSB0,/dev/ttyUSB1,/dev/ttyUSB2forexample).Ifin
doubtaboutwhichtouse,tryeachoftheminturnoruse/dev/gsmmodem(alinksetupby
usb_modeswitch)whichshouldpointtothecorrectone.Oncetheconfigurationfilesareprepared,the
internetconnectionisestablishedbyrunning
$wvdial<section>
Ifnecessaryadditionalsetupcommandscanbeplacedinasimplescriptlikethis:
https://wiki.archlinux.org/index.php/Wvdial
4/5
8/7/2015
WvdialArchWiki
usb_modeswitch
sleep2
modprobeusbserialvendor=0xVVVVproduct=0xMMMMmaxSize=4096
sleep2
wvdialthenet
whereVVVVisthehexadecimalvendorIDfromlsusb,MMMMisthehexadecimalproductIDwhenin
modemmode,and"thenet"isthenameofthesectioninwvdial.confwhichyouwishtouse.The
maxSizeoptionmayormaynotbenecessary.ItsimplifiesmattersifyoudisabletheSIMPIN,butif
yourequireit,run"wvdialmypin"before"wvdialthenet".
ThefinalwvdialcommandshouldstartpppdandtheobainedIPaddressshouldbevisibleintheterminal
output.Atthatpointtheinternetconnectionshouldbelive,whichcanbeeasilycheckedwithaweb
browserorbypinginganexternalIPaddress.
Retrievedfrom"https://wiki.archlinux.org/index.php?title=Wvdial&oldid=353392"
Category: Networking
Thispagewaslastmodifiedon26December2014,at20:46.
ContentisavailableunderGNUFreeDocumentationLicense1.3orlaterunlessotherwisenoted.
https://wiki.archlinux.org/index.php/Wvdial
5/5