Aero2 na Ubuntu

Po zamówieniu karty SIM Bezpłatnego Dostępu do Internetu z aero2.pl (przelew z banku internetowego i wydrukowane potwierdzenia z strony internetowej),
po 3 tygodniach dostałem kartę SIM.

Używam modemu HUAWEI E367(napis na obudowie) z Cyfrowego Polsatu a komenda lsusb pokazuje go jako ID 12d1:1506 Huawei Technologies Co., Ltd. E398 LTE/UMTS/GSM Modem/Networkcard , musiałem zmienić w nim firmware żeby zaczął działać z aero2.

Lokalizacja nadajników w Aero2 które obsługują  transmisję danych w technologii

  • HSPA+, w paśmie 900 MHz (pasmo 8)
  • TD-LTE w paśmie 2600 MHz (pasmo 38)

 

DuckDuckGo Logo

Po włożeniu karty SIM do modemu jest kilka możliwości uzyskania połączenia:

1.systemowy „NetworkManager„. Łatwy kreator, wystarczy wybrać połączenia komórkowe, wybrać Polskę i areo2 nic więcej nie trzeba ustawiać.

2.wvdial  -program w konsoli

3.modem-manager-gui  -program do wyklikania

sudo apt-get install modem-manager-gui

za pomocą tej komendy zainstalujesz starszą wersje programu, najnowsza wersja po dodaniu repozytorium link poniżej
sposób instalacji dla innych systemów i opis programu

############

wvdial  -instalacja i konfiguracja

sudo apt-get install wvdial usb-modeswitch
sudo wvdialconf

DNS   zmień lub zostaw wolniejsze od aero2, wyjaśnienie w linku poniżej

http://rozie.blox.pl/2013/06/Debian-Huawei-E3131-od-Play-i-Aero2.html

http://dug.net.pl/tekst/197/aero2_z_modemem_huawei_e3131/

nano /etc/wvdial.conf

/etc/wvdial.conf

[Dialer aero2]
Modem = /dev/ttyUSB0
Init1 = AT+CGDCONT=1,"IP","darmowy"
Phone = *99#
Stupid mode = yes
Username = "aero"
Password = "aero"
Dial Attempts = 0
#Auto DNS = "off" #odkomentuj jeżeli używasz własnych ustawień DNS

[Dialer power]
Modem = /dev/ttyUSB0
Init1 = AT+CSQ

komendy do inicjowania połączenia w terminalu

sudo wvdial power
sudo wvdial aero2

podpowiedz od systemu jak nazywa się twój modem tty…
dmesg | grep tty
lsusb

*

$ sudo wvdial aero2
–> WvDial: Internet dialer version 1.61
–> Initializing modem.
–> Sending: AT+CGDCONT=1,”IP”,”darmowy”
AT+CGDCONT=1,”IP”,”darmowy”
OK
–> Modem initialized.
–> Sending: ATDT*99#
–> Waiting for carrier.
ATDT*99#
CONNECT 28800000
–> Carrier detected. Starting PPP immediately.
–> Starting pppd at Thu Oct 3 09:46:40 2013
–> Pid of pppd: 23685
–> Using interface ppp0
–> local IP address 93.154.196.205
–> remote IP address 10.24.64.64
–> primary DNS address 193.41.112.14
–> secondary DNS address 193.41.112.18

informacja co się dzieje w systemie
$ tail -f /var/log/syslog

Oct 3 09:46:30 sylwia-Think kernel: [37484.265166] scsi 18:0:0:0: CD-ROM HUAWEI Mass Storage 2.31 PQ: 0 ANSI: 2

Oct 3 09:46:30 sylwia-Think kernel: [37484.267121] scsi 19:0:0:0: Direct-Access HUAWEI TF CARD Storage PQ: 0 ANSI: 2

Oct 3 09:46:30 sylwia-Think usb_modeswitch[23600]: usb_modeswitch: switched to 12d1:1506 on 1/11

Oct 3 09:46:30 sylwia-Think kernel: [37484.269382] sr1: scsi-1 drive

Oct 3 09:46:30 sylwia-Think kernel: [37484.270235] sr 18:0:0:0: Attached scsi CD-ROM sr1

Oct 3 09:46:30 sylwia-Think kernel: [37484.270348] sr 18:0:0:0: Attached scsi generic sg2 type 5

