Getting Started with ArmSoM-p2 pro
Introduction
Getting Started
This guide is designed for ArmSoM-p2pro. The purpose is to learn about ArmSoM-p2pro as well as how to prepare and set up for basic use.
Starting ArmSoM-p2pro for the first time
Prepare
ArmSoM-p2pro board
Power adapter
- Option 1, Type-C PD Charger (5V/2A)
- Option 2, POE Power
TF Card
3.3V USB to TTL module and DuPont line
Personal computer with Ubuntu and Windows operating systems installed
- Ubuntu PC, Optional, used to compile Linux source code
- Windows PC, For burning Android and Linux images
Image Files
Install OS
Install OS to eMMC
Please check this guide, Install rockchip flash tools under Windows/Linux/MacOS PC.
Install OS to TF
TF Cards We Tested Refer to: TFCardsWeTested
Please check this guide, Install rockchip tf tools under Windows/Linux.
Boot the board
- (Optional)if use SD Card boot,need into the socket on the board.
- (Optional) Use the USB to TTL serial cable to setup a connection between PC and ArmSoM-p2 pro board.
- Power on ArmSoM by adapter with type C port or PoE or DC power
- ArmSoM-p2 pro will start when the red power LED is lit. After a period of time, another blue LED lights up, the green LED starts flashing, and the development board starts successfully.
interface use
Access from the Host PC/Laptop
Option 1: SSH
Connect the network cable and enter ifconfig to obtain the corresponding inet addr
For example, at this moment, if you enter ifconfig, the IP address of eth0 is 192.168.100.105
check SSH connect
Option 2: Serial console
See Serial Console
Option 3: ADB
Connect the computer to the development board using a USB-typeC cable.
Using the burning tool provided by RK, you can not see the line "Found an ADB device" at the bottom.
On the Windows page, use the combined key of "Windows+R" to open the command terminal and type adb shell to see "root@linaro-alip:/#".
LED
On ArmSoM-p2 pro three-color LED is configured as LED class device. You can control the behavior mode of the blue LED and green LED by writing to /sys/class/leds/XXX/trigger. By default only root users can write to the device. The default mode of the blue LED is heartbeat.
root@rk3308_64:/# echo timer > /sys/class/leds/blue\:user/trigger
You can use cat on the trigger property to list all the available LED modes. The value in brackets is the currently active mode.
root@rk3308_64:/# cat /sys/class/leds/blue\:user/trigger [none] rfkill-any rfkill-none timer oneshot heartbeat default-on mmc1 mmc0 mmc2 rfkill0 rfkill1 rfkill2
In the None mode, writing to /sys/class/leds/blue:status/brightness can manually control the status of the blue LED.
root@rk3308_64:/# echo 0 > /sys/class/leds/blue\:user/brightness root@rk3308_64:/# echo 1 > /sys/class/leds/blue\:user/brightness
Ethernet
Look at network configure:
ifconfig
Test network:
ping www.baidu.com
If the network cable is connected, no IP address is assigned to the node.
dhclient eth0
WiFi/BT
To test the WIFI performance, we need to follow the steps: Run the command to check whether there is a wlan0 node
ifconfig -a
If no node executes command to load wifi ko file
insmod /system/lib/modules/bcmdhd.ko firmware_path=/system/etc/firmware/ nvram_path=/system/etc/firmware/
Check whether the Wi-Fi service process is started: ps Check whether the wpa_supplicant process exists
vi /data/cfg/wpa_supplicant.conf network={ ssid="ydtx" psk="YDTX123456" key_mgmt=WPA-PSK }
If it does not start, you can start it manually
wpa_supplicant -B -i wlan0 -c /data/cfg/wpa_supplicant.conf
The wpa_cli command communicates with the wpa_supplicant process, so make sure the wpa_supplicant process is running
wpa_cli -i wlan0 -p /var/run/wpa_supplicant scan wpa_cli -i wlan0 -p /var/run/wpa_supplicant scan_results
Connect router
wpa_cli -i wlan0 -p /var/run/wpa_supplicant reconfigure wpa_cli -i wlan0 -p /var/run/wpa_supplicant reconnect
After reconnect, you can use ifconfig to see the wifi IP address
To test the BT performance, we need to follow the steps:
The /usr/bin directory contains the BT initialization script
bt_init.sh
After executing the script, execute:
hciconfig hci0 up hciconfig –a
Under normal circumstances, you can see:
root@rk3308_64:/usr/bin# hciconfig -a BD Address: 57:CB:46:28:B8:2B
watchdog
The watchdog node is in the dev directory
open: open device node /dev/watchdog to enable the watchdog ioctl: WDIOC_SETTIMEOUT Sets the timeout period write: Feed the dog
Audio
View sound cards in the system.
root@linaro-alip:/# aplay -l **** List of PLAYBACK Hardware Devices **** card 0: rockchiprk3308a [rockchip,rk3308-acodec], device 0: dailink-multicodecs ff560000.acodec-0 [dailink-multicodecs ff560000.acodec-0] Subdevices: 1/1 Subdevice #0: subdevice #0 card 7: Loopback [Loopback], device 0: Loopback PCM [Loopback PCM] Subdevices: 8/8 Subdevice #0: subdevice #0 Subdevice #1: subdevice #1 Subdevice #2: subdevice #2 Subdevice #3: subdevice #3 Subdevice #4: subdevice #4 Subdevice #5: subdevice #5 Subdevice #6: subdevice #6 Subdevice #7: subdevice #7 card 7: Loopback [Loopback], device 1: Loopback PCM [Loopback PCM] Subdevices: 8/8 Subdevice #0: subdevice #0 Subdevice #1: subdevice #1 Subdevice #2: subdevice #2 Subdevice #3: subdevice #3 Subdevice #4: subdevice #4 Subdevice #5: subdevice #5 Subdevice #6: subdevice #6 Subdevice #7: subdevice #7
Specify the sound card to play audio fiile.
aplay -D hw:0,0 /mnt/test.wav
View all status of the built-in Codec gain
amixer contents
The audio output sound is too low
headset
View the current left and right channel output gain of the codec:
amixer cget name='DAC HPOUT Left Volume' amixer cget name='DAC HPOUT Right Volume'
Adjust the advance gain as desired:
amixer cset name='DAC HPMIX Left Volume' 1 amixer cset name='DAC HPMIX Right Volume' 1
Adjust the after-stage gain as desired:
amixer cset name='DAC HPOUT Left Volume' 18 amixer cset name='DAC HPOUT Right Volume' 18
Adjust volume (percentage) :
amixer cset name='Master Playback Volume' 40
trumpet
View the current left and right channel output gain of the codec:
amixer cget name='DAC LINEOUT Left Volume' amixer cget name='DAC LINEOUT Right Volume'
Adjust the advance gain as desired:
amixer cset name='DAC HPMIX Left Volume' 1 amixer cset name='DAC HPMIX Right Volume' 1
Adjust the after-stage gain as desired:
amixer cset name='DAC LINEOUT Left Volume' 3 amixer cset name='DAC LINEOUT Right Volume' 3
Adjust volume (percentage) :
amixer cset name='Master Playback Volume' 40
record
root@rk3308_64:/dev# cat /proc/asound/cards 0 [rockchiprk3308a]: rockchip_rk3308 - rockchip,rk3308-acodec rockchip,rk3308-acodec 7 [Loopback ]: Loopback - Loopback Loopback 1
card 0: rk3308b Built-in sound card
card 7: Virtual sound card generated by aloop
Acquisition of 8-channel sound card 0 audio data:
arecord -D hw:0,0 -c 8 -r 16000 -f S16_LE test.wav
When the sampling rate is greater than 16000hz, add the parameter --period-size=1024 --buffer-size=4096 to the recording command, for example:
arecord -D hw:0,0 -c 8 -r 44100 -f S16_LE --period-size=1024 --buffer-size=4096 test.wav
Storage device
Supports three types of storage devices
microSD card
/dev/mmcblk1
eMMC
/dev/mmcblk0
Others
Speech recognition development
Regarding the voice suite supported by ArmSoM-p2 pro open source motherboard, if customers need more in-depth business customization cooperation, they need to communicate with our company or the corresponding voice company.