红联Linux门户
Linux帮助

ubuntu系统安装minicom实现开发板链接(非虚拟机下)

发布时间:2015-11-05 15:30:48来源:linux网站作者:none_piece

注:开发板为cortex A8
ubuntu:desktop 版15.10 32位


1:安装minicom
#apt-get install minicom


2:在终端输入: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/ ttyS0                             
| 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?                              

这里我们直接使用串口:ttyS0
用u转串:ttyUSB0
波特率:115200 8N1
F,G都是no


3:Enter推出界面
选择:save setup as dfl
exit

Welcome to minicom 2.7

OPTIONS: I18n                                                               
Compiled on Jan  1 2014, 17:13:22.                                          
Port /dev/ttyS0, 12:38:11                                                   
                                                                            
Press CTRL-A Z for help on special keys                                 
这是切不可按X推出,否则会在/dev/lock下产生几个LCK
文件,但是删掉即可
退出:按ctrl+a->z->x正常退出


4:通过串口xmodem协议烧写程序,所以还要安装软件包
#apt-get install lrzsz


5:这时,打开ubuntu终端
#nano /etc/network/interfaces

# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
auto enp4s0f0
iface enp4s0f0 inet static
address 192.168.191.5
gateway 192.168.191.254
netmask 255.255.255.0

把dhcp改成static
(若要上网,还要改回dhcp)
保存推出
使更改生效:
#sudo /etc/init.d/networking force-reload
#sudo /etc/init.d/networking restart


6:#ifconfig
查看配置是否生效


7:进入minicom
#sudo minicom
用串口线连接开发板,网线连接开发板
接通开发板电源
可以看到开发板跑起来了。
但是开发板和ubuntu还不能互联


8:此时在minicom端设置ip和网关,网段和ubuntu的一样
                                                     
#ifconfig eth0 192.168.191.4
#route add default gw 192.168.191.254


9:这时ping ubuntu的ip:ping 192.168.191.5
可以看到已经ping通了;


10:最后想说一下心得:对于ubuntu的版本,本人在ubuntu kylin版折腾了很久,却发现bug一大堆。解决这些bug要很多时间。


ACE版虚拟机linux下usb转串口minicom与s3c6410通信:http://www.linuxdiyf.com/linux/15404.html

ubuntu下的超级终端minicom:http://www.linuxdiyf.com/linux/14196.html

minicom在虚拟机(linux)安装配置过程:http://www.linuxdiyf.com/linux/13960.html

Ubuntu12.04下minicom配置,与ARM通信:http://www.linuxdiyf.com/linux/13636.html

Ubuntu下安装配置minicom并实现通过minicom传输文件:http://www.linuxdiyf.com/linux/8461.html