Oct 3 09:46:30 sylwia-Think kernel: [37484.271758] sd 19:0:0:0: Attached scsi generic sg3 type 0

Oct 3 09:46:30 sylwia-Think kernel: [37484.275753] sd 19:0:0:0: [sdb] Attached SCSI removable disk

Oct 3 09:46:40 sylwia-Think pppd[23685]: pppd 2.4.5 started by root, uid 0

Oct 3 09:46:40 sylwia-Think pppd[23685]: Using interface ppp0

Oct 3 09:46:40 sylwia-Think pppd[23685]: Connect: ppp0 <–> /dev/ttyUSB0

Oct 3 09:46:40 sylwia-Think NetworkManager[1093]: SCPlugin-Ifupdown: devices added (path: /sys/devices/virtual/net/ppp0, iface: ppp0)

Oct 3 09:46:40 sylwia-Think NetworkManager[1093]: SCPlugin-Ifupdown: device added (path: /sys/devices/virtual/net/ppp0, iface: ppp0): no ifupdown configuration found.

Oct 3 09:46:40 sylwia-Think pppd[23685]: CHAP authentication succeeded

Oct 3 09:46:40 sylwia-Think pppd[23685]: CHAP authentication succeeded

Oct 3 09:46:45 sylwia-Think pppd[23685]: Could not determine remote IP address: defaulting to 10.64.64.64

Oct 3 09:46:45 sylwia-Think pppd[23685]: local IP address 93.154.196.205

Oct 3 09:46:45 sylwia-Think pppd[23685]: remote IP address 10.24.64.64

Oct 3 09:46:45 sylwia-Think pppd[23685]: primary DNS address 193.41.112.14

Oct 3 09:46:45 sylwia-Think pppd[23685]: secondary DNS address 193.41.112.18

pingi na karcie z areo
$ ping wp.pl
PING wp.pl (212.77.100.101) 56(84) bytes of data.
64 bytes from http://www.wp.pl (212.77.100.101): icmp_req=1 ttl=248 time=59.4 ms
64 bytes from http://www.wp.pl (212.77.100.101): icmp_req=2 ttl=248 time=48.0 ms
64 bytes from http://www.wp.pl (212.77.100.101): icmp_req=3 ttl=248 time=47.2 ms
64 bytes from http://www.wp.pl (212.77.100.101): icmp_req=4 ttl=248 time=76.0 ms
64 bytes from http://www.wp.pl (212.77.100.101): icmp_req=5 ttl=248 time=54.3 ms
64 bytes from http://www.wp.pl (212.77.100.101): icmp_req=6 ttl=248 time=73.4 ms
64 bytes from http://www.wp.pl (212.77.100.101): icmp_req=7 ttl=248 time=52.5 ms
64 bytes from http://www.wp.pl (212.77.100.101): icmp_req=8 ttl=248 time=50.8 ms
64 bytes from http://www.wp.pl (212.77.100.101): icmp_req=9 ttl=248 time=49.6 ms

/etc/rc.local
skrypt który automatycznie włącza modem podczas startu systemu, daj mu kilka minut na połączenie

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
#podswietlenie matrycy
#chown sylwia /sys/class/backlight/intel_backlight/brightness
#echo 924 > /sys/class/backlight/intel_backlight/brightness 
#areo
echo -n "Running 3G modem... "
if [ -c /dev/ttyUSB0 ] && ! ping -c1 -w1 208.67.222.222 >/dev/null 2>&1; then
    echo "Yes (this may take few seconds)"
    (
        pon.wvdial aero2
        date "+%H:%M" >/tmp/aero2_kiedy.txt
        ## OpenDNS user? Uncomment below lines
        # echo "nameserver 208.67.222.222"  >/etc/resolv.conf
        # echo "nameserver 208.67.220.220" >>/etc/resolv.conf
    ) &
else
    echo "No (modem not plugged in, or network already available)"
fi
exit 0

$$$$$$$$$$$$$$$

https://wiki.archlinux.org/index.php/USB_3G_Modem#wvdial

http://aero2forum.pl/temat-skrypt-do-automatycznego-polaczenia-z-siecia-mobilnego-internetu-np-aero2-linux

%%%%5%5%%%%

Play

