Wlada
Сообщений: 1233
Оценки: 0
Присоединился: 2007-09-24 12:01:26.970000
|
quote:
ORIGINAL: multiexe Если можеш скинь в личку Wlada спасибо :) Я сюда лучше ещё кому-то интересно будет Вот это я нашла в интернете сайт не помню
Настройка соединения 3G (CDMA) USB-модема в Linux
Настройка соединения 3G (CDMA) USB-модема CCU-550 для подключения к
оператору People.net (Украина).
Думаю, с напильничком подойдет не только для этого модема/провайдера :)
Использованные материалы.
Итак. 1.Версии ПО.
Mandriva linux 2007.0, kernel-2.6.17-5mdv, ppp-2.4.3-12mdv2007.0
2. Ставим ppp, создаем файлы конфигурации.
2.1 Файл /etc/ppp/peers/peoplenet:
#user name
name 80921010569@people.net.ua
#tty device (COM cable connected directly to COM1 port)
#/dev/ttyS0
#tty device (COM cable + USB to 9-pin Serial Converter)
/dev/ttyACM0
# Serial port line speed (COM cable only)
#115200
# Serial port line speed (COM cable + USB to 9-pin Serial Converter)
2500000
# Control character handling
asyncmap 20A0000
escape FF
#
# Generic options
#
defaultroute
# Comment this line out to let pppd background itself.
nodetach
# Set MTU
mtu 1400
# Use hardware flow conrtrol
crtscts
# Let the phone figure out all the IP addresses
noipdefault
ipcp-accept-local
ipcp-accept-remote
# No ppp compression
novj
novjccomp
# For sanity, keep a lock on the serial line
lock
#get DNS from the provider
usepeerdns
#
# Chat scripts
#
connect "/usr/sbin/chat -f /etc/ppp/chatscripts/people.net-connect-chat"
disconnect "/usr/sbin/chat -f /etc/ppp/chatscripts/people.net-disconnect-chat"
2.2 Файл /etc/ppp/chatscripts/people.net-connect-chat
ABORT 'BUSY'
ABORT 'NO ANSWER'
ABORT 'NO CARRIER'
ABORT 'NO DIALTONE'
ABORT '\nRINGING\r\n\r\nRINGING\r'
SAY "CCU-550 modem init: press <ctrl>-C to disconnect"
TIMEOUT 5
'' 'AT'
OK 'ATZ'
OK 'at+crm=1;&C0'
OK 'ATS0=0'
OK 'ATD#777'
CONNECT ''
SAY "\n + connected"
2.3 Файл /etc/ppp/chatscripts/people.net-disconnect-chat
ABORT BUSY
ABORT ERROR
ABORT 'NO DIALTONE'
TIMEOUT 30
'' '+++\c'
SAY " + sending break"
'' 'ATH'
SAY "\n + dropping data connection"
2.4 Файл /etc/ppp/pap-secrets
# Secrets for authentication using PAP
# client server secret IP addresses
"ВашНомерТелефона@people.net.ua" * "ВашПароль"
2.5 Установка соедининия.
По логам смотрим на какой девайс сел модем. В моем случае в
/var/log/messages было замечено следующее:
Apr 20 13:39:34 ananta-01 kernel: cdc_acm 1-2:1.0: ttyACM0: USB ACM device
/etc/ppp/peers/peoplenet:
т.е. наш модем - /dev/ttyACM0. Подставляем это в файл /etc/ppp/peers/peoplenet.
Далее командуем
[root@ananta-01 ppp]# /usr/sbin/pppd call peoplenet
CCU-550 modem init: press <ctrl>-C to disconnect
Serial connection established.
Using interface ppp0
Connect: ppp0 <--> /dev/ttyACM0
Remote message: Welcome to KHA-PDSN.
PAP authentication succeeded
local IP address 77.109.34.37
remote IP address 2.2.2.2
primary DNS address 172.25.11.8
Все, связь замечательно работает.
А модем должен определится у тебя для этого набери dmesg в консоли после подключения модема и там будет указан твой модем (обычно внизу)
|