9
VIA SOM-9X35-STK Yocto 3.1 EVK Quick Start Guide
To set up the Mic-in audio recording, use the following command:
root@aiv8365m1v1-aiot-emmc:~# setup_mic
root@aiv8365m1v1-aiot-emmc:~# arecord -D hw:0,3 -f S16_LE -r 16000 /data/sda1/t1.wav
3.8
Camera
To preview an image from the CSI camera, use the following command:
root@aiv8365m1v1-aiot-emmc:~# gst-launch-1.0 v4l2src device="/dev/video5" ! video/x-raw,form
at=YUY2,width=1920,height=1080,framerate=30/1 ! videoconvert ! glimagesink sync=false
To capture an image from the CSI camera, use the following command:
root@aiv8365m1v1-aiot-emmc:~# gst-launch-1.0 v4l2src device="/dev/video5" io-mode=dmabuf
num-buffers=1 ! video/x-raw,format=YUY2,width=1920,height=1080 ! jpegenc ! filesink location=/
data/sda1/t1.jpg
To record a video file from the CSI camera, use the following command:
root@aiv8365m1v1-aiot-emmc:~# gst-launch-1.0 v4l2src device="/dev/video5" num-
buffers=300 io-mode=dmabuf ! video/x-raw,format=YUY2,width=1920,height=1080,framera
te=30/1 ! v4l2video2convert output-io-mode=dmabuf-import capture-io-mode=dmabuf ! video/x-
raw,format=NV12 ! v4l2h264enc output-io-mode=dmabuf-import ! avimux ! filesink location=/
data/sda1/t1.avi
To playback a record video file from the CSI camera, use the following command:
root@aiv8365m1v1-aiot-emmc:~# gst-launch-1.0 -q playbin uri=file:/data/sda1/t1.avi flags=0x42
video-sink="mtkmdp width=640 height=480 ! video/x-raw,format=I420 ! mtkwaylandsink" audio-
sink="autoaudiosink"
3.9 Wi-Fi
To verify the Wi-Fi function, use the following command:
root@aiv8365m1v1-aiot-emmc:~# wpa_cli -i wlan0 -p /tmp/wpa_supplicant add_network
root@aiv8365m1v1-aiot-emmc:~# wpa_cli -i wlan0 -p /tmp/wpa_supplicant set_network 0 ssid
'"via_test"'
root@aiv8365m1v1-aiot-emmc:~# wpa_cli -i wlan0 -p /tmp/wpa_supplicant set_network 0 psk
'"12345678"'
root@aiv8365m1v1-aiot-emmc:~# wpa_cli -i wlan0 -p /tmp/wpa_supplicant set_network 0 key_mgmt
WPA-PSK
root@aiv8365m1v1-aiot-emmc:~# wpa_cli -i wlan0 -p /tmp/wpa_supplicant select_network 0
Note:
Must change the Wi-Fi AP "'ssid"' and "'psk"' to the desired values. The '"via_test"' and '"12345678"' are in this
example.
To verify if the Wi-Fi connection is workable, enable the interface, with the following command:
root@aiv8365m1v1-aiot-emmc:~# udhcpc -b -i wlan0
udhcpc: started, v1.31.1
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending select for 192.168.0.100
udhcpc: lease of 192.168.0.100 obtained, lease time 3600
/etc/udhcpc.d/50default: Adding DNS 8.8.8.8