zainstaluj te same pakiety co podałem wyzej czyli  wvdial usb-modeswitch i wklej do /etc/wvdial.conf

[Dialer play]
Modem = /dev/ttyUSB0
Baud = 57600
Init1 = ATH
Init2 = ATE1
Init3 = AT+CGDCONT=1,"IP","internet"
Dial Command = ATD
Phone = *99#
Stupid mode = yes
Username = "blank"
Password = "blank"
#Auto DNS = no
#ta opcja jest zakomentowana chyba ze wiesz co to sa DNSy

Polecenie w terminalu:

sudo wvdial play

Orange

zainstaluj te same pakiety co podałem wyżej czyli  wvdial usb-modeswitch i wklej do /etc/wvdial.conf. Możliwe ze zamiast ttyACM0 trzeba wpisać ttyUSB0 lub ttyUSB1 w zależności jak twoj komputer wykryje modem mozna to odczytać np. za pomocą polecenia:   dmesg | grep tty

[Dialer orange]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Modem Type = USB Modem
ISDN = 0
Phone = *99***1#
Modem = /dev/ttyACM0
Username = internet
Password = internet
Baud = 460800

[Dialer orange-pin]
Init1 = ATZ
Init2 = AT+CPIN=7043
Modem = /dev/ttyACM0

sudo wvdial orange

http://www.debian.pl/threads/20756-3g-modem-Orange

Cyfrowy Polsat

[Dialer polsat]
Modem = /dev/ttyUSB3
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2
Init3 = AT+CGDCONT=1,"IP","internet.cp"
Init4 = AT&C1
Carrier Check = no
Modem Type = Analog Modem
Phone = *99***1#
Dial Command = ATDTW
ISDN = 0
Auto DNS = 1
apn = internet.cp
Username =;
Password =;
Init1 = ATZ
Baud = 999999
Stupid mode = Yes

sudo wvdial polsat

[Dialer plus]
Init1 = ATZ
Modem = /dev/ttyUSB0
Password = plusgsm
Username = plusgsm
Phone = *99#
Modem Type = Analog Modem
SetVolume = 0
Baud = 57600
Dial Command = ATDT
ISDN = 0
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Stupid Mode = 1
Carrier Check = no
FlowControl = NOFLOW

sudo wvdial plus

[Dialer hsdpa]
Init2 = ATZ
Init3 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Init5 = AT+CGDCONT=1,"IP", "www.plusgsm.pl"
ISDN = 0
Modem = /dev/ttyUSB0
Modem Type = Analog Modem
Baud = 460800
Auto Reconnect = 1
Dial Attempts = 3

sudo wvdial hsdpa

@@@

man wvdial

Znaczenie poszczególnych opcji

man wvdial.conf

Modem The location of the device that wvdial should use as your modem. The default is /dev/modem

Baud The speed at which wvdial will communicate with your modem. The default is 57600 baud.

Init1 … Init9
wvdial can use up to nine initialization strings to set up your modem. Before dialing, these strings are sent to the modem in numerical order. These are particularly useful when specifying multiple sections. See above for an example that uses Init3 to turn the modem’s speaker off. The default is „ATZ” for Init1.

Phone The phone number you want wvdial to dial. You can add up to 4 other phone numbers that wvdial will dial in order, by adding:

Phone1

Phone2

Phone3

Phone4

Dial Prefix
wvdial will insert this string after the dial command and before the phone number. For example, to disable call waiting (in North America, anyway) set this to „*70,”.

Dial Command
wvdial will use this string to tell the modem to dial. The default is „ATDT”.

Login You must set this to the username you use at your ISP.

Login Prompt
If your ISP has an unusual login procedure that wvdial is unable to figure out, you can use this option to specify a login prompt. When this prompt is received from your ISP, wvdial will send the Login string.

Password
You must set this to the password you use at your ISP.

Ask Password
By setting this option wvdial will prompt for your password on every dialin. Thus you don’t have to save your password in /etc/wvdial.conf. (Option added by SuSE.)
Password Prompt
If your ISP has an unusual login procedure that wvdial is unable to figure out, you can use this option to specify a password prompt. When this prompt is received from you ISP, wvdial will send the Password string.

PPPD Path
If your system has pppd somewhere other than /usr/sbin/pppd, you will need to set this option.

Auto DNS
Try to get the Domain Nameserver (DNS) from the provider. This option is „on” by default. (Option added by SuSE.)

Check DNS
Check the Domain Nameserver (DNS) after the connection has been set up. This option is „on” by default (Option added by SuSE.)

DNS Test1
First DNS lookup for DNS check. (Option added by SuSE.)

DNS Test2
Second DNS lookup for DNS check. (Option added by SuSE.)

Check Def Route

Check the default route after the connection has been set up. This option is „on” by default. (Option added by SuSE.)

Force Address
This option only applies if you have a static IP address at your ISP, and even then you probably don’t need it. Some ISP’s don’t send the IP address as part of the PPP negotiation. This option forces pppd to use the address you give it.

Remote Name
If your ISP uses PAP or CHAP authentication, you might need to change this to your ISP’s authentication name. In most cases, however, it’s safe to use the default value, „*”.

Carrier Check
wvdial checks your modem during the connection process to ensure that it is actually online. If you have a weird modem that insists its carrier line is always down, you can disable the carrier check by setting this option to „no”.
Stupid Mode When wvdial is in Stupid Mode, it does not attempt to interpret any prompts from the terminal server. It starts pppd immediately after the modem connects. Apparently there are ISP’s that actually give you a login prompt, but work only if you start PPP, rather than logging in. Go figure. Stupid Mode is (natu‐
rally) disabled by default.

New PPPD
You need this option if you have pppd version 2.3.0 or newer, to make wvdial create the file /etc/ppp/peers/wvdial. This option is enabled by default, thus if you have older pppd you need to set it to `no’ (or upgrade pppd).

Default Reply
When wvdial detects a prompt, and it hasn’t seen any clues that indicate what it should send as a response to the prompt, it defaults to sending „ppp”. Sometimes this is inadequate. Use this option to override wvdial’s default prompt response.

Auto Reconnect
If enabled, wvdial will attempt to automatically reestablish a connection if you are randomly disconnected by the other side. This option is „on” by default.

Idle Seconds
Set the hangup timeout in seconds. If there is inactivity for the given time the connection is shut down. A hangup timeout of 0 disables this feature.

Abort on Busy
If enabled, wvdial will not retry the connection if the modem says that the line is busy. This option is „off” by default.

Abort on No Dialtone
If enabled, wvdial will not retry the connection if the modem says that there is no dialtone. This option is „on” by default.

Dial Attempts
If value is set, wvdial will quit after that many tries .If set to 0, wvdial will happily keep dialling forever.

Dial Timeout
The maximum time in seconds that wvdial will wait for a connection to be made. Default value is 60 seconds.

@@@

Hasła i loginy do mobilnego internetu

http://wiki.bez-kabli.pl/index.php?title=APN

http://www.linux-usb.org/usb.ids

@@

http://askubuntu.com/questions/380650/in-ubuntu-is-there-an-application-like-huawei-mobile-partner-for-broadband-co

Gobi Broadband Modems

enable WWAN/Bluetooth on Linux EFI

http://www.thinkwiki.org/wiki/Wireless_WAN_Adapters

http://sourceforge.net/apps/mediawiki/mbm/index.php?title=MBM#Linux_kernel_modules

@

Proszę w komentarzach o twoje konfiguracje wvidial-a, jeżeli na moich przykładach nie zadziałał lub operator zmienił ustawienia.

One response to “Aero2 na Ubuntu

  1. Mała uwaga nt. zmiany serwerów DNS przy korzystaniu z łącza Aero2 – od kwietnia jest przekierowanie na stronę z CAPTCHA, a do poprawnego przekierowania wymagane są DNSy od Aero2. Da się obejść (szczegóły w aktualizacji mojego wpisu), ale domyślnie zmiana może powodować utrudnienia.

Skomentuj

Wprowadź swoje dane lub kliknij jedną z tych ikon, aby się zalogować:

Logo WordPress.com

Komentujesz korzystając z konta WordPress.com. Log Out / Zmień )

Zdjęcie z Twittera

Komentujesz korzystając z konta Twitter. Log Out / Zmień )

Facebook photo

Komentujesz korzystając z konta Facebook. Log Out / Zmień )

Google+ photo

Komentujesz korzystając z konta Google+. Log Out / Zmień )

Connecting to %s