LINUX.ORG.RU
ФорумAdmin

OpenWRT и МТС модем huawei e171


0

1

Доброй ночи!

Пытаюсь увязать роутер tplink tl-wr1043nd с прошивкой openwrt и мтс модем huawei e171. Делал все по инструкции: http://wiki.openwrt.org/doc/recipes/3gdongle (не совсем дословно). В результате модем определяется, но соединение не поднимается. Вот куски лога:

May 27 01:50:52 OpenWrt user.info kernel: option 1-1.3:1.0: GSM modem (1-port) converter detected
May 27 01:50:52 OpenWrt user.info kernel: usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB0
May 27 01:50:52 OpenWrt user.info kernel: option 1-1.3:1.1: GSM modem (1-port) converter detected
May 27 01:50:52 OpenWrt user.info kernel: usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB1
May 27 01:50:52 OpenWrt user.info kernel: scsi8 : SCSI emulation for USB Mass Storage devices
May 27 01:50:52 OpenWrt user.debug kernel: usb-storage: device found at 12
May 27 01:50:52 OpenWrt user.debug kernel: usb-storage: waiting for device to settle before scanning
May 27 01:50:57 OpenWrt user.notice kernel: scsi 8:0:0:0: CD-ROM            HUAWEI   Mass Storage     2.31 PQ: 0 ANSI: 2
May 27 01:50:57 OpenWrt user.debug kernel: usb-storage: device scan complete
May 27 01:51:08 OpenWrt user.notice usb-modeswitch: 1-1.3:1.0: Manufacturer=HUAWEI_Technology Product=HUAWEI_Mobile Serial=?
May 27 01:51:08 OpenWrt user.notice usb-modeswitch: 1-1.3:1.0: Selecting /etc/usb_modeswitch.d/12d1:1003 for mode switching
May 27 01:51:08 OpenWrt user.notice 3g-hotplug: Starting interface wan for device ttyUSB0
May 27 01:51:08 OpenWrt user.notice usb-modeswitch: 1-1.3:1.1: Manufacturer=HUAWEI_Technology Product=HUAWEI_Mobile Serial=?
May 27 01:51:08 OpenWrt user.notice usb-modeswitch: 1-1.3:1.1: Selecting /etc/usb_modeswitch.d/12d1:1003 for mode switching
May 27 01:51:09 OpenWrt user.notice usb-modeswitch: 1-1.3:1.2: Manufacturer=HUAWEI_Technology Product=HUAWEI_Mobile Serial=?
May 27 01:51:09 OpenWrt user.notice usb-modeswitch: 1-1.3:1.2: Selecting /etc/usb_modeswitch.d/12d1:1003 for mode switching

