硬體平台:瑞泰DM365開發板
開發板核心:Linux 2.6.18
DVSDK版本:2_10_00_17
//
問題2:
Cannot open /dev/ttyUSB0: Device or resource busy
Cannot open /dev/ttyUSB1: Device or resource busy
Cannot open /dev/ttyUSB2: Device or resource busy
……
*********************************華麗的分割線****************************************
繼上一篇《 DM365+EC122調試(一)》,這篇繼續在DM365板子上調試EC122。現在開發板載入的是NandFlash上的檔案系統。
第一步,運行 usb_modeswitch -W
Target device description data
-------------------------
Manufacturer: HUAWEI TECHNOLOGIES
Product: HUAWEI Mobile
Serial No.:
-------------------------
Found correct target device
Mode switch succeeded. Bye.
Oh, Shit ! 竟然出現上面這些資訊,而且還沒有引起OOM Killer。於是reboot,再次usb_modeswitch -W,仍然沒有引起OOM Killer。太好了,似乎感覺馬上就能調好3G模組了。在 /dev/tts/ 目錄下多了 USB0、USB1、 USB2、 USB3這麼四個節點。
恩,試試 wvdial 吧。於是運行 wvdialconf /etc/wvdial.conf ,新問題又來了,就是上面的那個“問題2 ”。我的天啊,不要這麼折磨我好嗎,我好想趕緊寫論文啊!
堅持不懈的搜尋網上的解決辦法,終於看到這麼個標題《 [SOLVED] HSDPA Huawei E220 and wvdial: Device or resource busy》。此時,看到那個 [SOLVED]是多麼的讓我欣喜啊!引用其中的關鍵內容:
*********************************華麗的分割線****************************************
Hey, I just recently went through this and it nearly drove me nuts, had the 'device busy' problem even for root. After many, many days and several aneurysms I finally found my problem, maybe this will help you too.
It turned out that wvdial tries to create a lock file for the usb device in '/var/lock', but for some reason when I looked in '/var' I had no 'lock' directory. I checked my other Arch machine and it has a '/var/lock' directory, so I'm not sure where this
one disappeared to.
Soon as I created ' /var/lock ' wvdial worked perfectly. Hope this helps you out.
Cheers,
Wittfella
Last edited by Wittfella (2009-06-16 15:45:48)
----From
https://bbs.archlinux.org/viewtopic.php?id=74163
*********************************華麗的分割線****************************************
趕緊的查看自己的檔案系統,哦,的確沒有找到' /var/lock ',果斷建立吧。並且,手動的在 /dev 目錄下建立了 ttyUSB0 ttyUSB1 ttyUSB2 ttyUSB3這四個符號連結,分別對用 /dev/tts/ 目錄下的 USB0 USB1 USB2 USB3。重新運行 wvdialconf /etc/wvdial.conf 正確找到了 ttyUSB0 ,然後就是運行 wvdial
,一切OK, 撥號成功!
*********************************華麗的分割線****************************************
--> WvDial: Internet dialer version 1.61
--> Warning: section [Dialer [08]conf] does not exist in wvdial.conf.
--> Warning: section [Dialer /etc/wvdial.conf] does not exist in wvdial.conf.
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
OK
--> Modem initialized.
--> Sending: ATDT#777
--> Waiting for carrier.
ATDT#777
CONNECT 3100000
--> Carrier detected. Starting PPP immediately.
--> Starting pppd at Thu Jan 1 00:17:15 1970
--> Pid of pppd: 833
--> Using interface ppp0
--> pppd: [08]x[03]
--> pppd: [08]x[03]
--> pppd: [08]x[03]
--> pppd: [08]x[03]
--> pppd: [08]x[03]
--> pppd: [08]x[03]
--> local IP address 49.92.62.141
--> pppd: [08]x[03]
--> remote IP address 172.25.8.25
--> pppd: [08]x[03]
--> primary DNS address 218.2.135.1
--> pppd: [08]x[03]
--> secondary DNS address 61.177.7.1
--> pppd: [08]x[03]
Caught signal 2: Attempting to exit gracefully...
--> Terminating on signal 15
--> pppd: [08]x[03]
--> Connect time 0.5 minutes.
--> pppd: [08]x[03]
--> pppd: [08]x[03]
--> Disconnecting at Thu Jan 1 00:17:45 1970
#
*********************************華麗的分割線****************************************
痛苦的調試過程終於有了一些令人稍稍滿意的結果了。
好了,本文結束了,今後還會有其他調試記錄!
2012-05-04