2016-03-06 73 views
0

我有一個運行Linux(我從源代碼,從製造商的網站編譯的內核)IMX6 CPU的物理卡。我也有一個我想用於該卡的USB蜂窩調制解調器加密狗。然而,當我在卡插上加密狗,我得到這個dmesg交叉編譯驅動程序的USB調制解調器

[ 29.825491] usb 1-1: new high-speed USB device number 2 using ci_hdrc 
[ 29.983396] usb-storage 1-1:1.0: USB Mass Storage device detected 
[ 29.991796] scsi0 : usb-storage 1-1:1.0 
[ 30.987573] scsi 0:0:0:0: Direct-Access  ALCATEL Mass Storage  2.31 PQ: 0 ANSI: 2 
[ 30.996027] scsi 0:0:0:1: CD-ROM   ALCATEL Mass Storage  2.31 PQ: 0 ANSI: 2 
[ 31.008487] sd 0:0:0:0: [sda] Attached SCSI removable disk 

它看起來像Linux是識別設備爲大容量存儲設備(雙打作爲存儲設備),但不作爲調制解調器。當我插入相同的加密狗到常規的Ubuntu機器,我得到這個:

[264822.947101] usb 1-5: new high-speed USB device number 12 using ehci-pci 
[264823.086874] usb 1-5: New USB device found, idVendor=1bbb, idProduct=0017 
[264823.086880] usb 1-5: New USB device strings: Mfr=3, Product=2, SerialNumber=[REDACTED] 
[264823.086883] usb 1-5: Product: HSPA Data Card 
[264823.086886] usb 1-5: Manufacturer: USBModem 
[264823.086888] usb 1-5: SerialNumber: [REDACTED] 
[264823.089483] option 1-5:1.0: GSM modem (1-port) converter detected 
[264823.089685] usb 1-5: GSM modem (1-port) converter now attached to ttyUSB1 
[264823.089816] option 1-5:1.1: GSM modem (1-port) converter detected 
[264823.090019] usb 1-5: GSM modem (1-port) converter now attached to ttyUSB2 
[264823.090150] option 1-5:1.2: GSM modem (1-port) converter detected 
[264823.090311] usb 1-5: GSM modem (1-port) converter now attached to ttyUSB3 
[264823.090433] option 1-5:1.3: GSM modem (1-port) converter detected 
[264823.090574] usb 1-5: GSM modem (1-port) converter now attached to ttyUSB4 
[264823.090666] usb-storage 1-5:1.4: USB Mass Storage device detected 
[264823.090916] scsi host16: usb-storage 1-5:1.4 
[264823.091067] option 1-5:1.5: GSM modem (1-port) converter detected 
[264823.091133] usb 1-5: GSM modem (1-port) converter now attached to ttyUSB5 
[264824.089843] scsi 16:0:0:0: Direct-Access  ALCATEL Mass Storage  2.31 PQ: 0 ANSI: 2 
[264824.090238] sd 16:0:0:0: Attached scsi generic sg2 type 0 
[264824.093552] sd 16:0:0:0: [sdb] Attached SCSI removable disk 

我知道如何編譯模塊外部進入內核,在menuconfig選擇它們。但是,我不知道我應該爲這個設備編譯哪些模塊,如果它們甚至包含在內核源代碼中的話。我怎樣才能找到要編譯的模塊/驅動程序?

回答

1

USB調制解調器通常作爲大容量存儲設備啓動,以允許安裝驅動程序。

您可以使用軟件如USB_ModeSwitch強制它改變模式。 (這可能已經安裝並在你的Ubuntu系統上工作)

如果失敗了,許多人會在存儲被彈出時切換模式(如eject)。

+0

看起來'eject'根本沒有任何效果。我什至不能說這個設備映射到哪裏。我在'/ dev/disk/by-id /'下找到了一個名爲'usb-ALCATEL_Mass_Storage- '的東西,但我不知道該怎麼辦。任何想法? –

+0

@AndyThomas:考慮到你的dmesg輸出,我希望'eject/dev/sda'應該可以工作,但使用'usb_modeswitch'可能會更容易。 – Hasturkun

+0

'eject/dev/sda'也不起作用。我的主板上沒有'usb_modeswitch',你認爲這值得交叉編譯嗎? –

0

您可以檢查Ubuntu中的sysfs屬性,查找/ sys/bus/usb/devices /中的關聯驅動程序 ,並在您的主板內核配置中啓用該驅動程序。