WVdial not reading the wvdial.conf file properly on ARM target under linux

2,877 views
Skip to first unread message

rakesh

unread,
Jan 12, 2011, 4:40:48 AM1/12/11
to wvstreams-devel
hi,

I have cross compiled wvstreams and wvdial for my i.mx51 board
running on linux(LTIB).when i run the wvdial on target it is thorwing
the following errors.please some one guide me to a solution.I am using
wvstreams 4.6.1 and wvdial 1.61. and i have also applied these
patches.

1)wvstreams-4.6.1-arm_replace_getcontext.patch (this patch was applied
when i got the following error...........)


wvdial: utils/wvtask.cc:202: WvTaskMan::WvTaskMan(): Assertion
`getcontext(&get_stack_return) == 0' failed.


-------------------------------------------------------------------------------------------------------------------------------------

root@freescale /dev$
wvdial
--> WvDial: Internet dialer version
1.61
--> Warning: section [Dialer Defaults] does not exist in
wvdial.conf.
--> Cannot get information for serial
port.
--> Initializing
modem.
--> Sending:
ATZ
ATZ
OK
--> Modem
initialized.
--> Configuration does not specify a valid phone
number.
--> Configuration does not specify a valid login
name.
--> Configuration does not specify a valid password.

SamiH

unread,
Feb 2, 2011, 3:28:34 PM2/2/11
to wvstreams-devel

> --> Warning: section [Dialer Defaults] does not exist in
> wvdial.conf.
I have the exact same problem, running Gentoo in Seagate Dockstar,
Marvell ARMv5. Just used at least 2 hours to patch the wvstreams to
compile... If someone could point out where to look for the error?

Avery Pennarun

unread,
Feb 2, 2011, 4:28:30 PM2/2/11
to rakesh, wvstreams-devel
On Wed, Jan 12, 2011 at 1:40 AM, rakesh <singire...@gmail.com> wrote:
> 1)wvstreams-4.6.1-arm_replace_getcontext.patch (this patch was applied
> when i got the following error...........)
>
> wvdial: utils/wvtask.cc:202: WvTaskMan::WvTaskMan(): Assertion
> `getcontext(&get_stack_return) == 0' failed.

I think what you mean here is the above error appeared *until* the
above patch was applied, and then went away. Ok.

> root@freescale /dev$
> wvdial
> --> WvDial: Internet dialer version
> 1.61
> --> Warning: section [Dialer Defaults] does not exist in
> wvdial.conf.
> --> Cannot get information for serial
> port.
> --> Initializing
> modem.
> --> Sending:
> ATZ
> ATZ
> OK
> --> Modem
> initialized.
> --> Configuration does not specify a valid phone
> number.
> --> Configuration does not specify a valid login
> name.
> --> Configuration does not specify a valid password.

Please send the following information:

- the contents and filename of your wvdial.conf file (please replace
the password first before sending to the list)

- the output of 'strace -e open wvdial'

Thanks,

Avery

Avery Pennarun

unread,
Feb 5, 2011, 1:39:27 PM2/5/11
to wvstrea...@googlegroups.com
You wrote:

> On Wed, Feb 2, 2011 at 23:28, Avery Pennarun <apen...@gmail.com> wrote:
>> Please send the following information:
>>
>> - the contents and filename of your wvdial.conf file (please replace
>> the password first before sending to the list)
>>
>> - the output of 'strace -e open wvdial'
>
> Hi! As I have the same problem, here is my information:
>
> cat /etc/wvdial.conf
> [Dialer defaults]
> Modem = /dev/ttyACM0
> #Init1 = AT+COPS=1,0,"dna",2
> #Init2 = AT+CGDCONT=1,"IP","internet"
> Phone = *99#
> Stupid Mode = 1
> Username = " "
> Password = " "
>
> strace -e open wvdial
[...]
> open("/etc/wvdial.conf", O_RDONLY|O_NONBLOCK|O_LARGEFILE) = 4

> --> WvDial: Internet dialer version 1.61
> --> Warning: section [Dialer Defaults] does not exist in wvdial.conf.
[...]

Hmm, that does look pretty wrong, all right. Can you try the
following changes to your wvdial.conf?

- Change [Dialer defaults] to [Dialer Defaults]
- Completely remove the lines starting with #

Thanks,

Avery

SamiH

unread,
Feb 6, 2011, 8:37:49 AM2/6/11
to wvstreams-devel
> - Change [Dialer defaults] to [Dialer Defaults]
> - Completely remove the lines starting with #
>
> Thanks,
>
> Avery

