LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Mobile
User Name
Password
Linux - Mobile This forum is for the discussion of all topics relating to Mobile Linux. This includes Android, Tizen, Sailfish OS, Replicant, Ubuntu Touch, webOS, and other similar projects and products.

Notices


Reply
  Search this Thread
Old 02-25-2021, 05:02 PM   #1
Creatorczyk
LQ Newbie
 
Registered: Feb 2021
Posts: 11

Rep: Reputation: Disabled
How to initialize a modem pppd deamon with wvdial?


I am in the proscess of writting an c++ application to menage a modem connection on my arm board. I would like to use the wvdial utility for this. Unfortunately I have a problem. When startng "wvdialconf" the modem is detected and the file "wvdial.conf" is initialized.

# sudo wvdialconf
Editing `/etc/wvdial.conf'.

Scanning your serial ports for a modem.

Modem Port Scan<*1>: S0 S1 S2 S3
ttyUSB0<*1>: ATQ0 V1 E1 -- OK
ttyUSB0<*1>: ATQ0 V1 E1 Z -- OK
ttyUSB0<*1>: ATQ0 V1 E1 S0=0 -- OK
ttyUSB0<*1>: ATQ0 V1 E1 S0=0 &C1 -- OK
ttyUSB0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 -- OK
ttyUSB0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK
ttyUSB0<*1>: Modem Identifier: ATI -- 332
ttyUSB0<*1>: Speed 4800: AT -- OK
ttyUSB0<*1>: Speed 9600: AT -- OK
ttyUSB0<*1>: Speed 19200: AT -- OK
ttyUSB0<*1>: Speed 38400: AT -- OK
ttyUSB0<*1>: Speed 57600: AT -- OK
ttyUSB0<*1>: Speed 115200: AT -- OK
ttyUSB0<*1>: Speed 230400: AT -- OK
ttyUSB0<*1>: Speed 460800: AT -- Speed 460800: AT -- Speed 460800: AT -- Max
speed is 230400; that should be safe.
ttyUSB0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK

Found a modem on /dev/ttyUSB0.
Modem configuration written to /etc/wvdial.conf.
ttyUSB0<Info>: Speed 230400; init "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0"

My "wvdial.conf" file:

[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Init3 = AT+CGDCONT=1,"IP","myapn"
Stupid Mode = 1
Modem Type = Analog Modem
ISDN = 0
New PPPD = yes
Phone = *99#
Modem = /dev/ttyUSB0
Username = " "
Password = " "
Baud = 230400

But when I try run "wvdial" or "wvdial -c" or "wvdial

# sudo wvdial
--> WvDial: Internet dialer version 1.61
--> Warning: section [Dialer Defaults] does not exist in wvdial.conf.
--> Cannot open /dev/modem: No such file or directory
--> Cannot open /dev/modem: No such file or directory
--> Cannot open /dev/modem: No such file or directory
# sudo wvdial -c
--> WvDial: Internet dialer version 1.61
--> Warning: section [Dialer Defaults] does not exist in wvdial.conf.
--> Initializing modem.
--> Sending: ATZ
--> Sending: ATQ0
--> Re-Sending: ATZ
--> Modem not responding.
# sudo wvdial /etc/wvdial.conf
--> WvDial: Internet dialer version 1.61
--> Warning: section [Dialer /etc/wvdial.conf] does not exist in wvdial.conf.
--> Cannot open /dev/modem: No such file or directory
--> Cannot open /dev/modem: No such file or directory
--> Cannot open /dev/modem: No such file or directory

Unfortunately I have no idea to. The configuration file exists but wvdial does not see it. I don't know if it matters but I don't have file "pap-secrets" and "chap-secrets" in the path "/etc/ppp/"
 
Old 02-26-2021, 04:59 AM   #2
floppy_stuttgart
Senior Member
 
Registered: Nov 2010
Location: EU mainland
Distribution: Debian like
Posts: 1,156
Blog Entries: 5

Rep: Reputation: 107Reputation: 107
haha. good stuff. I was working on few things like that in the past. see my posts (or others). But forgot mostly the topic.
However, I can share few thoughts with you
example (using pppd instead of wvdial) https://www.linuxquestions.org/quest...ta-4175463323/
https://www.linuxquestions.org/quest...hy-4175474013/
etc.
keep calm. no hurry.
(my impression: you dont call correctly your /etc/wvdial.conf )

Last edited by floppy_stuttgart; 02-26-2021 at 05:02 AM.
 
Old 02-26-2021, 01:38 PM   #3
Brains
Senior Member
 
Registered: Apr 2009
Distribution: All OS except Apple
Posts: 1,591

Rep: Reputation: 389Reputation: 389Reputation: 389Reputation: 389
Quote:
My "wvdial.conf" file:

[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Init3 = AT+CGDCONT=1,"IP","myapn"
Stupid Mode = 1
Modem Type = Analog Modem
ISDN = 0
New PPPD = yes
Phone = *99#
Modem = /dev/ttyUSB0
Username = " "
Password = " "

Baud = 230400
You need to put your ISPs information in the red fields. Have a look at this guide.
Quote:
Note: wvdialconf does not automatically fill in your login information. You need to edit /etc/wvdial.conf and specify the phone number, login name, and password of your internet account in order for wvdial to work.
 
Old 03-01-2021, 07:28 AM   #4
Creatorczyk
LQ Newbie
 
Registered: Feb 2021
Posts: 11

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by floppy_stuttgart View Post
haha. good stuff. I was working on few things like that in the past. see my posts (or others). But forgot mostly the topic.
However, I can share few thoughts with you
example (using pppd instead of wvdial) https://www.linuxquestions.org/quest...ta-4175463323/
https://www.linuxquestions.org/quest...hy-4175474013/
etc.
keep calm. no hurry.
(my impression: you dont call correctly your /etc/wvdial.conf )
When I wanted to enable wvdial with correctly loaded configuration I got:
Code:
# wvdial --config=/etc/wvdial.conf
--> WvDial: Internet dialer version 1.61
--> Warning: section [Dialer Defaults] does not exist in wvdial.conf.
--> Cannot open /dev/modem: No such file or directory
--> Cannot open /dev/modem: No such file or directory
--> Cannot open /dev/modem: No such file or directory
 
Old 03-01-2021, 07:38 AM   #5
Creatorczyk
LQ Newbie
 
Registered: Feb 2021
Posts: 11

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Brains View Post
You need to put your ISPs information in the red fields. Have a look at this guide.


This is not a missing number, password and phone number problem because wvdial stops working early and doesn't even send "init". I have the same configuration for raspberry and it works.
 
Old 03-05-2021, 03:20 AM   #6
floppy_stuttgart
Senior Member
 
Registered: Nov 2010
Location: EU mainland
Distribution: Debian like
Posts: 1,156
Blog Entries: 5

Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by Creatorczyk View Post
When I wanted to enable wvdial with correctly loaded configuration I got:
Code:
# wvdial --config=/etc/wvdial.conf
--> WvDial: Internet dialer version 1.61
--> Warning: section [Dialer Defaults] does not exist in wvdial.conf.
--> Cannot open /dev/modem: No such file or directory
--> Cannot open /dev/modem: No such file or directory
--> Cannot open /dev/modem: No such file or directory
Please revise your post (I dont understand what you want).
1. Post YOUR wvdial.conf
here is one of me
Quote:
[Dialer Defaults]
Modem = /dev/ttyHS5
Baud = 460800
PPPD Path = /usr/local/sbin/pppd
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
[Dialer Pin]
Init3 = AT+CPIN=xxxx (xxxx is the pin code)
[Dialer Fonic]
Phone = *99#
Username = foo
Password = foo
Stupid Mode = 1
Dial Command = ATDT
Init4 = AT+CGDCONT=1,"IP","pinternet.interkom.de"
2. Post how you initialized the modem and called the provider with your conf file with wvdial "wvdial -c Fonic" or other
3. post all messages after you made 2)
(or look at several successfull wvdial use anywhere else)
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with wvdial. Have wvdial not dial and wait till handshake. dragos240 Linux - Networking 2 01-14-2011 08:04 AM
[SOLVED] Adding wvdial to start menu/desktop, running wvdial without shell. Mogget Linux - Desktop 1 08-07-2009 02:08 AM
winmodem wvdial pppd died exit code 16 nakkaya Linux - Hardware 1 06-07-2003 06:59 PM
pppd/wvdial permission probs Heinz Linux - Networking 2 03-16-2003 11:37 AM
PPPD Deamon Error fritzlero Linux - Newbie 14 01-01-2001 04:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Mobile

All times are GMT -5. The time now is 07:27 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration