FREEBSD + MPD5 + ZTE MF192+ проблемы с конектом

Настройка сетевых служб, маршрутизации, фаерволлов. Проблемы с сетевым оборудованием.
Правила форума
Убедительная просьба юзать теги [code] при оформлении листингов.
Сообщения не оформленные должным образом имеют все шансы быть незамеченными.
r3b
проходил мимо
Сообщения: 3
Зарегистрирован: 2012-08-28 11:52:40

FREEBSD + MPD5 + ZTE MF192+ проблемы с конектом

Непрочитанное сообщение r3b » 2012-08-28 12:10:51

Здравствуйте.
Не могу поднять ppp соединение с помощью mpd5 для 3g modem'a ZTE 192+ от МТС. Листинг конфигов и логов ниже.
Уважаемые форумчане помогите пожалуйста. Заранее спасибо.

/usr/locat/etc/mpd5/mpd5.conf

Код: Выделить всё

startup:
        # configure mpd users
        set user admin xxx admin
        # configure the console
        set console self 127.0.0.1 5005
        set console open
        set web self 0.0.0.0 5006
        set web open 5006

default:
        load mts

mts:
 log ipcp ipcp2 chat2
 create bundle static B3
 set ipcp ranges 0.0.0.0/0 0.0.0.0/0
 create link static L3 modem
 set modem device /dev/cuaU0
 set modem speed 921600
 set modem script dial-mts
 set modem watch -cd
 set link action bundle B3
 set link max-redial 0
 set link keep-alive 10 60
 set auth authname "mts"
 set auth password "mts"
 open
/usr/locat/etc/mpd5/mpd5.script

Код: Выделить всё

dial-mts:
 set $ConnectionSpeed ""
 if $ConnectTimeout == "" set $ConnectTimeout 45

 print "AT+CGDCONT=1,\"ip\",\"internet.mts.ru\",,0,0\r\n"
 match "ERR" InitERR
 match "OK" InitOK
 wait 10
 log "Timeout setting for the APNs."
 failure
InitERR:
 log "APN could not be set."
 failure

InitOK:
 print "ATD*99#"
 match "NO CARRIER" DialAbortNoCar
 match "NO DIAL" DialAbortNoDial
 match "BUSY" DialAbortBusy
 regex "CONNECT *([0-9]*).*$" DialConnect
 match "ERR" DialErrorInit
 wait $ConnectTimeout
 log "No response from the modem after dialing."
 failure
DialAbortNoCar:
 log "The remote modem did not answer."
 failure
DialAbortNoDial:
 if $noDialToneSubr != "" goto $noDialToneSubr
 log "No dialtone. Is the modem plugged in?"
 failure
DialError:
 if ${ModTelephone} != "" goto DialErrorInit
 log "Invalid empty telephone number."
 failure
DialErrorInit:
 if $dialErrorSubr != "" goto $dialErrorSubr
 log "Invalid dial init string."
 failure
DialAbortBusy:
 log "The line was busy."
 failure
DialConnect:
 set $ConnectionSpeed $matchedString1
 set $dialResult "OK"
 success
ls -l /dev/| grep cu

Код: Выделить всё

crw-rw----  1 uucp  dialer      0, 103 Aug 28 16:01 cuaU0
crw-rw----  1 uucp  dialer      0, 104 Aug 28 15:42 cuaU0.init
crw-rw----  1 uucp  dialer      0, 105 Aug 28 15:42 cuaU0.lock
crw-rw----  1 uucp  dialer      0,  41 Aug 28 12:53 cuau0
crw-rw----  1 uucp  dialer      0,  42 Aug 28 12:53 cuau0.init
crw-rw----  1 uucp  dialer      0,  43 Aug 28 12:53 cuau0.lock
/var/log/mpd5.log

Код: Выделить всё

Aug 28 16:06:08 example mpd: Multi-link PPP daemon for FreeBSD
Aug 28 16:06:08 example mpd:
Aug 28 16:06:08 example mpd: process 55437 started, version 5.6 (root@ 10:21 24-Aug-2012)
Aug 28 16:06:08 example mpd: CONSOLE: listening on 127.0.0.1 5005
Aug 28 16:06:08 example mpd: web: listening on 0.0.0.0 5006
Aug 28 16:06:08 example mpd: [B3] Bundle: Interface ng0 created
Aug 28 16:06:08 example mpd: [L3] Link: OPEN event
Aug 28 16:06:08 example mpd: [L3] LCP: Open event
Aug 28 16:06:08 example mpd: [L3] LCP: state change Initial --> Starting
Aug 28 16:06:08 example mpd: [L3] LCP: LayerStart
Aug 28 16:06:08 example mpd: [L3] CHAT: running script at label "dial-mts"
Aug 28 16:06:08 example mpd: [L3] CHAT: line 2: set $ConnectionSpeed ""
Aug 28 16:06:08 example mpd: [L3] CHAT: line 3: if $ConnectTimeout == "" set $ConnectTimeout 45
Aug 28 16:06:08 example mpd: [L3] CHAT: line 3: set $ConnectTimeout 45
Aug 28 16:06:08 example mpd: [L3] CHAT: line 5: print AT+CGDCONT=1,"ip","internet.mts.ru",,0,0
Aug 28 16:06:08 example mpd: [L3] CHAT: sending
Aug 28 16:06:08 example mpd: [L3] CHAT:  41 54 2b 43 47 44 43 4f 4e 54 3d 31 2c 22 69 70  AT+CGDCONT=1,"ip
Aug 28 16:06:08 example mpd: [L3] CHAT:  22 2c 22 69 6e 74 65 72 6e 65 74 2e 6d 74 73 2e  ","internet.mts.
Aug 28 16:06:08 example mpd: [L3] CHAT:  72 75 22 2c 2c 30 2c 30                          ru",,0,0
Aug 28 16:06:08 example mpd: [L3] CHAT: line 6: match ERR InitERR
Aug 28 16:06:08 example mpd: [L3] CHAT: line 7: match OK InitOK
Aug 28 16:06:08 example mpd: [L3] CHAT: line 8: wait 10
Aug 28 16:06:18 example mpd: [L3] CHAT: timer in set "" expired
Aug 28 16:06:18 example mpd: [L3] CHAT: line 9: log "Timeout setting for the APNs."
Aug 28 16:06:18 example mpd: [L3] CHAT: Timeout setting for the APNs.
Aug 28 16:06:18 example mpd: [L3] CHAT: line 10: failure
Aug 28 16:06:18 example mpd: [L3] MODEM: chat script failed
Aug 28 16:06:18 example mpd: [L3] Link: DOWN event
Aug 28 16:06:18 example mpd: [L3] LCP: Down event
Aug 28 16:06:18 example mpd: [L3] Link: reconnection attempt 1 in 4 seconds
Aug 28 16:06:22 example mpd: [L3] Link: reconnection attempt 1
Aug 28 16:06:22 example mpd: [L3] CHAT: running script at label "dial-mts"
Aug 28 16:06:22 example mpd: [L3] CHAT: line 2: set $ConnectionSpeed ""
Aug 28 16:06:22 example mpd: [L3] CHAT: line 3: if $ConnectTimeout == "" set $ConnectTimeout 45
Aug 28 16:06:22 example mpd: [L3] CHAT: line 5: print AT+CGDCONT=1,"ip","internet.mts.ru",,0,0
Aug 28 16:06:22 example mpd: [L3] CHAT: sending
Aug 28 16:06:22 example mpd: [L3] CHAT:  41 54 2b 43 47 44 43 4f 4e 54 3d 31 2c 22 69 70  AT+CGDCONT=1,"ip
Aug 28 16:06:22 example mpd: [L3] CHAT:  22 2c 22 69 6e 74 65 72 6e 65 74 2e 6d 74 73 2e  ","internet.mts.
Aug 28 16:06:22 example mpd: [L3] CHAT:  72 75 22 2c 2c 30 2c 30                          ru",,0,0
Aug 28 16:06:22 example mpd: [L3] CHAT: line 6: match ERR InitERR
Aug 28 16:06:22 example mpd: [L3] CHAT: line 7: match OK InitOK
Aug 28 16:06:22 example mpd: [L3] CHAT: line 8: wait 10
Aug 28 16:06:32 example mpd: [L3] CHAT: timer in set "" expired
Aug 28 16:06:32 example mpd: [L3] CHAT: line 9: log "Timeout setting for the APNs."
Aug 28 16:06:32 example mpd: [L3] CHAT: Timeout setting for the APNs.
Aug 28 16:06:32 example mpd: [L3] CHAT: line 10: failure
Aug 28 16:06:32 example mpd: [L3] MODEM: chat script failed
Aug 28 16:06:32 example mpd: [L3] Link: DOWN event
Aug 28 16:06:32 example mpd: [L3] LCP: Down event
Aug 28 16:06:32 example mpd: [L3] Link: reconnection attempt 2 in 2 seconds
Aug 28 16:06:34 example mpd: [L3] Link: reconnection attempt 2
мониторинг порта с ат командами

Код: Выделить всё

