В начало → Gentoo и GPRS → GPRS через USB |
Ссылка на оригинал: http://linuxforum.ru/
Автор: Nikoli (Linuxforum.ru)
С версии: 1.3
Появилась необходимость в GPRS соединение в качестве страховочного. Телефоны подключал по USB. Потратил пару часов на настройку, но в итоге получилось довольно простое решение. Здесь для Gentoo такого руководства не выкладывали, надеюсь моё будет полезно. Если считаете необходимым, добавьте его в FAQ.
1) Ядро должно быть собрано с:
Device Drivers ---> USB support ---> <M> USB Modem (CDC ACM) support
2) Должен быть установлен ppp
3) В /etc/conf.d/net
нужно добавить:
#**********/-------Nokia with Megafon config_ppp1=( "ppp" ) link_ppp1="ttyACM0" pppd_ppp1=( "debug" # Comment this off, if you don't need more info #460800 # Serial port line speed "crtscts" # hardware flow control for cable "local" # Ignore carrier detect signal from the modem: "lcp-echo-failure 0" "lcp-echo-interval 0" # IP addresses: ":0.0.0.0" # - accept peers idea of our local address and set address peer as 10.6.6.6 # (any address would do, since IPCP gives 0.0.0.0 to it) # - if you use the 10. network at home or something and pppd rejects it, # change the address "noipdefault" # pppd must not propose any IP address to the peer! "ipcp-accept-local" # Accept peers idea of our local address "defaultroute" # Add the ppp interface as default route to the IP routing table #replacedefaultroute # New route should be our default route to Internet "usepeerdns" # User DNS returned by server "noauth" # The phone is not required to authenticate # Most phone do not support compression, so turn it off. #noipv6 #novj #nobsdcomp #novjccomp #nopcomp #noaccomp # Username and password: # If username and password are required by the APN, put here the username # and put the username-password combination to the secrets file: # /etc/ppp/pap-secrets for PAP and /etc/ppp/chap-secrets for CHAP # authentication. See pppd man pages for details. 'user "internet"' # Change this "persist" # Persistent connection "maxfail 99999" # Retry and retry and retry if failed... ) chat_ppp1=( 'TIMEOUT' '45' 'ABORT' 'BUSY' 'ABORT' 'NO CARRIER' 'ABORT' 'ERROR' '' 'ATE1' 'OK' 'AT+CGDCONT=1,"IP","internet"' 'OK' 'ATD*99***1#' 'CONNECT' 'c' ) #**********/-------Motorola with Beeline config_ppp2=( "ppp" ) link_ppp2="ttyACM0" pppd_ppp2=( "debug" # Comment this off, if you don't need more info #460800 # Serial port line speed "crtscts" # hardware flow control for cable "local" # Ignore carrier detect signal from the modem: "lcp-echo-failure 0" "lcp-echo-interval 0" # IP addresses: ":0.0.0.0" # - accept peers idea of our local address and set address peer as 10.6.6.6 # (any address would do, since IPCP gives 0.0.0.0 to it) # - if you use the 10. network at home or something and pppd rejects it, # change the address "noipdefault" # pppd must not propose any IP address to the peer! "ipcp-accept-local" # Accept peers idea of our local address "defaultroute" # Add the ppp interface as default route to the IP routing table #replacedefaultroute # New route should be our default route to Internet "usepeerdns" # User DNS returned by server "noauth" # The phone is not required to authenticate # Most phone do not support compression, so turn it off. #noipv6 #novj #nobsdcomp #novjccomp #nopcomp #noaccomp # Username and password: # If username and password are required by the APN, put here the username # and put the username-password combination to the secrets file: # /etc/ppp/pap-secrets for PAP and /etc/ppp/chap-secrets for CHAP # authentication. See pppd man pages for details. 'user "internet.beeline.ru"' # Change this "persist" # Persistent connection "maxfail 99999" # Retry and retry and retry if failed... ) chat_ppp2=( 'TIMEOUT' '45' 'ABORT' 'BUSY' 'ABORT' 'NO CARRIER' 'ABORT' 'ERROR' '' 'ATE1' 'OK' 'AT+CGDCONT=1,"IP","internet.beeline.ru"' 'OK' 'ATD*99***1#' 'CONNECT' 'c' )
4) Сделайте ссылки на net.lo
ln -s /etc/init.d/net.lo /etc/init.d/net.ppp1ln -s /etc/init.d/net.lo /etc/init.d/net.ppp2
5) Подключите телефон с помощью USB, появится /dev/ttyACM0
6) Выполните
/etc/init.d/net.ppp1 start
Возможно у вас появится соединение с интернетом.Полезно почитать вывод tail -f /var/log/messages:
Проверял на том, что было. С отключённым сжатием у меня заработало, у вас его возможно нужно выключить. Если у вас есть замечания по улучшению, буду рад.По мотивам:
http://gentoo-wiki.com/Nokia_S60_and_N_series
В начало → Gentoo и GPRS → GPRS через USB |