LTT-MX8M-EVM100 开发板 linux 4.14.98使用手册
跳到导航
跳到搜索
目录
阅读指导
蓝色字体为调试终端的信息,其中 “ # ” 或“ > ”开头的为用户输入的指令。
# cd ~/work > boot
SD卡测试
系统启动后将SD卡插入到Micro SD卡槽【J26】中,系统会自动将其挂载到/run/media目录下,在插入SD卡的同时,在系统终端会打印出SD卡相关信息:
[ 418.785224] mmc1: host does not support reading read-only switch, assuming write-enable [ 418.931992] mmc1: new ultra high speed SDR104 SDHC card at address 0007 [ 418.940000] mmcblk1: mmc1:0007 SD32G 29.0 GiB [ 418.947404] mmcblk1: p1 [ 419.146762] FAT-fs (mmcblk1p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
可通过df命令查看SD卡挂载位置:
# df -h Filesystem Size Used Avail Use% Mounted on /dev/root 2.3G 1.9G 235M 89% / devtmpfs 237M 4.0K 237M 1% /dev tmpfs 494M 0 494M 0% /dev/shm tmpfs 494M 8.5M 485M 2% /run tmpfs 494M 0 494M 0% /sys/fs/cgroup tmpfs 494M 0 494M 0% /tmp tmpfs 494M 156K 493M 1% /var/volatile /dev/mmcblk0p1 64M 41M 24M 64% /run/media/mmcblk0p1 tmpfs 99M 0 99M 0% /run/user/0 /dev/mmcblk1p1 29G 2.3G 27G 8% /run/media/mmcblk1p1
可通过如下命令查看、读写当前SD卡的内容:
# ls /run/media/mmcblk2p1/ #查看SD卡的内容 # cd /run/media/mmcblk2p1/ #进入SD卡目录 # touch test #创建test文件 # rm test #删除test文件
USB HOST 测试
以U盘为例,将U盘插入USB HOST接口【J20、J21、J22、J23】其中任意一个,系统会默认将U盘挂载在/run/media目录下,并打印如下消息:
[ 766.582245] usb 1-1.4: new high-speed USB device number 7 using xhci-hcd [ 766.700039] usb-storage 1-1.4:1.0: USB Mass Storage device detected [ 766.711958] scsi host0: usb-storage 1-1.4:1.0 [ 767.744766] scsi 0:0:0:0: Direct-Access Generic Flash Disk 8.07 PQ: 0 ANSI: 4 [ 767.755868] sd 0:0:0:0: [sda] 15728640 512-byte logical blocks: (8.05 GB/7.50 GiB) [ 767.764424] sd 0:0:0:0: [sda] Write Protect is off [ 767.770329] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA [ 767.785294] sda: sda1 [ 767.791353] sd 0:0:0:0: [sda] Attached SCSI removable disk [ 768.254786] FAT-fs (sda1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
可通过df命令查看U盘挂载位置:
# df -h Filesystem Size Used Avail Use% Mounted on /dev/root 2.3G 1.9G 235M 89% / devtmpfs 237M 4.0K 237M 1% /dev tmpfs 494M 0 494M 0% /dev/shm tmpfs 494M 8.5M 485M 2% /run tmpfs 494M 0 494M 0% /sys/fs/cgroup tmpfs 494M 0 494M 0% /tmp tmpfs 494M 168K 493M 1% /var/volatile /dev/mmcblk0p1 64M 41M 24M 64% /run/media/mmcblk0p1 tmpfs 99M 0 99M 0% /run/user/0 /dev/sda1 7.5G 1.7G 5.9G 22% /run/media/sda1
通过如下命令查看、读写U盘内容:
# ls /run/media/sda1/ #查看U盘的内容 # cd /run/media/sda1/ #进入U盘目录 # touch test #创建test文件 # rm test #删除test文件
以太网测试
使用网线将开发板的网口【P3】与PC机的网口连接,设置PC机的IP地址为192.168.1.115,子网掩码为:255.255.255.0
配置开发板的网络,如下:
# ifconfig eth0 192.168.1.200 netmask 255.255.255.0 #配置开发板IP地址与PC机在同一网段 # ping 192.168.1.115 #通过ping命令进行本地网络测试
如需连接外网,需根据路由器网关进行配置,如下:
# route add default gw 192.168.1.1 #设置默认路由网关 # ping www.baidu.com #通过ping命令进行互联网测试
串口测试
录音/播放测试
测试前将耳机与MIC分别插入对应的连接器。
录音测试
# arecord -Dhw:0,0 -d 10 -f cd -r 44100 -c 2 -t wav test.wav
播放测试
# aplay test.wav
注意:aplay不能播放MP3
多媒体播放测试
使用gplay-1.0播放器进行测试,gplay-1.0使用说明:
- h 显示操作帮助
- p 播放命令
- s 停止命令
- a 暂停/继续命令
- v 音量设置
- m 静音或去除静音
- >下一个视频文件
- <上一个视频文件
- r 重复播放或单次播放
- t 旋转视频播放
- i 多媒体文件信息。
测试方法
# gplay-1.0 /unit_tests/test.mp4 #MP4播放 # gplay-1.0 /unit_tests/test.mp3 #MP3播放
时钟测试
通过向RTC写/读时间,以及断电,重启后查看系统时间同步情况来验证RTC功能
开发板【J16】安装装纽扣电池
- 查看系统时间:
# date Mon Aug 12 05:18:57 UTC 2019 #当前系统时间
- 查看硬件时间:
# hwclock Mon Aug 3 06:28:06 2019 0.000000 seconds #当前硬件时间
- 设置系统时间:
# date -s "2019-10-10 09:51:50" Thu Oct 10 09:51:50 UTC 2019 #设置系统时间
- 将系统时间写入硬件时间:
# hwclock -w #同步硬件时间
断电重启后,查看系统时间和硬件时间,时间同步说明设置成功。
4G测试
开发板适配EC20模块,连接到USB HOST接口,出现如下打印信息,表示设备被识别
[ 417.527881] usb 1-1.3: new high-speed USB device number 7 using xhci-hcd [ 417.658627] option 1-1.3:1.0: GSM modem (1-port) converter detected [ 417.665572] usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB0 [ 417.673175] option 1-1.3:1.1: GSM modem (1-port) converter detected [ 417.683067] usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB1 [ 417.690636] option 1-1.3:1.2: GSM modem (1-port) converter detected [ 417.700455] usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB2 [ 417.707938] option 1-1.3:1.3: GSM modem (1-port) converter detected [ 417.717527] usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB3
- 拨号上网
# pppd call quectel-ppp
串口输出如下信息:
pppd options in effect: debug # (from /etc/ppp/peers/quectel-ppp) persist # (from /etc/ppp/peers/quectel-ppp) maxfail 0 # (from /etc/ppp/peers/quectel-ppp) dump # (from /etc/ppp/peers/quectel-ppp) noauth # (from /etc/ppp/peers/quectel-ppp) user card # (from /etc/ppp/peers/quectel-ppp) password ?????? # (from /etc/ppp/peers/quectel-ppp) remotename 3gppp # (from /etc/ppp/peers/quectel-ppp) /dev/ttyUSB3 # (from /etc/ppp/peers/quectel-ppp) 115200 # (from /etc/ppp/peers/quectel-ppp) lock # (from /etc/ppp/peers/quectel-ppp) connect chat -s -v -f /etc/ppp/peers/quectel-chat-connect # (from /etc/ppp/peers/quectel-ppp) disconnect chat -s -v -f /etc/ppp/peers/quectel-chat-disconnect # (from /etc/ppp/peers/quectel-ppp) nocrtscts # (from /etc/ppp/peers/quectel-ppp) local # (from /etc/ppp/peers/quectel-ppp) lcp-echo-failure 12 # (from /etc/ppp/peers/quectel-ppp) lcp-echo-interval 5 # (from /etc/ppp/peers/quectel-ppp) hide-password # (from /etc/ppp/peers/quectel-ppp) ipcp-accept-local # (from /etc/ppp/peers/quectel-ppp) ipcp-accept-remote # (from /etc/ppp/peers/quectel-ppp) ipparam 3gppp # (from /etc/ppp/peers/quectel-ppp) noipdefault # (from /etc/ppp/peers/quectel-ppp) ipcp-max-failure 10 # (from /etc/ppp/peers/quectel-ppp) defaultroute # (from /etc/ppp/peers/quectel-ppp) usepeerdns # (from /etc/ppp/peers/quectel-ppp) noccp # (from /etc/ppp/peers/quectel-ppp)
- 使用ifconfig -a指令查看是否有ppp0设备,如果有说明拨号成功
# ifconfig -a
ppp0 Link encap:Point-to-Point Protocol inet addr:10.250.22.175 P-t-P:10.64.64.64 Mask:255.255.255.255 UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1 RX packets:9 errors:0 dropped:0 overruns:0 frame:0 TX packets:14 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:3 RX bytes:374 (374.0 B) TX bytes:700 (700.0 B
- 使用Ping指令测试网络
# ping www.baidu.com
M.2接口测试
BT测试
开发板提供⼀个WiFi/BT模块Fn-link6222b,wifi型号为QCA6714,蓝牙是串口模块,与 ttymxc2相连,本章用开发板蓝牙连接PC端蓝牙来测试蓝牙功能
测试前连接天线到U5,以免信号弱导致无法连接
- 绑定串口
- 使用hciattch命令 来绑定ttymxc2串口,命令如下
rtk_hciattach -n -s 115200 ttymxc2 rtk_h5 &
- 打开wlan
- 可以用rfkill unblock 0 或者rfkill unblock wlan。 测试时,请先关闭wlan,再打开
# rfkill list 0: hci0: bluetooth Soft blocked: yes Hard blocked: no # rfkill unblock bluetooth # rfkill list 0: hci0: bluetooth Soft blocked: no Hard blocked: no
- 连接蓝牙
- 使用bluetoothctl工具来控制蓝牙进行扫描和连接。
功能 | 指令 |
---|---|
扫描 | scan on |
查看扫描设备 | devices |
配对 | pair |
连接 | connect |
# bluetoothctl Agent registered [bluetooth]# scan on Discovery started [CHG] Controller 0C:9A:42:5D:43:23 Discovering: yes [NEW] Device 38:E6:0A:58:25:BD LTT [NEW] Device 30:AE:A4:2B:99:C1 30-AE-A4-2B-99-C1 [NEW] Device 5B:6E:C4:1F:52:45 VISG20000008636 [NEW] Device 55:19:AD:39:69:2F 55-19-AD-39-69-2F [NEW] Device 88:2D:53:94:68:A1 xiaodu-A2-1171 [bluetooth]# devices Device 43:84:80:8E:20:FC 43-84-80-8E-20-FC Device 30:AE:A4:2B:99:C1 30-AE-A4-2B-99-C1 Device 5B:6E:C4:1F:52:45 VISG20000008636 Device 55:19:AD:39:69:2F 55-19-AD-39-69-2F Device 38:E6:0A:58:25:BD LTT [bluetooth]# pair 38:E6:0A:58:25:BD Attempting to pair with 38:E6:0A:58:25:BD [CHG] Device 38:E6:0A:58:25:BD Connected: yes Request confirmation [agent] Confirm passkey 776119 (yes/no): yes [ LTT]#
- 输入quit退出bluetoothctl工具