LINUX.ORG.RU
ФорумAdmin

[skylink]одновременная работа 2х модемов


0

0

К роутеру подключено 2 модема AnyData ADU-520A. В /etc/ppp/peers/ лежит 2 файла настроек, отличающихся только именем устройства - /dev/ttyUSB0 и /dev/ttyUSB5 соответственно. В /etc/network/interfaces они прописаны так:

auto ppp0
iface ppp0 inet ppp
provider skylink

auto ppp1
iface ppp1 inet ppp
provider skylink2
При загрузке поднимается только ppp0. Если вырубить ppp0 и скомандовать ifup ppp1 подключается всё равно ppp0. C pon тот же результат.

Ниже вывод dmesg и lsusb

[   10.493127] usb-storage: device scan complete
[   10.496121] scsi 3:0:0:0: CD-ROM            AnyDATA  CD-ROM           1.00 PQ
: 0 ANSI: 2
[   10.901352] usb-storage: device scan complete
[   10.904334] scsi 4:0:0:0: CD-ROM            AnyDATA  CD-ROM           1.00 PQ
: 0 ANSI: 2
[   11.296601] usbcore: registered new interface driver usbserial
[   11.296688] usbserial: USB Serial support registered for generic
[   11.296816] usbcore: registered new interface driver usbserial_generic
[   11.296880] usbserial: USB Serial Driver core
[   11.307240] usbserial: USB Serial support registered for GSM modem (1-port)
[   11.307345] option 1-2:1.0: GSM modem (1-port) converter detected
[   11.307502] usb 1-2: GSM modem (1-port) converter now attached to ttyUSB0
[   11.307582] option 1-2:1.1: GSM modem (1-port) converter detected
[   11.307700] usb 1-2: GSM modem (1-port) converter now attached to ttyUSB1
[   11.307778] option 1-2:1.2: GSM modem (1-port) converter detected
[   11.307895] usb 1-2: GSM modem (1-port) converter now attached to ttyUSB2
[   11.307975] option 2-1:1.0: GSM modem (1-port) converter detected
[   11.308139] usb 2-1: GSM modem (1-port) converter now attached to ttyUSB3
[   10.493127] usb-storage: device scan complete
[   10.496121] scsi 3:0:0:0: CD-ROM            AnyDATA  CD-ROM           1.00 PQ
: 0 ANSI: 2
[   10.901352] usb-storage: device scan complete
[   10.904334] scsi 4:0:0:0: CD-ROM            AnyDATA  CD-ROM           1.00 PQ
: 0 ANSI: 2
[   11.296601] usbcore: registered new interface driver usbserial
[   11.296688] usbserial: USB Serial support registered for generic
[   11.296816] usbcore: registered new interface driver usbserial_generic
[   11.296880] usbserial: USB Serial Driver core
[   11.307240] usbserial: USB Serial support registered for GSM modem (1-port)
[   11.307345] option 1-2:1.0: GSM modem (1-port) converter detected
[   11.307502] usb 1-2: GSM modem (1-port) converter now attached to ttyUSB0
[   11.307582] option 1-2:1.1: GSM modem (1-port) converter detected
[   11.307700] usb 1-2: GSM modem (1-port) converter now attached to ttyUSB1
[   11.307778] option 1-2:1.2: GSM modem (1-port) converter detected
[   11.307895] usb 1-2: GSM modem (1-port) converter now attached to ttyUSB2
[   11.307975] option 2-1:1.0: GSM modem (1-port) converter detected
[   11.308139] usb 2-1: GSM modem (1-port) converter now attached to ttyUSB3
[   11.308219] option 2-1:1.1: GSM modem (1-port) converter detected
[   11.308337] usb 2-1: GSM modem (1-port) converter now attached to ttyUSB4
[   11.308414] option 2-1:1.2: GSM modem (1-port) converter detected
[   11.308530] usb 2-1: GSM modem (1-port) converter now attached to ttyUSB5
[   11.308610] usbcore: registered new interface driver option
[   11.308673] option: USB Driver for GSM modems: v0.7.2
[   11.939046] input: PC Speaker as /class/input/input3
[   12.129852] Error: Driver 'pcspkr' is already registered, aborting...
[   12.220683] parport_pc 00:0b: reported by Plug and Play ACPI
[   12.220800] parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE]
[   12.544649] Driver 'sr' needs updating - please use bus_type methods
[   12.552123] sr0: scsi3-mmc drive: 0x/0x caddy
[   12.552332] sr 3:0:0:0: Attached scsi CD-ROM sr0
[   12.560160] sr1: scsi3-mmc drive: 0x/0x caddy
[   12.560365] sr 4:0:0:0: Attached scsi CD-ROM sr1
[   12.594024] sd 1:0:0:0: Attached scsi generic sg0 type 0
[   12.594131] sr 3:0:0:0: Attached scsi generic sg1 type 5
[   12.594223] sr 4:0:0:0: Attached scsi generic sg2 type 5
[   13.392437] Adding 979956k swap on /dev/sda2.  Priority:-1 extents:1 across:979956k
[   20.449579] loop: module loaded
[   20.490928] it87: Found IT8718F chip at 0x290, revision 1
[   20.491004] it87: in3 is VCC (+5V)
[   20.491062] it87: in7 is VCCH (+5V Stand-By)
[   21.926038] NET: Registered protocol family 15
[   22.128014] padlock: VIA PadLock Hash Engine not detected.
[   22.225646] padlock: VIA PadLock Hash Engine not detected.
[   22.428570] padlock: VIA PadLock not detected.
[   23.445157] ip_tables: (C) 2000-2006 Netfilter Core Team
[   23.664849] nf_conntrack version 0.5.0 (8192 buckets, 32768 max)
[   23.958063] PPP generic driver version 2.4.2
[   24.120904] eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
[   28.544192] lp0: using parport0 (interrupt-driven).
[   28.562908] ppdev: user-space parallel port driver
[   33.638557] sr0: CDROM (ioctl) error, command: Get configuration 46 00 00 00 00 00 00 00 20 00
[   33.638557] sr: Sense Key : No Sense [current] 
[   33.638557] sr: Add. Sense: No additional sense information
[   34.034749] sr1: CDROM (ioctl) error, command: Get configuration 46 00 00 00 00 00 00 00 20 00
[   34.044462] sr: Sense Key : No Sense [current] 
[   34.044670] sr: Add. Sense: No additional sense information
[   34.442257] PPP Deflate Compression module registered
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 003: ID 16d5:6502 AnyDATA Corporation 
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 003: ID 16d5:6502 AnyDATA Corporation 
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

