[英]Cross compiling drivers for USB modem
I have a physical card with an IMX6 CPU that runs Linux (a kernel I compiled from source, from the manufacturer's website). 我有一个带有运行Linux的IMX6 CPU的物理卡(我是从制造商的网站从源代码编译而来的内核)。 I also have a USB Cellular modem dongle that I want to use with the card.
我还有一个要与卡一起使用的USB蜂窝调制解调器加密狗。 However, when I plug the dongle in the card, I get this in
dmesg
: 但是,当我将加密狗插入卡中时,会在
dmesg
得到它:
[ 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
It looks like Linux is recognizing the device as a mass storage device (it doubles as a storage device), but not as a modem. 看起来Linux会将设备识别为大容量存储设备(它是存储设备的两倍),而不是调制解调器。 When I insert the same dongle into a regular Ubuntu machine, I get this:
当我将同一个加密狗插入到普通的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
I know how to compile modules externally and into the kernel, by choosing them in menuconfig
. 我知道如何通过在
menuconfig
选择模块来在外部和内核中编译模块。 However, I don't know which modules I should compile for this device, if they are even included in the kernel source. 但是,我什至不知道应该为该设备编译哪些模块,即使它们甚至包含在内核源代码中也是如此。 How can I find which modules / drivers to compile?
如何找到要编译的模块/驱动程序?
USB modems often start up as Mass storage devices to allow for driver installation. USB调制解调器通常作为大容量存储设备启动,以允许安装驱动程序。
You can use software such as USB_ModeSwitch to force it to change modes. 您可以使用USB_ModeSwitch之类的软件来强制其更改模式。 (this is likely already installed and working on your Ubuntu system)
(这可能已经安装并在您的Ubuntu系统上运行)
Failing that, many will switch modes when their storage is ejected (as by eject
). 失败的是,当存储被弹出时,许多将切换模式(例如通过
eject
)。
您可以在Ubuntu中的sysfs属性中查找/ sys / bus / usb / devices /中的关联驱动程序,并在您的主板内核配置中启用该驱动程序。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.