はじめに
BeagleBoardにシリアル接続したいなぁと思ってたけど、USB-RS232Cケーブルが意外と高くて敬遠していた。
Amazonで安いのがあったのでチャレンジww
作業環境
Debian squeeze 6.0.1 (2.6.38.3)
購入したもの
変換名人 USB-RS232 \1,280 (今見たら\980だったwww)
ELECOM AD-R9 シリアルリバースアダプタ \567
いずれもAmazonで購入(送料無料なので助かるw)
結論から言うとアダプタは使わない。買う必要がなかった。ケーブルだけでOK
接続
とりあえず挿してみる
$ dmesg |tail [ 54.483038] usb 2-2: Manufacturer: Prolific Technology Inc. [ 55.318654] usbcore: registered new interface driver usbserial [ 55.318663] USB Serial support registered for generic [ 55.318685] usbcore: registered new interface driver usbserial_generic [ 55.318687] usbserial: USB Serial Driver core [ 55.321894] USB Serial support registered for pl2303 [ 55.321906] pl2303 2-2:1.0: pl2303 converter detected [ 55.333125] usb 2-2: pl2303 converter now attached to ttyUSB0 [ 55.333140] usbcore: registered new interface driver pl2303 [ 55.333142] pl2303: Prolific PL2303 USB to serial adaptor driver
ドライバとかインストールしないで、普通に認識・・・
ドライバが一番の難関だと思ってたから一気に楽勝ムードww
調べたら、2.4.10カーネル以降で標準で入ってるみたいです http://www.prolific.com.tw/eng/downloads.asp?id=31
Linux大好きです//
mimicom インストール
シリアル端末のminicomをインストール
$ sudo apt-get install minicom
設定する
$ minicom -s
+-----[configuration]------+ | Filenames and paths | | File transfer protocols | | Serial port setup | | Modem and dialing | | Screen and keyboard | | Save setup as dfl | | Save setup as.. | | Exit | | Exit from Minicom | +--------------------------+ Serial port setup を選んで +-----------------------------------------------------------------------+ | A - Serial Device : /dev/ttyUSB0 | | B - Lockfile Location : /var/lock | | C - Callin Program : | | D - Callout Program : | | E - Bps/Par/Bits : 115200 8N1 | | F - Hardware Flow Control : No | | G - Software Flow Control : No | | | | Change which setting? | +-----------------------------------------------------------------------+ 設定する Save setup as dfl で保存して、Exit
何かエラー出たw
minicom: cannot open /dev/ttyUSB0: Permission denied $ ls -l /dev/ttyUSB0 crw-rw---- 1 root dialout 188, 0 May 18 18:49 /dev/ttyUSB0 パーミッションを変更する $ sudo chmod a+rw /dev/ttyUSB0
もう一度設定
$ minicom -s
Exitすると
Welcome to minicom 2.4 OPTIONS: I18n Compiled on Sep 5 2010, 08:31:32. Port /dev/ttyUSB0 Press CTRL-A Z for help on special keys
BeagleBoardに電源投入
電源入れても何も表示されない・・・
試しにリバースアダプタ外したら表示されたwwwwwwwwwwwwwww
USB-RS232はリバース結線なのかなぁ(謎)
Texas Instruments X-Loader 1.5.0 (Mar 29 2011 - 09:06:55) Beagle xM Reading boot sector Loading u-boot.bin from mmc U-Boot 2011.03-rc1-00000-g9a3cc57-dirty (Apr 04 2011 - 12:36:16) OMAP3630/3730-GP ES2.0, CPU-OPP2, L3-165MHz, Max CPU Clock 1 Ghz OMAP3 Beagle board + LPDDR/NAND I2C: ready DRAM: 512 MiB NAND: 0 MiB MMC: OMAP SD/MMC: 0 *** Warning - readenv() failed, using default environment