/dev/ttyUSB0 и /dev/ttyUSB5
Это смущает.
Если каждый модем порождает три tty (у меня 300 анидата порождает два) и судя по логу это и происходит, то на второй модем надо тыкаться в ttyUSB3 а не в ttyUSB5
Боюсь что ttyUSB5 в данном случает просто некий управляющий интерфейс.

kilolife ★★★★★
()

Ну и до начала написания всяких умных скриптов попробуйте рабоче крестьянское
ppp call skylink
ppp call skylink1
Со включенным дебагом

kilolife ★★★★★
()

А как привязать все три порта к фиксированым именам при втыкании/вытыкании модема?

т.е:

ttyUSB0 -> modem1

ttyUSB1 -> modem2

ttyUSB2 -> modem3

ttyUSB3 -> modem4

ttyUSB4 -> modem5

ttyUSB5 -> modem6

Вынул-вставил первый модем:

ttyUSB6 -> modem1

ttyUSB7 -> modem2

ttyUSB8 -> modem3

ttyUSB3 -> modem4

ttyUSB4 -> modem5

ttyUSB5 -> modem6

Дальше этого не дошел (udev, привязка к самому порту usb):

KERNEL==«ttyUSB[0-9]*», ID==«2-2», NAME=«%k», SYMLINK+=«modem%n», GROUP=«root», MODE=«0666»

KERNEL==«ttyUSB[0-9]*», ID==«2-5», NAME=«%k», SYMLINK+=«modem%n», GROUP=«root», MODE=«0666»

но получается естественно:

ttyUSB6 -> modem6

ttyUSB7 -> modem7

ttyUSB8 -> modem8

ttyUSB3 -> modem3

ttyUSB4 -> modem4

ttyUSB5 -> modem5

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