Transcript PowerPoint
[LAB 4] Login BeagleBone Using Terminal log-in Software Connecting with VCP(Virtual COM Port) Connecting with SSH(Secure Shell Host) Command Line Manipulation Connecting with VCP Step1 Download terminal software. We using PuTTY in our exercise. Download it from our course website↓ http://ares.ee.nchu.edu.tw/nslab/putty.zip or from here↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ http://www.chiark.greenend.org.uk/~sgtatham/ putty/download.html Connecting with VCP Step2 Connecting Bone and PC via USB Cable and check the COM Number of your BeagleBone Connection. Connecting with VCP If you do not see the COM Port, install the VCP Driver. Download it from ↓↓↓↓↓↓↓↓↓↓ http://www.ftdichip.com/Drivers/VCP.htm or from course website ↓ ↓ ↓ ↓ ↓ ↓ ↓ http://ares.ee.nchu.edu.tw/nslab/vcpdrv.zip Connecting with VCP Step3 Start PuTTY Terminal function(beta 0.62) and set the configuration. Serial Line Baud rate(Speed) Connection type Give a name for current configuration. Save it and Open Connecting with VCP Step3 Press Enter and input root to login Connecting with SSH Step1 Download Advanced Port Scanner(v1.3) from http://ares.ee.nchu.edu.tw/nslab/pscan.zip or from http://www.radmin.tw/products/utilities.php and install. Step2 Download PuTTY Terminal function(beta 0.62) from http://ares.ee.nchu.edu.tw/nslab/putty.zip Connecting with SSH Step3 連結BeagleBone,進入網卡模式。 Step4 啟動Advanced Port Scanner,掃出 BeagleBone IP Add and SSH port NO. Connecting with SSH Step5 Step6 Step7 啟動PuTTY 輸入IP Add and Port No. SSH目錄中選擇X11做設定 Connecting with SSH Step8 X11配置如下圖。 Step9 回Session欄 儲存設定,然後點選 Open。 Step10 以root/root登 入。 Command Line Manipulation ls 列出當前路徑下的資料 ls –a 列出當前路徑下包含隱藏檔在內的所有 資料 ls –l 表列當前路徑下的資料 ls –al 表列當前路徑下包含隱藏檔在內的所有 資料 Command Line Manipulation cd/cd ~ 變更當前路徑至/home/root cd .. 回到上一層路徑 cd / 回到根目錄 cd [dir name] 切換路徑至該資料夾 Command Line Manipulation help [instruction] 呼叫說明文件; 引數內加入指令名稱以查詢指令細節。 Command Line Manipulation echo [arg] 將引數輸出至stdout cat [filename] 查閱檔案內容 Command Line Manipulation mkdir [dir name] 創建一個新資料夾,引數為資料夾路徑名稱 vi/vim [filename] Linux 內建的文字編輯器,引數為欲編輯的檔案名 稱,若不存在即會以該名稱創建新檔案 Command Line Manipulation vi/vim操作 一般模式 可閱讀文件,刪除字元、整行,做複製與貼上 等動作 Command Line Manipulation vi/vim操作 編輯模式: 在一般模式中按”insert” or i I a A r R 等字元進 入,左下會顯示INSERT 或 REPLACE,此時可 進行文件的編輯。 編輯模式中按esc可切回一般模式。 Command Line Manipulation vi/vim操作 指令模式: 一般模式下輸入: / ? 其中之一,即可 切換至指令模式。 Command Line Manipulation vi/vim操作 常用vim指令: :w : 寫入檔案。 :w! :強制寫入檔案(仍須視操作權限)。 :wq :寫入後離開。 :q! :不寫入強制離開。 Exercise Exercise 1: 至以下路徑 :/sys/devices/platform/leds-gpio/leds/beaglebone::usr3/ 檢視目錄下檔案,讀取brightness 內容。 更改brightness 狀態 觀察on board led變化 Exercise Exercise 2: 在Desktop上建立一個新目錄。 在該目錄下建立一個txt檔。 檔案內寫入學號 姓名 並且存檔退出。 讀取該檔案內容。