minipci 的 interface,所以都是用 usb 的介面。
插入 ubuntu 10.04 後,dmesg:
[ 34.241471] usb 1-1: new high speed USB device using ehci_hcd and address 2
[ 34.817413] usb 1-1: configuration #1 chosen from 1 choice
[ 34.919398] Initializing USB Mass Storage driver...
[ 34.922803] usbcore: registered new interface driver usb-storage
[ 34.922808] USB Mass Storage support registered.
[ 35.331910] usbcore: registered new interface driver usbserial
[ 35.332304] USB Serial support registered for generic
[ 35.332672] usbcore: registered new interface driver usbserial_generic
[ 35.332676] usbserial: USB Serial Driver core
[ 35.361189] USB Serial support registered for GSM modem (1-port)
[ 35.361218] option 1-1:1.0: GSM modem (1-port) converter detected
[ 35.361429] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB0
[ 35.361445] option 1-1:1.1: GSM modem (1-port) converter detected
[ 35.361568] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB1
[ 35.361589] option 1-1:1.2: GSM modem (1-port) converter detected
[ 35.363318] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB2
[ 35.363419] option 1-1:1.3: GSM modem (1-port) converter detected
[ 35.363630] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB3
[ 35.363701] usbcore: registered new interface driver option
[ 35.363714] option: v0.7.2:USB Driver for GSM modems
所以知道是 usb-serial device。 介面是 tty。用 lsusb 來看:
Bus 001 Device 002: ID 12d1:140c Huawei Technologies Co., Ltd.
從 dmesg 可以知道是 usb-serial -- option driver,所以應該是要看:
drivers/usb/serial/option.c
裡面有 PID 列表,找一下 lsusb 列出的 VID, PID:
#define HUAWEI_VENDOR_ID 0x12D1
...
#define HUAWEI_PRODUCT_E140C 0x140C
開啟 minicom 來試:
sudo minicom -s
用 -s 做設定。設定 com port 是 /dev/ttyUSB0
save as default 後退出,重新再開
sudo minicom -o
因為ttyUSB0.1.2 的全縣,要用 sudo 才可以開啟。
拿 source code 下來看:
apt-get install linux-source
會download 在 /usr/src。這樣拿下來的是 ubuntu patch 好的 kernel。
ubuntu 的 kernel config 會在 /boot/
config 後面會加上 kernel revision name。
把它 copy 到 解開的 kernel source 下, rename 成 .config
沒有留言:
張貼留言