ubuntu7.10使用usb轉串口問題

       手裏有一塊pxa255的開發板,已經是成品。由於提供商提供的bootloader是firmboot的二進制文件,雖然後來也提供了該部分的源代碼,但是需要據說需要用wince4.2來編譯才能進行修改代碼,考慮到wince的龐大(以前作培訓時用過一段時間),而且該bootloader只能在win下進行燒寫,內核和文件系統也只能在win下下載,在linux下不能被識別。
    所以就考慮移植下uboot到該開發板上,首先遇到的問題就是在ubuntu7.10發行版的linux上usb轉串口不太好用(用的是筆記本電腦,沒有串口),經歷如下:
  將usb連接線和開發板連好,插入電腦,用dmesg查看該設備是否被檢測到:  
[   70.676000] usb 2-2: new full speed USB device using uhci_hcd and address 3
[   70.836000] usb 2-2: configuration #1 chosen from 1 choice
[   70.968000] usbcore: registered new interface driver usbserial
[   70.968000] /build/buildd/linux-source-2.6.22-2.6.22/drivers/usb/serial/usb-serial.c: USB Serial support registered for generic
[   70.968000] usbcore: registered new interface driver usbserial_generic
[   70.968000] /build/buildd/linux-source-2.6.22-2.6.22/drivers/usb/serial/usb-serial.c: USB Serial Driver core
[   70.980000] /build/buildd/linux-source-2.6.22-2.6.22/drivers/usb/serial/usb-serial.c: USB Serial support registered for pl2303
[   70.980000] pl2303 2-2:1.0: pl2303 converter detected
[   70.980000] usb 2-2: pl2303 converter now attached to ttyUSB0
[   70.980000] usbcore: registered new interface driver pl2303
  可以看出內核檢測到該設備並且將pl2303的模塊加載到ttyUSB0上。
  在minicom中設置串口設備爲ttyUSB0,波特率爲115200 ,無奇偶校驗,無流控制,並保存
  開發板上電,輸出了沒有幾行信息就不再輸出,查看內核日誌:dmesg|tail -10

[ 1498.524000] pl2303 2-2:1.0: device disconnected
[ 1498.636000] usb 2-2: new full speed USB device using uhci_hcd and address 8
[ 1498.796000] usb 2-2: configuration #1 chosen from 1 choice
[ 1498.800000] pl2303 2-2:1.0: pl2303 converter detected
[ 1498.800000] usb 2-2: pl2303 converter now attached to ttyUSB0
[ 1589.244000] hub 2-0:1.0: port 2 disabled by hub (EMI?), re-enabling...
[ 1589.244000] usb 2-2: USB disconnect, address 8

  
  可以看出該設備不斷的被禁止,然後斷開,這個應該就是串口不能真正輸出數據的原因所在了。
  另外在fedora8中不存在該問題,而且在win下也能使用。
  搜索了一下資料,發現也沒有對該問題明確的解釋;不知道是不是7.10存在的bug還是不能完全支持我的usb轉串口設備。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章