RS232GPSModuleSignal
出自DebianWiki
//仍然為草稿,不周全之處請多見諒
目的:使用Linux環境讀取RS232 GPS模組訊號
1.Minicom 解法 minicom setup
minicom -s
- modem and dialing全部欄位清空。
- Serial Port setup
- Serial Device: /dev/ttyS0 #USB ttyUSB0 ,Serial Port ttyS0
- Bps/Par/Bits: 4800 8N1 # 視GPS device 協定而定(這裡是範例為NMEA),
- 8N1 N : Noflowcontrol,1 : start bit 1。
- Save setup as dfl
- ctrl +a q #離開
- 再執行一次minicom
2.stty解法
stty - change and print terminal line settings (man stty)
- 看目前環境
root shell >stty -a /dev/ttyUSB0 #USB ttyUSB0 ,Serial Port ttyS0
- 設定速度
root shell>stty -F /dev/ttyUSB0 ispeed 4800 ospeed 4800
ispeed ,標準輸入裝置的速度 。ospeed ,標準輸出裝置的速度
- 看資料
root shell>cat /dev/ttyUSB0
因為Unix 系統將每一個裝置視為一個系統檔案
![[Main Page]](/upload/4/49/Debian_taiwan_out.png)