May 27 01:51:11 OpenWrt daemon.notice pppd[5404]: pppd 2.4.4 started by root, uid 0
May 27 01:51:12 OpenWrt local2.info chat[5409]: abort on (BUSY)
May 27 01:51:12 OpenWrt local2.info chat[5409]: abort on (ERROR)
May 27 01:51:12 OpenWrt local2.info chat[5409]: abort on (NO ANSWER)
May 27 01:51:12 OpenWrt local2.info chat[5409]: abort on (NO CARRIER)
May 27 01:51:12 OpenWrt local2.info chat[5409]: abort on (NO DIALTONE)
May 27 01:51:12 OpenWrt local2.info chat[5409]: abort on (Invalid Login)
May 27 01:51:12 OpenWrt local2.info chat[5409]: abort on (Login incorrect)
May 27 01:51:12 OpenWrt local2.info chat[5409]: timeout set to 5 seconds
May 27 01:51:12 OpenWrt local2.info chat[5409]: send (\\d^M)
May 27 01:51:12 OpenWrt local2.info chat[5409]: send (\\d^M)
May 27 01:51:12 OpenWrt local2.info chat[5409]: send (\\d^M)
May 27 01:51:12 OpenWrt local2.info chat[5409]: send (\\d^M)
May 27 01:51:12 OpenWrt local2.info chat[5409]: send (\\d^M)
May 27 01:51:12 OpenWrt local2.info chat[5409]: send (AT^M)
May 27 01:51:12 OpenWrt local2.info chat[5409]: expect (OK)
May 27 01:51:12 OpenWrt local2.info chat[5409]: AT^M^M
May 27 01:51:12 OpenWrt local2.info chat[5409]: OK
May 27 01:51:12 OpenWrt local2.info chat[5409]:  -- got it
May 27 01:51:12 OpenWrt local2.info chat[5409]: send (ATV1^M)
May 27 01:51:13 OpenWrt local2.info chat[5409]: expect (OK)
May 27 01:51:13 OpenWrt local2.info chat[5409]: ^M
May 27 01:51:13 OpenWrt local2.info chat[5409]: ATV1^M^M
May 27 01:51:13 OpenWrt local2.info chat[5409]: OK
May 27 01:51:13 OpenWrt local2.info chat[5409]:  -- got it
May 27 01:51:13 OpenWrt local2.info chat[5409]: send (ATE0^M)
May 27 01:51:13 OpenWrt local2.info chat[5409]: expect (OK)
May 27 01:51:13 OpenWrt local2.info chat[5409]: ^M
May 27 01:51:13 OpenWrt local2.info chat[5409]: ATE0^M^M
May 27 01:51:13 OpenWrt local2.info chat[5409]: OK
May 27 01:51:13 OpenWrt local2.info chat[5409]:  -- got it
May 27 01:51:13 OpenWrt local2.info chat[5409]: send (AT&F&D2&C1S0=0^M)
May 27 01:51:13 OpenWrt local2.info chat[5409]: expect (OK)
May 27 01:51:13 OpenWrt local2.info chat[5409]: ^M
May 27 01:51:13 OpenWrt local2.info chat[5409]: ^M
May 27 01:51:13 OpenWrt local2.info chat[5409]: OK
May 27 01:51:13 OpenWrt local2.info chat[5409]:  -- got it
May 27 01:51:13 OpenWrt local2.info chat[5409]: send (ATS7=60S30=0^M)
May 27 01:51:13 OpenWrt local2.info chat[5409]: expect (OK)
May 27 01:51:13 OpenWrt local2.info chat[5409]: ^M
May 27 01:51:13 OpenWrt local2.info chat[5409]: ^M
May 27 01:51:13 OpenWrt local2.info chat[5409]: OK
May 27 01:51:13 OpenWrt local2.info chat[5409]:  -- got it
May 27 01:51:13 OpenWrt local2.info chat[5409]: send (ATS0=0^M)
May 27 01:51:13 OpenWrt local2.info chat[5409]: timeout set to 10 seconds
May 27 01:51:13 OpenWrt local2.info chat[5409]: send (ATZ^M)
May 27 01:51:13 OpenWrt local2.info chat[5409]: expect (OK)
May 27 01:51:13 OpenWrt local2.info chat[5409]: ^M
May 27 01:51:13 OpenWrt local2.info chat[5409]: ^M
May 27 01:51:13 OpenWrt local2.info chat[5409]: OK
May 27 01:51:13 OpenWrt local2.info chat[5409]:  -- got it
May 27 01:51:13 OpenWrt local2.info chat[5409]: send (AT+CGDCONT=1,\"IP\",\"internet.mts.ru\"^M)
May 27 01:51:13 OpenWrt local2.info chat[5409]: timeout set to 20 seconds
May 27 01:51:13 OpenWrt local2.info chat[5409]: expect (OK)
May 27 01:51:13 OpenWrt local2.info chat[5409]: ^M
May 27 01:51:13 OpenWrt local2.info chat[5409]: ^M
May 27 01:51:13 OpenWrt local2.info chat[5409]: OK
May 27 01:51:13 OpenWrt local2.info chat[5409]:  -- got it
May 27 01:51:13 OpenWrt local2.info chat[5409]: send (ATDT*99#^M)
May 27 01:51:13 OpenWrt local2.info chat[5409]: expect (CONNECT)
May 27 01:51:13 OpenWrt local2.info chat[5409]: ^M
May 27 01:51:13 OpenWrt local2.info chat[5409]: AT+CGDCONT=1,"IP","internet.mts.ru"^M^M
May 27 01:51:13 OpenWrt local2.info chat[5409]: OK^M
May 27 01:51:13 OpenWrt local2.info chat[5409]: ATDT*99#^M^M
May 27 01:51:13 OpenWrt local2.info chat[5409]: CONNECT
May 27 01:51:13 OpenWrt local2.info chat[5409]:  -- got it
May 27 01:51:13 OpenWrt local2.info chat[5409]: send (^M)
May 27 01:51:13 OpenWrt local2.info chat[5409]: timeout set to 5 seconds
May 27 01:51:13 OpenWrt local2.info chat[5409]: expect (~)
May 27 01:51:13 OpenWrt local2.info chat[5409]: ^M
May 27 01:51:18 OpenWrt local2.info chat[5409]: alarm
May 27 01:51:18 OpenWrt local2.info chat[5409]: send (^M)
May 27 01:51:19 OpenWrt local2.info chat[5409]: send (^M)
May 27 01:51:19 OpenWrt daemon.info pppd[5404]: Serial connection established.
May 27 01:51:19 OpenWrt daemon.info pppd[5404]: Using interface 3g-wan
May 27 01:51:19 OpenWrt daemon.notice pppd[5404]: Connect: 3g-wan <--> /dev/ttyUSB0
May 27 01:51:20 OpenWrt daemon.info pppd[5404]: CHAP authentication succeeded
May 27 01:51:20 OpenWrt daemon.notice pppd[5404]: CHAP authentication succeeded
May 27 01:51:21 OpenWrt daemon.info pppd[5404]: Hangup (SIGHUP)
May 27 01:51:21 OpenWrt daemon.notice pppd[5404]: Modem hangup
May 27 01:51:21 OpenWrt daemon.notice pppd[5404]: Connection terminated.

в /etc/config/network:

config 'interface' 'wan'
        option 'ifname' 'ppp0'
        option 'device' '/dev/ttyUSB0'
        option 'apn' 'internet.mts.ru'
        option 'service' 'umts'
        option 'proto' '3g'
        option 'username' 'mts'
        option 'password' 'mts'
        option 'keepalive' '15 22'

root@OpenWrt:~# cat /etc/chatscripts/3g.chat 
ABORT BUSY
ABORT ERROR
ABORT 'NO ANSWER'
ABORT 'NO CARRIER'
ABORT 'NO DIALTONE'
ABORT 'Invalid Login'
ABORT 'Login incorrect'
TIMEOUT 5
'' '\\d'
'' '\\d'
'' '\\d'
'' '\\d'
'' '\\d'
'' AT
OK 'ATV1'
OK 'ATE0'
OK 'AT&F&D2&C1S0=0'
OK 'ATS7=60S30=0'
OK 'ATS0=0'
TIMEOUT 10
'' 'ATZ'
OK 'AT+CGDCONT=1,\"IP\",\"internet.mts.ru\"'
TIMEOUT 20
OK 'ATDT*99#'
CONNECT ''
TIMEOUT 5
'~--' ''

chat скрипт прописывал и другой, с ноута, где модем отлично работает.

Понять не могу, почему рвется соединение:

May 27 01:51:19 OpenWrt daemon.info pppd[5404]: Serial connection established.
May 27 01:51:19 OpenWrt daemon.info pppd[5404]: Using interface 3g-wan
May 27 01:51:19 OpenWrt daemon.notice pppd[5404]: Connect: 3g-wan <--> /dev/ttyUSB0
May 27 01:51:20 OpenWrt daemon.info pppd[5404]: CHAP authentication succeeded
May 27 01:51:20 OpenWrt daemon.notice pppd[5404]: CHAP authentication succeeded
May 27 01:51:21 OpenWrt daemon.info pppd[5404]: Hangup (SIGHUP)
May 27 01:51:21 OpenWrt daemon.notice pppd[5404]: Modem hangup
May 27 01:51:21 OpenWrt daemon.notice pppd[5404]: Connection terminated.

Подскажите плиз куда копать дальше...

поправил /etc/ppp/options:

debug
logfile /tmp/ppplogg

noauth
default-asyncmap
defaultroute
usepeerdns
ipcp-accept-remote
ipcp-accept-local
lcp-echo-interval 22
lcp-echo-failure 15
mru 1492
mtu 1400

вот что в лог ppp сыпется:

Serial connection established.
using channel 43
Using interface 3g-wan
Connect: 3g-wan <--> /dev/ttyUSB0
sent [LCP ConfReq id=0x7 <mru 1492> <magic 0x609673b9> <pcomp> <accomp>]
rcvd [LCP ConfReq id=0x12 <asyncmap 0x0> <auth chap MD5> <magic 0x1089940> <pcomp> <accomp>]
sent [LCP ConfRej id=0x12 <asyncmap 0x0>]
rcvd [LCP ConfAck id=0x7 <mru 1492> <magic 0x609673b9> <pcomp> <accomp>]
rcvd [LCP ConfReq id=0x13 <auth chap MD5> <magic 0x1089940> <pcomp> <accomp>]
sent [LCP ConfAck id=0x13 <auth chap MD5> <magic 0x1089940> <pcomp> <accomp>]
sent [LCP EchoReq id=0x0 magic=0x609673b9]
rcvd [LCP DiscReq id=0x14 magic=0x1089940]
rcvd [CHAP Challenge id=0x1 <6aa0a6e05e026edbded95d13c0878a76>, name = "UMTS_CHAP_SRVR"]
sent [CHAP Response id=0x1 <6aa8b5d18109106f73bab70ac9683116>, name = "mts"]
rcvd [LCP EchoRep id=0x0 magic=0x1089940 60 96 73 b9]
rcvd [CHAP Success id=0x1 ""]
CHAP authentication succeeded
CHAP authentication succeeded
sent [IPCP ConfReq id=0xd <addr 10.0.0.252> <ms-dns1 0.0.0.0> <ms-dns3 0.0.0.0>]
rcvd [IPCP ConfNak id=0xd <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
sent [IPCP ConfReq id=0xe <addr 10.0.0.252> <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14>]
Hangup (SIGHUP)
Modem hangup
Connection terminated.

★★

Последнее исправление: samson (всего исправлений: 1)

30 октября 2012 г.
Ответ на: комментарий от samson

1043nd + Huawei E171

Пытаюсь сделать то же самое. Соединение получилось поднять точно также. Но есть проблема. При дисконнекте не происходит пересоединения. Можно попробовать выдернуть и вставить модем. И все, картина та же самая. Вроде как за это отвечает опция persist, но реконнекта не происходит ни с ней, ни без нее.

root@OpenWrt:/etc/ppp# cat options
#debug
logfile /dev/null
noauth
nobsdcomp
novj
modem
noaccomp
nopcomp
nocrtscts
lock
maxfail 0
lcp-echo-failure 5
lcp-echo-interval 1

root@OpenWrt:/etc/chatscripts# cat 3g.chat
ABORT   BUSY
ABORT   'NO CARRIER'
ABORT   ERROR
REPORT  CONNECT
TIMEOUT 10
""      "AT&F"
OK      "ATE1"
OK      'AT+CGDCONT=1,"IP","$USE_APN"'
SAY     "Calling UMTS/GPRS"
TIMEOUT 30
OK      "ATD*99***1#"
CONNECT ' '
root@OpenWrt:/etc/config# cat network
...
config 'interface' 'wan'
        option '_orig_ifname' 'eth0.2'
        option '_orig_bridge' 'false'
        option 'proto' '3g'
        option 'service' 'umts'
        option 'apn' 'home.beeline.ru'
        option 'device' '/dev/ttyUSB0'

При загрузке модема соединение поднимается. Если выдернуть и воткнуть модем - в логе вот что:

Oct 30 06:26:53 OpenWrt local2.info chat[13461]: abort on (BUSY)
Oct 30 06:26:53 OpenWrt local2.info chat[13461]: abort on (NO CARRIER)
Oct 30 06:26:53 OpenWrt local2.info chat[13461]: abort on (ERROR)
Oct 30 06:26:53 OpenWrt local2.info chat[13461]: report (CONNECT)
Oct 30 06:26:53 OpenWrt local2.info chat[13461]: timeout set to 10 seconds
Oct 30 06:26:53 OpenWrt local2.info chat[13461]: send (AT&F^M)
Oct 30 06:26:53 OpenWrt local2.info chat[13461]: expect (OK)
Oct 30 06:26:53 OpenWrt local2.info chat[13461]: AT&F^M^M
Oct 30 06:26:53 OpenWrt local2.info chat[13461]: OK
Oct 30 06:26:53 OpenWrt local2.info chat[13461]:  -- got it
Oct 30 06:26:53 OpenWrt local2.info chat[13461]: send (ATE1^M)
Oct 30 06:26:53 OpenWrt local2.info chat[13461]: expect (OK)
Oct 30 06:26:53 OpenWrt local2.info chat[13461]: ^M
Oct 30 06:26:53 OpenWrt local2.info chat[13461]: ATE1^M^M
Oct 30 06:26:53 OpenWrt local2.info chat[13461]: OK
Oct 30 06:26:53 OpenWrt local2.info chat[13461]:  -- got it
Oct 30 06:26:53 OpenWrt local2.info chat[13461]: send (AT+CGDCONT=1,"IP","home.beeline.ru"^M)
Oct 30 06:26:53 OpenWrt local2.info chat[13461]: timeout set to 30 seconds
Oct 30 06:26:53 OpenWrt local2.info chat[13461]: expect (OK)
Oct 30 06:26:53 OpenWrt local2.info chat[13461]: ^M
Oct 30 06:26:53 OpenWrt local2.info chat[13461]: AT+CGDCONT=1,"IP","home.beeline.ru"^M^M
Oct 30 06:26:53 OpenWrt local2.info chat[13461]: OK
Oct 30 06:26:53 OpenWrt local2.info chat[13461]:  -- got it
Oct 30 06:26:53 OpenWrt local2.info chat[13461]: send (ATD*99***1#^M)
Oct 30 06:26:53 OpenWrt local2.info chat[13461]: expect (CONNECT)
Oct 30 06:26:53 OpenWrt local2.info chat[13461]: ^M
Oct 30 06:26:53 OpenWrt local2.info chat[13461]: ATD*99***1#^M^M
Oct 30 06:26:53 OpenWrt local2.info chat[13461]: CONNECT
Oct 30 06:26:53 OpenWrt local2.info chat[13461]:  -- got it
Oct 30 06:26:53 OpenWrt local2.info chat[13461]: send ( ^M)
Oct 30 06:26:53 OpenWrt daemon.info pppd[2465]: Serial connection established.
Oct 30 06:26:53 OpenWrt daemon.info pppd[2465]: Using interface 3g-wan
Oct 30 06:26:53 OpenWrt daemon.notice pppd[2465]: Connect: 3g-wan <--> /dev/ttyUSB0
Oct 30 06:26:55 OpenWrt daemon.info pppd[2465]: Hangup (SIGHUP)
Oct 30 06:26:55 OpenWrt daemon.notice pppd[2465]: Modem hangup
Oct 30 06:26:55 OpenWrt daemon.notice pppd[2465]: Connection terminated.

Как обеспечить реконнект?

PythonJ
()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.