Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1222231
  • 博文数量: 105
  • 博客积分: 127
  • 博客等级: 入伍新兵
  • 技术积分: 962
  • 用 户 组: 普通用户
  • 注册时间: 2011-01-29 15:22
文章分类

全部博文(105)

文章存档

2021年(1)

2019年(3)

2018年(1)

2017年(11)

2016年(47)

2015年(32)

2014年(4)

2012年(6)

我的朋友

分类: LINUX

2015-06-23 12:10:22

1,linux音频测试
aplay -l 查看设备
录音
arecord -D hw:0,0 -f S16_LE -r 8000 -c 2 -d 3 -t wav record.wav 
播放
aplay -D plughw:0,0 record.wav
补充:
speaker-test -D hw:0,0 -c2 -r48000 
aplay  east123.wav  -D default:CARD=U0x4b40x307  //声卡名操作
alsamixer  -c 0/1/2/3  //方向键就可以操作 ,图形界面

/**************************************************************/
2,linux串口测试
minicom -D /dev/ttySP0 -b 115200

stty -a 查看所有终端设置
stty -F /dev/ttySP0 115200 raw
cat /dev/ttySP0  收数据
cat >/dev/ttySP0  发文件
echo "ispsubb" /dev/ttySP0  发数据

参考链接 
/**************************************************************/
3,linux查看CPU ,MEM
cat /proc/cpuinfo
cat /proc/meminfo
top
/**************************************************************/

4,linux查看USB,PCI
lsusb -tv
lspci -tv
lshw
/**************************************************************/

5,linux网络测试
ifconfig eth0 192.168.0.23 netmask 255.255.255.0
ifconfig eth0 hw ether xx:xx:xx:xx:xx:xx
ether表示以太网

ifconfig eth0 up
ifconfig eth0 down

ifconfig eth0 192.168.0.23 netmask 255.255.255.0 broadcast 192.168.0.255 hw ether xx:xx:xx:xx:xx:xx up  //一条命令

/**************************************************************/
6,linux can 测试
ip link set can1 up type can bitrate 50000
cansend can1 -i0x100 0x12 0x34 0x56 0x78
canecho can1 -v
/**************************************************************/

7,linux rtc设置与测试
date -s "2015-06-23 11:04:30"
hwclock -w
/**************************************************************/

8,linux SD 卡, U盘挂载查看
mount -t vfat /dev/xxxx /mnt/src
/**************************************************************/

9,linux input 设备命令方式查看
cat /dev/input/eventx
/**************************************************************/

10,linux 标准GPIO口,蜂鸣器,LED,PWM等命令方式 (类似以下方式)
echo  1 > beep  (目录不确定)
/**************************************************************/

11,linux pppd 2G,3G相关命令
pppd call gprs/cdma2000
at+csq? 查看信号
at+creg? 查看注册
at^sysinfo 查看状态
at+cpos?   查看是否识别到卡
atel 打开回显
at+sysinfo 查看所有状态

打挂断电话
AT+CDVxxxxxx
AT+CHV

atdxxxxx
ath

atdxxxxx
AT+CHUP 
/**************************************************************/

12,磁盘和分区
fdisk -l 查看所有分区
df -h 查看大小及使用情况
du --max-depth=1 查看文件夹大小

补充:

13,linux查看内核cmdline 

cat  /proc/cmdline 

14,linux I2C tools 
a, i2cdetect -y
b, i2cget -f -y  i2c-bus chip_addr  reg_addr
    i2cget -f -y  0 0x0a 0
c, i2cset -f -y  i2c-bus chip_addr  reg_addr  value
    i2cset -f -y  0 0x0a 0 1



阅读(5041) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~