Portál AbcLinuxu, 4. listopadu 2025 00:39
| Podpora: | kompletní |
| Ovladač: | v jádře |
Za studena (svítí červená LED, chová se jako USB CD-ROM mechanika):
# lsusb
Bus 004 Device 067: ID 05c6:1000 Qualcomm, Inc.
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x05c6 Qualcomm, Inc.
idProduct 0x1000
bcdDevice 0.00
iManufacturer 1 Vertex Wireless Co., Ltd.
iProduct 2 USB CD-ROM Storage
iSerial 3 000000000002
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 32
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xc0
Self Powered
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 8 Mass Storage
bInterfaceSubClass 6 SCSI
bInterfaceProtocol 80 Bulk (Zip)
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x84 EP 4 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x05 EP 5 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
Device Status: 0x0000
(Bus Powered)
Za tepla (po vysunutí CD-ROM média, bliká modrá/fialová LED, modem je připraven):
# lsusb
Bus 004 Device 068: ID 1fe7:0100
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 2 Communications
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x1fe7
idProduct 0x0100
bcdDevice 0.00
iManufacturer 1 Vertex Wireless Co., Ltd.
iProduct 2 Vertex Wireless Multi-Function Device
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 113
bNumInterfaces 4
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xa0
(Bus Powered)
Remote Wakeup
MaxPower 500mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 2 Communications
bInterfaceSubClass 2 Abstract (modem)
bInterfaceProtocol 1 AT-commands (v.25ter)
iInterface 3 Vertex Wireless ACM Interface
CDC Header:
bcdCDC 1.09
CDC Call Management:
bmCapabilities 0x03
call management
use DataInterface
bDataInterface 1
CDC ACM:
bmCapabilities 0x07
sends break
line coding and serial state
get/set/clear comm features
CDC Union:
bMasterInterface 0
bSlaveInterface 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0010 1x 16 bytes
bInterval 16
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 10 CDC Data
bInterfaceSubClass 0 Unused
bInterfaceProtocol 0
iInterface 4 Data Interface
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 2
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 5 Vertex Wireless Diagnostic Monitor Port
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x84 EP 4 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x04 EP 4 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 3
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 6 Vertex Wireless Device Management Port
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x86 EP 6 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x06 EP 6 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
Device Status: 0x0000
(Bus Powered)
Takto vypadá správný průběh připojování v /var/log/messages (včetně automatického vysunutí CD-ROM pomocí usb_modeswitch):
kernel: usb 4-1: new full speed USB device using uhci_hcd and address 45 kernel: scsi37 : usb-storage 4-1:1.0 kernel: scsi 37:0:0:0: CD-ROM VERTEX VW100 Series 1.00 PQ: 0 ANSI: 0 CCS kernel: sr1: scsi3-mmc drive: 0x/0x xa/form2 tray kernel: sr 37:0:0:0: Attached scsi CD-ROM sr1 kernel: sr 37:0:0:0: Attached scsi generic sg3 type 5 kernel: sr1: CDROM (ioctl) error, command: Xpwrite, Read disk info 51 00 00 00 00 00 00 00 02 00 kernel: sr: Sense Key : Hardware Error [current] kernel: sr: Add. Sense: No additional sense information usb_modeswitch: switching 05c6:1000 (Vertex Wireless Co., Ltd.: USB CD-ROM Storage) kernel: sr1: CDROM (ioctl) error, command: Xpwrite, Read disk info 51 00 00 00 00 00 00 00 02 00 kernel: sr: Sense Key : Hardware Error [current] kernel: sr: Add. Sense: No additional sense information kernel: usb 4-1: USB disconnect, address 45 kernel: usb 4-1: new full speed USB device using uhci_hcd and address 46 kernel: cdc_acm 4-1:1.0: ttyACM0: USB ACM device kernel: vwmfdiag 4-1:1.2: vwmfdiag converter detected kernel: usb 4-1: vwmfdiag converter now attached to ttyUSB0 kernel: vwmfdiag 4-1:1.3: vwmfdiag converter detected kernel: usb 4-1: vwmfdiag converter now attached to ttyUSB1 usb_modeswitch: switched to 1fe7:0100 (Vertex Wireless Co., Ltd.: Vertex Wireless Multi-Function Device)
Modem používá ZeroCD technologii, to znamená, že po prvním připojení se tváří jako USB CD-ROM mechanika se zabudovaným CD s ovladači pro Windows. Teprve po nainstalování ovladačů dojde k přepnutí modemu, USB CD-ROM zmizí a místo ní se objeví 3 sériové porty.
K přepnutí tohoto modemu dojde vždy, když virtuální CD-ROM mechanika dostane SCSI příkaz k vysunutí média. Oproti např. modemům Huawei, které používají nedokumentovanou USB transakci jde o poměrně elegantní řešení, které je možné v nouzi udělat i ručně.
Kamenem úrazu je ale USB ID tohoto modemu ve stavu za studena - 0x05c5:0x1000 je standardní ID Qualcommáckého chipsetu a používají jej i jiné modemy, které však mají jinou techniku přepnutí. Snaha kernelu/udevu přepnout zařízení jinou technikou způsobí, že Linux virtuální CD-ROM mechaniku nevidí a není tedy co vysouvat.
Řešením je zakázat automatické přepínání modemu tak, aby po připojení modemu jádro správně rozpoznalo CD-ROM mechaniku:
ATTRS{idVendor}=="05c6", ATTRS{idProduct}=="1000", RUN+="modem-modeswitch…Po přepnutí se zařízení chová jako běžný CDC ACM modem, je-li v kernelu příslušný modul, objeví se zařízení /dev/ttyACM0. Na něm je možné navázat připojení na číslo #777 libovolným programem, například takto:
/usr/sbin/pppd /dev/ttyACM0 user ufon password ufon updetach defaultroute usepeerdns connect "/usr/sbin/chat ABORT BUSY ABORT 'NO CARRIER' '' ATZ OK ATD#777 CONNECT"
Modem dále obsahuje dva „vendor specific“ sériové porty pro diagnostiku a management. U:fon k nim dodává opensource ovladače (patch pro aktuální jádra zde, patchovaná verze zde, bez záruky). Po jejich zavedení se v systému objeví dva další sériové porty /dev/ttyUSB0 a /dev/ttyUSB1. Jeden slouží pro binární komunikaci s diagnostickým nástrojem, který je bohužel jen pro Windows a pod WINE se mu nedaří nadetekovat COM port. Druhý z portů trvale vypisuje aktuální informace o stavu modemu, včetně úrovní signálu, chybovosti, čísle PN, apod., v textové podobě. Z něj čerpá informace U:fonův Connection manager, který bohužel také neběží pod WINE. Zobrazit se dá např. pomocí:
screen /dev/ttyUSB1
Zdroj:
http://forum.ubuntu.cz/index.php/topic,42501.0.html
http://www.draisberghof.de/usb_modeswitch/bb/viewtopic.php?t=278
AT$SYSSEL=n na ttyUSB1, kde n je Dokument vytvořil: jdobry, 15.4.2010 22:47 | Poslední úprava: tuxmartin, 6.9.2011 13:08 | Další přispěvatelé: Oskar | Historie změn | Zobrazeno: 9973×
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.