3G无线上网卡在Linux下的使用

首先,这是一个比较简单的问题,我是在Linux下和Windows下作了一个对比

1,Windows下第一次插入该猫的时候,会以一个usb外接存储设备显示出来,并且看上去是一个CD-ROM的Media设备,当在Windows下安装完电信的拨号程序以后,这个CDROM的设备就不见了,然后打开Windows的超级终端,会看到三个新的串口设备

2,在Linux下,无论什么时候插入该猫的时候,都会是一个usb外接存储设备显示出来,并且看上去是一个CD-ROM的Media设备

然后通过cat /proc/kmsg获得相关调试信息,我使用的kernel是加了kernel hacking选项的,也就是说,打印信息会多点,方便调试,看到如下信息:

[root@localhost liuqi]# cat /proc/kmsg
<7>[ 173.96809]ubub:ubrsm
7[ 7.610 hihd00:01.:rsm othb10 u_eue<> 13980]ec_c 000:d7 eSau ot2sau 083PWRsgjCCCNET<> 13983]hb2010 ot2 tts00 hne00
6cg04et00
7[ 7.837 u -:.:pr ,sau 51 hne00,40M/
<7>[ 174.158650] Monitor-Mwait will be used to enter C-3 state
<7>[ 174.177594] hub 6-0:1.0: hub_resume
<7>[ 174.177645] uhci_hcd 0000:00:1d.0: port 2 portsc 0093,00
<7>[ 174.177654] hub 6-0:1.0: port2:sau 11cag 01<>[ 7.914 hihd00:01.:Gtttspr tts030 OE WE i=e S
7[ 7.929 u -:.: state 7 ports 6 chg 0000 evt 0004
0 v 00<> 14284]hb6010 ot2 tts00,cag 00 2M/
<6>[ 174.380245 s -:nwfl pe S eieuiguc_c n drs
<7>[ 174.516276] usb 6-2: default language 0x0409
<7>[ 174.531319] usb 6-2: udev 2, busnum 6, minor = 641
<6>[ 174.531327] usb 6-2: New USB device found, idVendor=05c6, idProduct=2001
<6>[ 174.531334] usb 6-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
<6>[ 174.531341] usb 6-2: Product: USB MMC Storage
<6>[ 174.531347] usb 6-2: Manufacturer: Qualcomm, Incorporated
<6>[ 174.531352] usb 6-2: SerialNumber: Mass Storage
<7>[ 174.536313] usb 6-2: adding 6-2:1.0 (config #1, interface 0)
<7>[ 174.536933] usb 6-2:1.0: uevent
<7>[ 174.537241] usb-storage 6-2:1.0: usb_probe_interface
<7>[ 174.537254] usb-storage 6-2:1.0: usb_probe_interface - got id
<7>[ 174.537262] usb-storage: USB Mass Storage device detected
bsoae rtcl rnprn CI<7>[ 174.546717] usb-storage: *** thread sleeping.
<7>[ 174.547697] usb-storage 6-2:1.0: device found
<7>[ 174.547700] usb-storage 6-2:1.0: waiting for device to settle before scanning
<7>[ 174.548539] drivers/usb/core/inode.c: creating file '002'
:qf rtp=1vle00 ne=0ln1<7>[ 179.549322] usb-storage: GetMaxLUN comadrsl s1 aai
7[ 7.460 s-trg:qeeomn ald<> 19593]ubsoae * hedaaee.<> 19594]ubsoae omn NUR 6bts
7[ 7.463 s-trg: 20 00 40
7[ 7.469 s-trg:Bl omn x3235T01L3 2 r U L6<> 1959<7>[ 179.550289] usb-stora:Sttscd ;taserd3/1<> 19509]ubsoae -tase opee<> 19509]ubsoae ukcmadtase eut0<> 19509]ubsoae s_trbl_rnfrsls:xe 6bts nre
<7>[ 179.551311] usb-storae ttscd ;taserd3/6<> 19511]ubsoae -tase opee<> 19511]ubsoae ukdt rnfrrsl x
7[ 7.536 s-trg:Atmtn ogtCW.
7[ 7.538 s-trg:ubso_uktase_u:xe 3bts<7>[ 179.552303] usb-storage: Status code 0; transferred 13/13
<7>[ 179.552305] usb-storage: -- transfer complete
<7>[ 179.552307] usb-storage: Bulk status result = 0
<7>[ 179.552309] usb-storage: Bulk Status S 0x53425355 T 0x1 R 0 Stat 0x0
<7>[ 179.552312] usb-storage: scsi cmd done, result=0x0
<7>[ 179.552316] usb-storage: *** thread sleeping.
<5>[ 179.552403] scsi 2:0:0:0: CD-ROM D-Link CDROM 2.31 PQ: 0 ANSI: 2
<7>[ 179.553240] usb-storage: queuecommand called
<7>[ 179.554294] usb-storage: Status code 0; transferred 31/31
<7>[ 179.554296] usb-storage: -- transfer complete
<7>[ 179.554298] usb-storage: Bulk command transfer result=0
<7>[ 179.554300] usb-storage: Attempting to get CSW...
<7>[ 179.554302] usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
<7>[ 179.556287] usb-storage: Status code 0; transferred 31/31
<7>[ 179.556289] usb-storage: -- transfer complete
<7>[ 179.556291] usb-storage: Bulk command transfer result=0
<7>[ 179.556293] usb-storage: usb_stor_bulk_transfer_sglist: xfer 18 bytes, 1 entries
<7>[ 179.558286] usb-storage: Status code 0; transferred 13/13
<7>[ 179.558288] usb-storage: -- transfer complete
<7>[ 179.558290] usb-storage: Bulk status result = 0
<7>[ 179.558298] usb-storage: Bulk Status S 0x53425355 T 0x3 R 0 Stat 0x0
<7>[ 179.558300] usb-storage: -- Result from auto-sense is 0
<7>ChinaUnix T-bagwell
<7>[ 179.558302] usb-storage: -- code: 0x70, key: 0x6, ASC: 0x28, ASCQ: 0x0
<7>[ 179.558305] usb-storage: Unit Attention: Not ready to ready change, medium may have changed
<7>[ 179.558309] usb-storage: scsi cmd done, result=0x2
<7>[ 179.558313] usb-storage: *** thread sleeping.
<7>[ 179.558392] usb-storage: queuecommand called
<7>[ 179.558398] usb-storage: *** thread awakened.
<7>[ 179.558401] usb-storage: Command TEST_UNIT_READY (6 bytes)
<7>[ 179.558402] usb-storage: 00 00 00 00 00 00
<7>[ 179.558408] usb-storage: Bulk Command S 0x43425355 T 0x4 L 0 F 0 Trg 0 LUN 0 CL 6
<7>[ 179.558410] usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
<7>[ 179.560357] usb-storage: Status code 0; transferred 13/13
<7>[ 179.560359] usb-storage: -- transfer complete
<7>[ 179.560361] usb-storage: Bulk status result = 0
<7>[ 179.560363] usb-storage: Bulk Status S 0x53425355 T 0x4 R 0 Stat 0x0
<7>[ 179.560366] usb-storage: scsi cmd done, result=0x0
<7>[ 179.560370] usb-storage: *** thread sleeping.
<7>[ 179.560510] usb-storage: queuecommand called
<7>[ 179.560530] usb-storage: *** thread awakened.
<7>[ 179.560533] usb-storage: Command MODE_SENSE_10 (10 bytes)
<7>[ 179.560534] usb-storage: 5a 00 2a 00 00 00 00 00 80 00
<7>[ 179.560543] usb-storage: Bulk Command S 0x43425355 T 0x5 L 128 F 128 Trg 0 LUN 0 CL 10
<7>[ 179.560545] usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
<7>[ 179.562299] usb-storage: Status code -121; transferred 32/128
<7>[ 179.562301] usb-storage: -- short read trase
7[ 7.633 s-trg:Bl aatase eut01<> 19520]ubsoae tepigto get CSW...
<7>[ 179.562307] usb-storage:ubso_uktase_u:xe 3bts=0 ne=3ln0<7>[ 179.565286] usb-storage: Status code 0; transferred 13/13
<7>[ 179.565288] usb-storage: -- transfer complete
<7>[ 179.565290] usb-storage: Bulk status result = 0
<7>[ 179.565292] usb-storage: Bulk Status S 0x53425355 T 0x5 R 96 Stat 0x0
<7>[ 179.565295] usb-storage: scsi cmd done, result=0x0
<7>[ 179.565300] usb-storage: *** thread sleeping.
<4>[ 179.565360] sr0: scsi3-mmc drive: 8x/40x writer xa/form2 cdda tray
<6>[ 179.565369] Uniform CD-ROM driver Revision: 3.20
<7>[ 179.566915] sr 2:0:0:0: Attached scsi CD-ROM sr0
<5>[ 179.567541] sr 2:0:0:0: Attached scsi generic sg1 type 5
<7>[ 179.569524] usb-storage: queuecommand called
<7>[ 179.569531] usb-storage: *** thread awakened.
<7>[ 179.569533] usb-storage: Bad target number (3:0)
<7>[ 179.569535] usb-storage: scsi cmd done, result=0x40000
<7>[ 179.569538] usb-storage: *** thread sleeping.

.........................
^C

然后ls /dev就可以看到一些关键设备,比如sr0

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/25116.html