cat /etc/wvdial.conf
[Dialer Defaults]
Modem = /dev/ttyACM0
Phone = *99#
Stupid Mode = 1
Username = " "
Password = " "


strace -e open wvdial
open("/etc/ld.so.cache", O_RDONLY) = 3
open("/usr/lib/libuniconf.so.4.6", O_RDONLY) = 3
open("/usr/lib/libwvstreams.so.4.6", O_RDONLY) = 3
open("/usr/lib/libwvutils.so.4.6", O_RDONLY) = 3
open("/usr/lib/libwvbase.so.4.6", O_RDONLY) = 3
open("/usr/lib/gcc/armv5tel-softfloat-linux-gnueabi/4.4.4/libstdc++.so.
6", O_RDONLY) = 3
open("/usr/lib/gcc/armv5tel-softfloat-linux-gnueabi/4.4.4/libgcc_s.so.
1", O_RDONLY) = 3
open("/lib/libc.so.6", O_RDONLY) = 3
open("/lib/libz.so.1", O_RDONLY) = 3
open("/usr/lib/libssl.so.1.0.0", O_RDONLY) = 3
open("/usr/lib/libcrypto.so.1.0.0", O_RDONLY) = 3
open("/lib/libcrypt.so.1", O_RDONLY) = 3
open("/lib/libpam.so.0", O_RDONLY) = 3
open("/lib/libm.so.6", O_RDONLY) = 3
open("/lib/libdl.so.2", O_RDONLY) = 3
open("/etc/wvdial.conf", O_RDONLY|O_NONBLOCK|O_LARGEFILE) = 4
--> WvDial: Internet dialer version 1.61
--> Warning: section [Dialer Defaults] does not exist in wvdial.conf.
open("/var/lock/LCK..modem", O_RDWR|O_CREAT|O_EXCL|O_NONBLOCK|
O_LARGEFILE, 0644) = 4
open("/dev/modem", O_RDWR|O_NOCTTY|O_NONBLOCK|O_LARGEFILE) = -1 ENOENT
(No such file or directory)
--> Cannot open /dev/modem: No such file or directory
open("/var/lock/LCK..modem", O_RDWR|O_CREAT|O_EXCL|O_NONBLOCK|
O_LARGEFILE, 0644) = 4
open("/dev/modem", O_RDWR|O_NOCTTY|O_NONBLOCK|O_LARGEFILE) = -1 ENOENT
(No such file or directory)
--> Cannot open /dev/modem: No such file or directory
open("/var/lock/LCK..modem", O_RDWR|O_CREAT|O_EXCL|O_NONBLOCK|
O_LARGEFILE, 0644) = 4
open("/dev/modem", O_RDWR|O_NOCTTY|O_NONBLOCK|O_LARGEFILE) = -1 ENOENT
(No such file or directory)
--> Cannot open /dev/modem: No such file or directory


strace wvdial
... clip ...
access("/etc/wvdial.conf", F_OK) = 0
open("/etc/wvdial.conf", O_RDONLY|O_NONBLOCK|O_LARGEFILE) = 4
fcntl64(4, F_SETFD, FD_CLOEXEC) = 0
fstat64(4, {st_mode=S_IFREG|0644, st_size=98, ...}) = 0
gettimeofday({1296824978, 905180}, NULL) = 0
select(5, [4], [], [], NULL) = 1 (in [4])
gettimeofday({1296824978, 905677}, NULL) = 0
read(4, "[Dialer Defaults]\nModem = /dev/t"..., 1024) = 98
<---- note this line
gettimeofday({1296824978, 906798}, NULL) = 0
select(5, [4], [], [], NULL) = 1 (in [4])
gettimeofday({1296824978, 907179}, NULL) = 0
read(4, "", 1024) = 0
close(4) = 0
access("/root/.wvdialrc", F_OK) = -1 ENOENT (No such file or
directory)
gettimeofday({1296824978, 909976}, NULL) = 0
write(3, "--> ", 4--> ) = 4
write(3, "WvDial: Internet dialer version "..., 36WvDial: Internet
dialer version 1.61) = 36
write(3, "\n", 1
) = 1
gettimeofday({1296824978, 910982}, NULL) = 0
write(3, "--> ", 4--> ) = 4
write(3, "Warning: section [Dialer Default"..., 65Warning: section
[Dialer Defaults] does not exist in wvdial.conf.) = 65
write(3, "\n", 1
) = 1
... clip ...


Somehow it seems that wvdial cannot read the file, or if it reads it,
it cannot understand anything.

rakesh

unread,
Feb 7, 2011, 9:22:48 AM2/7/11
to wvstreams-devel


hi guys ,

i haven't cleared the above error but found a way(completely stupid
way),but it worked for me and its working.

All that i have did is i have hard coded the details of wvdial.conf
into wvdialer.cc .

In wvdialer.cc file there is a function load_options.i have changed
this before compiling.

after compiling i got binary (am working in linux) which is working
fine but only for single service provider.



void WvDialer::load_options()
/***************************/
{
OptInfo opts[] = {
// string options:
{ "Modem", &options.modem, NULL, "/dev/
ttyACM0", 0 },
{ "Init1", &options.init1, NULL,
"ATZ", 0 },
{ "Init2", &options.init2, NULL, "ATQ0 V1 E1
S0=0 &C1 &D2 +FCLASS=0", 0 },
{ "Init3", &options.init3, NULL, "AT
+CGDCONT=1,"IP","TATA.DOCOMO.INTERNET"", 0 },
{ "Init4", &options.init4, NULL,
"", 0 },
{ "Init5", &options.init5, NULL,
"", 0 },
{ "Init6", &options.init6, NULL,
"", 0 },
{ "Init7", &options.init7, NULL,
"", 0 },
{ "Init8", &options.init8, NULL,
"", 0 },
{ "Init9", &options.init9, NULL,
"", 0 },
{ "Phone", &options.phnum, NULL,
"*99#", 0 },
{ "Phone1", &options.phnum1, NULL,
"", 0 },
{ "Phone2", &options.phnum2, NULL,
"", 0 },
{ "Phone3", &options.phnum3, NULL,
"", 0 },
{ "Phone4", &options.phnum4, NULL,
"", 0 },
{ "Dial Prefix", &options.dial_prefix, NULL,
"", 0 },
{ "Area Code", &options.areacode, NULL,
"", 0 },
{ "Dial Command", &options.dial_cmd, NULL,
"ATDT", 0 },
{ "Username", &options.login, NULL,
"", 0 },
{ "Login Prompt", &options.login_prompt, NULL,
"", 0 },
{ "Password", &options.password, NULL,
"", 0 },
{ "Password Prompt", &options.pass_prompt, NULL,
"", 0 },
{ "PPPD Path", &options.where_pppd, NULL, "/sbin/
pppd", 0 },
{ "PPPD Option", &options.pppd_option, NULL, "",
0 },
{ "Force Address", &options.force_addr, NULL,
"", 0 },
{ "Remote Name", &options.remote, NULL,
"*", 0 },
{ "Default Reply", &options.default_reply,NULL, "ppp", 0 },
{ "Country", &options.country, NULL, "",
0 },
{ "Provider", &options.provider, NULL, "",
0 },
{ "Product", &options.product, NULL, "",
0 },
{ "Homepage", &options.homepage, NULL, "",
0 },
{ "DialMessage1", &options.dialmessage1, NULL, "",
0 },
{ "DialMessage2", &options.dialmessage2, NULL, "",
0 },
{ "DNS Test1", &options.dnstest1, NULL,
"www.suse.de", 0 },
{ "DNS Test2", &options.dnstest2, NULL,
"www.suse.com", 0 },

SamiH

unread,
Feb 10, 2011, 3:16:14 PM2/10/11
to wvstreams-devel
I tried that also, but something is wrong with longjmp. I tried to
change GCC settings to allow longjmp, but things got worse. Now I
don't use wvdial at all, just pppd and chat. It is little harder to
set up, but the wvdial & wvstream aren't ARM-compatible yet...

Patrick Patterson

unread,
Feb 11, 2011, 6:08:31 PM2/11/11
to SamiH, wvstreams-devel
So, just as a quick "let's not let rumours get started" - WvDial in Debian has been working for the last around 10 years on ARM (I just checked, and even the latest, just announced version (Squeeze) has a WvDial that appears to "just work".

Consequently, I would wonder either about your distribution, or, if you are working on an embedded system, the build environment that you have set up (and/or your cross-compiler setup).

Quick question: Which version of WvStreams do you have installed in your build environment?


--
You received this message because you are subscribed to the Google Groups "wvstreams-devel" group.
To post to this group, send email to wvstrea...@googlegroups.com.
To unsubscribe from this group, send email to wvstreams-dev...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/wvstreams-devel?hl=en.




--
Personal Mail from Patrick Patterson
No company affiliation

SamiH

unread,
Feb 12, 2011, 1:44:27 AM2/12/11
to wvstreams-devel
Thanks for the info, I never thought that I could see what Debian has
made to make things work. Next time I'll check that first :)

wvstreams-4.6.1-r1
wvdial-1.61

However, now I have the Dockstation as my 3G <-> Ethernet router,
firewall and fileserver. Sorry for complaining stuff that seems to
work fine elsewhere.

Avery Pennarun

unread,
Feb 12, 2011, 5:55:18 PM2/12/11
to SamiH, wvstreams-devel

As far as I understand, the only problem people have with running
wvdial on ARM systems has been with uClibc, which is missing the
setcontext() stuff, so we have to switch wvstreams to using
setjmp()/longjmp() on embedded ARM platforms that use uClibc. (Debian
systems all use glibc, which doesn't have this problem.) People have
reported that it works on both systems, though.

All that said, I'm a little stumped about this wvdial.conf problem.
Obviously *that* isn't happening to everybody, and the
configfile-reading stuff has nothing to do with setjmp/longjmp/etc.

Have fun,

Avery

Raghav Monga

unread,
Apr 24, 2013, 12:14:15 AM4/24/13
to wvstrea...@googlegroups.com
Hi,
 
I am also facing the same problem. For me this problem comes both on ARM as well as x86.
After applying the patch: wvstreams-4.6.1-arm_replace_getcontext.patch
wvdial cannot read the wvdial.conf file.
--> WvDial: Internet dialer version1.61

--> Warning: section [Dialer Defaults] does not exist in wvdial.conf.
--> Cannot get information for serial port.
With hardcoding the commands in the code, I am able to run wvdial but it seriously hampers the flexibility.
Is there any fix available for this?

Raghav Monga

unread,
Apr 25, 2013, 2:48:06 AM4/25/13
to wvstrea...@googlegroups.com
Hi,
 
 
One of the solutions that I found is to use wvconf class (include wvconf.h in wvdialer.h, and make the necessary changes in wvdial.cc) instead of wvconfemu class for reading the conf file. It is working for me now.
Another solution is to bypass wvdial.conf and pass all the options as arguements to wvdial.
 
 
Cheers,
Raghav

On Wednesday, January 12, 2011 3:10:48 PM UTC+5:30, rakesh wrote:

Ganralph

unread,
Sep 6, 2013, 3:58:37 AM9/6/13
to wvstrea...@googlegroups.com
Hey guys,
i faced the same problem.

I pinned it down to libwvbase.so.4.6.

I had two arm boxes, one was emdebian the other buildroot based.
Wvdial in emdebian was working, wvdial of buildroot was not working (same error as above, wvdial was not reading the config file, falling back to /dev/modem).
Both are version WvDial 1.61.

So i copied everything file by file from one box the other until wvdial was working.

After copying libwvbase.so.4.6 everything was fine.

But i wasn't able to find the difference in both versions yet.



Greetings
Ganralph

Sascha Montellese

unread,
Feb 17, 2014, 4:34:33 AM2/17/14
to wvstrea...@googlegroups.com
I ran into the same problem and I figured out which part of the wvstreams-4.6.1-arm_replace_getcontext.patch patch is causing it. The last part of the patch changes uniconf/uniconfkey.cc by commenting out a call to wvassert() which consists of a call to UniConfKey::suborsame(). This call needs to happen because otherwise the "UniConfKey answer" variable is not set to the proper value and the whole UniConfKey::subkey() is basically a no-op simply returning a dummy UniConfKey object. Moving the call outside of the wvassert() call fixes the problem of not being able to read the wvdial.conf file anymore.

Nat Srisawaivilai

unread,
Sep 18, 2014, 12:42:18 AM9/18/14
to wvstrea...@googlegroups.com
Hi,

You can use [OPTION=value] to avoid hard coded.

example:
#wvdial Init1=ATZ Modem=/dev/ttyUSB0 Phone=*99***1# Username=blank Password=blank Init2='ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0' Init3='AT+CGDCONT=1,"IP","internet"'

Regards,
Nat

Amar Nath

unread,
Oct 11, 2015, 1:34:51 PM10/11/15
to wvstreams-devel
how to cross compile wvdial and wvstreams in imx6. i am getting libssl not found error
Reply all
Reply to author
Forward
0 new messages