AT+CGDCONT=1,"IP","internet.mts.ru",,0,0
OK
AT+CSQ
+CSQ: 21,0
OK
AT%NWSTATE
%NWSTATE: 4,25001,3G-HSDPA-HSUPA,HSDPA-HSUPA,0
OK
AT+COPS?
+COPS: 0,0,"MTS RUS",2
OK
AT+CIMI
250013602513853
OK
AT+CREG?
+CREG: 0,1
OK
AT+CSQ
+CSQ: 23,0
OK
AT%NWSTATE
%NWSTATE: 4,25001,3G-HSDPA-HSUPA,R99,0
OK
AT+COPS?
+COPS: 0,0,"MTS RUS",2
OK
AT+CIMI
250013602513853
OK
AT+CREG?
+CREG: 0,1
OK
AT+CSQ
+CSQ: 23,0
OK
AT%NWSTATE
%NWSTATE: 4,25001,3G-HSDPA-HSUPA,HSDPA-HSUPA,0
OK
AT+COPS?
+COPS: 0,0,"MTS RUS",2
OK
AT+CIMI
250013602513853
OK
AT+CREG?
+CREG: 0,1
OK
AT+CSQ
+CSQ: 21,0
OK
AT%NWSTATE
%NWSTATE: 4,25001,3G-HSDPA-HSUPA,HSDPA-HSUPA,0
OK
AT+COPS?
+COPS: 0,0,"MTS RUS",2
OK
AT+CIMI
250013602513853
OK
AT+CREG?
+CREG: 0,1
OK

Хостинговая компания Host-Food.ru
Хостинг HostFood.ru
 

Услуги хостинговой компании Host-Food.ru

Хостинг HostFood.ru

Тарифы на хостинг в России, от 12 рублей: https://www.host-food.ru/tariffs/hosting/
Тарифы на виртуальные сервера (VPS/VDS/KVM) в РФ, от 189 руб.: https://www.host-food.ru/tariffs/virtualny-server-vps/
Выделенные сервера, Россия, Москва, от 2000 рублей (HP Proliant G5, Intel Xeon E5430 (2.66GHz, Quad-Core, 12Mb), 8Gb RAM, 2x300Gb SAS HDD, P400i, 512Mb, BBU):
https://www.host-food.ru/tariffs/vydelennyi-server-ds/
Недорогие домены в популярных зонах: https://www.host-food.ru/domains/


Аватара пользователя
k0ma
сержант
Сообщения: 217
Зарегистрирован: 2010-12-07 8:13:09
Откуда: Глубоко в Сибири

FREEBSD + MPD5 + ZTE MF192+ проблемы с конектом

Непрочитанное сообщение k0ma » 2015-11-10 10:06:03

Похожая ситуация,брал конфиг отсюда http://www.sisadminov.net/shop/view/article/41.
Не помогло

Код: Выделить всё

mts_3g:
        set $ConnectionSpeed ""
        if $ConnectionTimeout == "" set $ConnectTimeout 45
        print "AT+CGDCONT=1,\"ip\",\""
        print $APN
        print "\"\r\n"
        match "ERR" InitERR
        match "OK" InitOK
        wait 10
        log "Timeout setting for the APNs."
        failure
InitERR:
        log "APN could not be set."
        failure
InitOK:
        print "ATD"
        print $PHN
        print "\"\r\n"
        match "NO CARRIER" DialAbortNoCar
        match "No DIAL" DialAbortNoDial
        match "BUSY" DialAbortBusy
        regex "CONNECT *([0-9]*).*$" DialConnect
        match "ERR" DialErrorInit
        wait $ConnectTimeout
        log "No response from the modem after dialing"
        failure
DialAbortNoCar:
        log "The remote modem did not answer"
        failure
DialAbortNoDial:
        if $noDialToneSubr !="" goto $noDialToneSubr
        log "no dialtone. is the modem pluggen in?"
        failure
DialError
        if ${ModTelephone} !="" goto DialErrorInit
        log "Invalid empty telephone number"
        failure
DialErrorInit:
        if $dialErrorSubr != "" goto $dialErrorSubr
        log "Invalid dial init string."
        failure
DialAbortBusy:
        log "The line was busy"
        failure
DialConnect:
        set $ConnectionSpeed $matchedString1
        set $dialResult "OK"
        success
Ошабка

Код: Выделить всё

