Connector | Function |
---|---|
X19 | Microphone |
X20 | Line In |
X21 | Line Out |
Play Audio on MBa6x
A simple test sound can be played with the commandline tool speaker-test.
Headphones or active speakers have to be connected to X21 on MBa6x.
speaker-test --channels 2 --test wav
You can also play your own audio files using aplay
aplay <file>
e.g.
aplay test.wav
Record Audio via Line-In on MBa6x
arecord -f cd test.wav
amixer
or alsamixer
The STKa6x Starterkit provides two Gigabit Ethernet interfaces.
In U-Boot eth0 is configured as default interface. The IP configuration can be done statically or by a DHCP server in the network.
IP configuration via DHCP
For a configuration via a DHCP server, use the dhcp
command in U-Boot.
Static IP configuration For a static IP configuration the following, U-Boot environment variables must be set:
setenv ipaddr <ipaddr> (e.g.: setenv ipaddr 192.168.100.111) setenv netmask <netmask> (e.g.: setenv netmask 255.255.255.0)
Both Ethernet interfaces are activated and configured by systemd-network. The configuration files for interfaces are located in /lib/systemd/network/ these configuration files can be altered to customize the default interface configuration. A documentation of the configuration files can be found here.
eth0 | 10-eth0.network |
eth1 | 10-eth1.network |
For a temporary static configuration the ip command can be used, below some useful ip commands are listed:
Activate a specific interface
e.g. eth0
ip link set eth0 up
Disable a specific interace
e.g. eth0
ip link set eth0 down
Show ip address for a specific interface
e.g. eth0
ip addr show eth0
Show statistic for a specific interface
e.g. eth0
ip -s link show eth0
Set ip address for a specific interface
e.g. eth0
ip addr add 192.168.1.100/24 dev eth0
Show statistic of all interfaces
ip -s link
Set default gateway for a specific interfaces
e.g. set gateway ip 192.168.1.1 for eth0
ip route add default via 192.168.1.1 dev eth0
If a DHCP server is available in the network environment the ip configuration can be received from it. To do so execute the udhcpc
command, by default eth0 is used.
To configure another interface via dhcp the parameter -i
followed by the interface name e.g. eth1 must be given.
e.g. eth1
udhcpc -i eth1
The STKa6x supports HDMI. The Display can be used on its own by using the corresponding device tree. To allow reusage, the support for each display is separated in a dtsi fragment.
To bring up the display the U-Boot environment has to be adapted accordingly.
setenv fdt_file imx6qp-mba6b-hdmi.dtb
saveenv
command
To set the hardware clock to the actual time and date use the following commands:
date -s [YYYY.]MM.DD-hh:mm[:ss] hwclock -w
The MBa6x has one SPI interfaces. They can be found on the extension headers and can be tested with a loopback test.
Interface | linux filesystem |
---|---|
SPI1 | /dev/spidev0.1 |
For the loopback test you need a bridge between SPI_MOSI and SPI_MISO:
echo -n -e "\x01\x0F" | spi-pipe -d <spi interface> -s 10000000 | hexdump (e.g. echo -n -e "\x01\x0F" | spi-pipe -d /dev/spidev1.0 -s 10000000 | hexdump)
The STKa6x has no external temperature sensor.
The i.MX6 CPU has an internal TMU that supports one thermal zone, it can be read by the commands below:
Thermal zone0
cat /sys/devices/virtual/thermal/thermal_zone0/hwmon0/temp1_input
With lsusb
you can see all connected usb devices. To mount a partition of an usb stick you can excute mount /dev/<partition> <mount dir>
(e.g. mount /dev/sdb1 /mnt)
. This will mount the first partition of sdb to /mnt. To unmount the device execute umount <mount dir>
(e.g. umount /mnt
).
The MBa6ulx has two user controllable LEDs, the behavior of these LEDs can be selected by several triggers.
Reference | LED name | color | linux filesystem |
---|---|---|---|
V15 | led1 | green | /sys/class/leds/led1 |
V16 | led2 | green | /sys/class/leds/led2 |
The user LED's are located in /sys/devices/soc0/gpio-leds/leds.
To change the behaviour a specific LED, the value in the file trigger must be overwritten.
The following values are valid:
For example set the trigger of led1 to heartbeat
echo heartbeat > /sys/class/leds/led1/trigger