modems (II): Connection to Internet

T he other day, and once set up the modem, leave pending an Internet connection. While this does not seem to have the greatest difficulty seeing in the Network Settings applet is a modem connection entry in the Connections tab. But, it seems, that there are some problems with this applet. In my case, I could not connect properly, giving me a "Connect script failed" in /etc/log/syslog . Interestingly manual with the command pon , from the console, managed to connect properly. "Investigate the error? Better not, is something temporary that I imagine will be fixed in a future release. But better to take some notes on the configuration, whether to play scripts manually at some point.

[Ubuntu Network Configuration]

Actually the configuration is done correctly from the network configuration applet. It would be the easiest way to do it.

Click on the applet with the left mouse button and select the only option offered to us on the shortcut menu manual configuration, or access it via the menu System => Administration => Network

Modem Connection and select Properties.

And we set up the three sheets of properties that are shown with our data:

[Ubuntu Network Configuration-0][Ubuntu network configuration-1][Ubuntu Network Configuration-2]

This generates the corresponding scripts:

File
/etc/ppp/peers/ ppp0 /etc/chatscripts/ pp0
Content
debug
connect "/usr/sbin/chat -v -f /etc/chatscripts/

connect "/usr/sbin/chat -v -f /etc/chatscripts/
ppp0 "

usepeerdns
defaultroute
/dev/ttyS0
115200
user

115200
user
"usuario@isp"

TIMEOUT 60
ABORT ERROR
ABORT BUSY
ABORT VOICE
ABORT "NO CARRIER"
ABORT "NO DIALTONE"
ABORT "NO DIAL TONE"
ABORT "NO ANSWER"
"" "ATZ"
"" "AT&FH0L3"
OK-AT-OK "ATD
TIMEOUT 60
ABORT ERROR
ABORT BUSY
ABORT VOICE
ABORT "NO CARRIER"
ABORT "NO DIALTONE"
ABORT "NO DIAL TONE"
ABORT "NO ANSWER"
"" "ATZ"
"" "AT&FH0L3"
OK-AT-OK "ATD
T 555555555 "
TIMEOUT 75
CONNECT
"
TIMEOUT 75
CONNECT
  • The option debug is added manually to the debug output in /var/log/syslog is more profuse.
  • The serial port of the modem in this case is /dev/ttyS0 , the first serial port. If you use an internal modem will likely be /dev/modem . If you use a USB to Serial adapter will be /dev/ttyUSB0
  • Check the Set the modem as default route ..., equivalent to adding defaultroute to the script.
  • Mark the Use the name servers of the provider ..., equivalent to adding usepeerdns the script.
  • Although I have not checked, if you indicate Retry if the connection is cut ... would be to add the option to persist the script.
  • 115200 is the speed of connection to the modem. Usually this is the maximum supported. If we have communication problems can reduce it to 57600 or 38 400 for example.

Also amending password files /etc/ppp/chap-secrets and /etc/ppp/pap-secrets , added to both the line:

"usuario@isp" * "contraseña"

The reason for adding it to the two password files is that each corresponds to an authentication method: PAP, or the safest, CHAP . The use of one or the other depends on the method supported by our ISP.

Now we can use the command onomatopoeic pon ppp0 to connect and poff ppp0 to disconnect from the terminal.

Take care of previously disable other network interfaces to avoid that is not the route to the Internet.

Diagnosis and problems

Load the file /var/log/syslog in the System Event Viewer found in System => Administration. Scroll to the bottom of the file and you will see real-time connection and disconnection events that appear under the headings chat commands, modem and pppd, the remote network connection.

Type marking

In addition to the impossibility of using Network Manager to connect, in version 7.04 and in my case, there is a problem also to select the mode dial; Tones ( ATD T ) or pulses ( ATD P ), sometimes can not be changed to tones, persisting the "P" of pulses, although the option is selected in the combobox. In principle, this poses no problem, except that the marking will be slower.

Modem initialization

In the file /etc/chatscripts/pp0 see that the modem is initialized to the factory settings (AT & F) every time you lift the interface. This, though, is an option "safe" to avoid configuration problems, we can have erased the memory of modem you have saved profiles, phone numbers, or anything else stored on it. This initialization string could be eliminated leaving only ATZ and ATH0L3 (ATL3 corresponds to "high" level of the modem speaker, if we have indicated so), initialization less "aggressive."
You can find out more about it here .

Firewall

Beware of the Firewall. As he said to the 3G connection

Script Options

For other options that add to the scripts you can consult the man pages. Making man chat or man pppd from a terminal.