串口LinkIt Smart 7688 串口连接
screen 命令
一、串口连接
P9 -- UART_RXD2
P8 -- UART_TXD2
使用USB转TTL 模块将 TXD 、 RXD、GND 和 7688模块连接即可。
将USB装TTL 模块和电脑连接。
打开Terminal,
$ls /dev/cu*
即可以,看到对应的USB 串口,本文中的,USB 是 cu.usbserial
二、screen
screen 是linux中一个很强大的指令。可以参考官网(http://www.gnu.org/software/screen/)
系统管理员经常需要SSH 或者telent 远程登录到Linux 服务器,经常运行一些需要很长时间才能完成的任务,比如系统备份、ftp 传输等等。通常情况下我们都是为每一个这样的任务开一个远程终端窗口,因为它们执行的时间太长了。必须等待它们执行完毕,在此期间不能关掉窗口或者断开连接,否则这个任务就会被杀掉,一切半途而废了。GNU Screen是一款由GNU计划开发的用于命令行终端切换的自由软件。用户可以通过该软件同时连接多个本地或远程的命令行会话,并在其间自由切换。GNU Screen可以看作是窗口管理器的命令行界面版本。它提供了统一的管理多个会话的界面和相应的功能。
LinkIt 7688 UART 波特率为 57600bit/s
在Terminal 中输入
$screen /dev/cu.usbserial 57600
即可以连接到openwrt,给7688 上电,信息如下:
BusyBox v1.23.2 (2015-11-18 16:34:33 CET) built-in shell (ash)
_______ ________ __
| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| W I R E L E S S F R E E D O M
-----------------------------------------------------
CHAOS CALMER (15.05+linkit, r47501)
-----------------------------------------------------
* 1 1/2 oz Gin Shake with a glassful
* 1/4 oz Triple Sec of broken ice and pour
* 3/4 oz Lime Juice unstrained into a goblet.
* 1 1/2 oz Orange Juice
* 1 tsp. Grenadine Syrup
-----------------------------------------------------
root@mylinkit:/#
哇塞,至此 登录成功。
三、系统信息
root@mylinkit:/# uname -a
Linux mylinkit 3.18.21 #5 Fri Nov 20 12:43:14 CET 2015 mips GNU/Linux
root@mylinkit:/# cat /proc/cpuinfo
system type : MediaTek MT7688 ver:1 eco:2
machine : MediaTek LinkIt Smart 7688
processor : 0
cpu model : MIPS 24KEc V5.5
BogoMIPS : 385.84
wait instruction : yes
microsecond timers : yes
tlb_entries : 32
extra interrupt vector : yes
hardware watchpoint : yes, count: 4, address/irw mask: [0x0ffc, 0x0ffc, 0x0ffb, 0x0ffb]
isa : mips1 mips2 mips32r1 mips32r2
ASEs implemented : mips16 dsp
shadow register sets : 1
kscratch registers : 0
package : 0
core : 0
VCED exceptions : not available
VCEI exceptions : not available
root@mylinkit:/# df -h
Filesystem Size Used Available Use% Mounted on
rootfs 11.0M 424.0K 10.6M 4% /
/dev/root 19.8M 19.8M 0 100% /rom
tmpfs 61.8M 236.0K 61.5M 0% /tmp
/dev/mtdblock6 11.0M 424.0K 10.6M 4% /overlay
overlayfs:/overlay 11.0M 424.0K 10.6M 4% /
tmpfs 512.0K 0 512.0K 0% /dev
root@mylinkit:/#
|