Nov 10 21:41:51 router mpd: [L2] CHAT: line 3: set $ConnectTimeout 45
Nov 10 21:41:51 router mpd: [L2] CHAT: line 4: print AT+CGDCONT=1,"ip","
Nov 10 21:41:51 router mpd: [L2] CHAT: sending
Nov 10 21:41:51 router mpd: [L2] CHAT:  41 54 2b 43 47 44 43 4f 4e 54 3d 31 2c 22 69 70  AT+CGDCONT=1,"ip
Nov 10 21:41:51 router mpd: [L2] CHAT:  22 2c 22                                         ","             
Nov 10 21:41:51 router mpd: [L2] CHAT: line 5: print $APN
Nov 10 21:41:51 router mpd: [L2] CHAT: sending
Nov 10 21:41:51 router mpd: [L2] CHAT:  69 6e 74 65 72 6e 65 74 2e 6d 74 73 2e 72 75     internet.mts.ru 
Nov 10 21:41:51 router mpd: [L2] CHAT: line 6: print ""^M "
Nov 10 21:41:51 router mpd: [L2] CHAT: sending
Nov 10 21:41:51 router mpd: [L2] CHAT:  22 0d 0a                                         "..             
Nov 10 21:41:51 router mpd: [L2] CHAT: line 7: match ERR InitERR
Nov 10 21:41:51 router mpd: [L2] CHAT: line 8: match OK InitOK
Nov 10 21:41:51 router mpd: [L2] CHAT: line 9: wait 10
Nov 10 21:41:51 router mpd: [L2] CHAT: read
Nov 10 21:41:51 router mpd: [L2] CHAT:  0d                                               .               
Nov 10 21:41:51 router mpd: [L2] CHAT: read
Nov 10 21:41:51 router mpd: [L2] CHAT:  0a 4f 4b                                         .OK             
Nov 10 21:41:51 router mpd: [L2] CHAT: matched set "", goto label "InitOK"
Nov 10 21:41:51 router mpd: [L2] CHAT: line 16: print ATD
Nov 10 21:41:51 router mpd: [L2] CHAT: sending
Nov 10 21:41:51 router mpd: [L2] CHAT:  41 54 44                                         ATD             
Nov 10 21:41:51 router mpd: [L2] CHAT: line 17: print $PHN
Nov 10 21:41:51 router mpd: [L2] CHAT: sending
Nov 10 21:41:51 router mpd: [L2] CHAT:  2a 39 39 23                                      *99#            
Nov 10 21:41:51 router mpd: [L2] CHAT: line 18: print ""^M "
Nov 10 21:41:51 router mpd: [L2] CHAT: sending
Nov 10 21:41:51 router mpd: [L2] CHAT:  22 0d 0a                                         "..             
Nov 10 21:41:51 router mpd: [L2] CHAT: line 19: match "NO CARRIER" DialAbortNoCar
Nov 10 21:41:51 router mpd: [L2] CHAT: line 20: match "No DIAL" DialAbortNoDial
Nov 10 21:41:51 router mpd: [L2] CHAT: line 21: match BUSY DialAbortBusy
Nov 10 21:41:51 router mpd: [L2] CHAT: line 22: regex "CONNECT *([0-9]*).*$" DialConnect
Nov 10 21:41:51 router mpd: [L2] CHAT: line 23: match ERR DialErrorInit
Nov 10 21:41:51 router mpd: [L2] CHAT: line 24: wait $ConnectTimeout
Nov 10 21:41:51 router mpd: [L2] CHAT: read
Nov 10 21:41:51 router mpd: [L2] CHAT:  0d                                               .               
Nov 10 21:41:51 router mpd: [L2] CHAT: read
Nov 10 21:41:51 router mpd: [L2] CHAT:  0a 0d                                            ..              
Nov 10 21:41:51 router mpd: [L2] CHAT: read
Nov 10 21:41:51 router mpd: [L2] CHAT:  0a 2b 43 4d 45 20 45 52 52                       .+CME ERR       
Nov 10 21:41:51 router mpd: [L2] CHAT: matched set "", goto label "DialErrorInit"
Nov 10 21:41:51 router mpd: [L2] CHAT: line 39: if $dialErrorSubr != "" goto $dialErrorSubr
Nov 10 21:41:51 router mpd: [L2] CHAT: line 40: log "Invalid dial init string."
Nov 10 21:41:51 router mpd: [L2] CHAT: Invalid dial init string.
Nov 10 21:41:51 router mpd: [L2] CHAT: line 41: failure
Nov 10 21:41:51 router mpd: [L2] MODEM: chat script failed
Nov 10 21:41:51 router mpd: [L2] Link: DOWN event
Nov 10 21:41:51 router mpd: [L2] LCP: Down event
Nov 10 21:41:51 router mpd: [L2] Link: reconnection attempt 125 in 3 seconds
Уже переписывал даже конфиг..

Отправлено спустя 10 минут 20 секунд:
Даже не так - модем работал, все было красиво, с данным конфигом.
Поменялось лишь то что в конфиге mpd.conf убрал секцию загружать pptp_client, еще один провайдер.
И поменялся модем. Но ведь оборудование типа cuaU* появляется после применения команд.
Вернуть старый модем - не представляется возможным.
:bn: