Am 08.12.2010 16:57, schrieb Ray Rashif:
IMO, this is the way to go. It isn't difficult, it just needs some time and someone to do it (it's on my imaginary TODO list which is growing and growing - meaning I won't do it any time soon).
That's fine too, I was just concerned that we need something that actually works in a straightforward manner. This (netcfg method) would be even better, actually. It's just that I've never tried to dial up with anything other than wvdial, and I haven't come across much documentation that uses ppp for gsm.
For eg. I have 2 configuration files that I copied off the net; 1 for 3G modems which I didn't have to edit and the other for cellphones, which needed only the APN changed. I just issue a 'wvdial' to get connected with my Huawei E220 or ROKR E8.
I wouldn't know how one would do the equivalent with pppd alone. I've tried adapting /etc/ppp/options by looking at each line in /etc/wvdial.conf, to no avail. Thomas, could you provide an example?
This is a chat file (would be generated on-the-fly by netcfg): ABORT BUSY ABORT 'NO CARRIER' ABORT VOICE ABORT 'NO DIALTONE' ABORT 'NO DIAL TONE' ABORT 'NO ANSWER' ABORT DELAYED ABORT ERROR '' ATX OK 'ATZ' TIMEOUT 5 OK 'ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0' OK AT+CGDCONT=1,"IP","internet" OK ATH OK ATE1 OK 'ATM0L0DT *99***1#' CONNECT This is more complicated than it needs to be actually, some stuff might be omitted. "internet" is the APN here, and *99***1# is the "phone number", which is different in some cases (I think *99#). The rest never has to be changed. Now, this can be launched using: /usr/sbin/pppd /dev/ttyUSB2 persist nodetach nobsdcomp nodeflate connect "/usr/sbin/chat -s -S -v -f /path/to/chat/file/foo.chat" 460800 modem crtscts defaultroute user " " password " " noaccomp nopcomp novj novjccomp noccp noauth ipcp-accept-remote ipcp-accept-local noipdefault usepeerdns Now, most of these options are to override insane default from /etc/ppp/options (which sadly are always applied, and 'auth' is default, so you need to have 'noauth'). The only thing one would have to change here is the tty, the username and password (usually ignored on 3G) and maybe replace persist with demand. What I meant earlier: When I first tried to use wvdial, I thought I wouldn't have to write the chat file - however, the wvdial.conf just contained the same shit as my chat file, just in a less readable format. The pppd-line is actually very long, but most of the stuff is never changed. This information alone is enough to write a netcfg 3g connection, but I do not have a 3G stick anymore. I could test this with my mobile phone, which works exactly the same way (I just need to use /dev/rfcomm0 as a tty instead).