星期二, 4月 21, 2015

Serial Port 相關名詞

參考資料
Serial Port
RD (Rx) : Received Data 接收傳進來的資料
TD (Tx) : Transmited Data 傳送訊號
DTR : Data Terminal Ready 資料終端備妥
DSR : Data Set Ready 已準備好開始接收資料
RTS : Request To Send 要求開始傳送資料
CTS : Clear To Send 資料已經清除
Xon/Xoff : ??
BaudRate : 傳輸速率 : 一秒傳幾個Baud, 通常是1200的倍數, 意旨每一秒所能產生的最大電壓改變率
Parity : 同位元檢查
DataBits : 資料長度
StopBits : 資料停止位元

通訊模式

  1. 純發送模式
  2. 純接收模式
  3. 發送回應模式
  4. 接收回應模式

星期六, 4月 18, 2015

Raspberry Pi serial port 設定

為了在Raspberry Pi上寫程式聽serial port
必須將os預設開啟此連接阜請轉到os主控台功能關閉
我只關了login, 沒有關啟動資訊

參考url
Raspberry Pi and the Serial Port

1.關閉serial port login
修改/etc/inittab
T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100
註解掉
#T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100

2.關閉啟動資訊 Bootup Info
修改/boot/cmdline.txt
拿掉
console=ttyAMA0,115200 kgdboc=ttyAMA0,115200


Debian 停用桌面環境

參考網頁
http://reader.roodo.com/fox/archives/10667689.html

修改/etc/X11/default-display-manager
將內容整個清空
就算將/usr/sbin/gdm3註解掉也沒用

Debian 版本 7.8 32bit