CL-SOM-iMX8X: Yocto Linux: How-To Guide

From Compulab Mediawiki
Revision as of 08:18, 9 January 2020 by imported>Uri.mashiach
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Wireless interfaces

Admolition note.png The operations below requires root access.

CL-SOM-iMX8X features certified 802.11ac Wi-Fi and Bluetooth 4.2 interfaces (Intel 8265 chipset).

Wi-Fi

Before working with Wi-Fi, please, ensure that Wi-Fi antenna is connected.
For hardware setup and Wi-Fi antenna connection instructions please refer to evaluation kit hardware guide.
To start using Wi-Fi insert your network credentials into the following file:

/etc/wpa_supplicant.conf

Insert the network name into ssid field, password into psk field and key into the key_mgmt field (if your network uses key management).
The file should have the following content:

ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
update_config=1
  network={
      ssid="<the name of your internet acces point>"
      key_mgmt=WPA-PSK
      psk="<the password of your internet access point>"
   }

Execute the following commands to connect to the network.

root@cl-som-imx8x:~# wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant.conf -D nl80211
root@cl-som-imx8x:~# udhcpc -i wlan0

Bluetooth

Before working with Bluetooth, please, ensure that Wi-Fi antenna is connected.
For hardware setup and Bluetooth antenna connection instructions please refer to evaluation kit hardware guide.

To start bluetoothctl use the following command:

bluetoothctl

To start the scan process use the following commands:

[bluetooth]# default-agent
[bluetooth]# power on
[bluetooth]# scan on

Bluetooth device should be turned on and visible. Its MAC-adress and name should appear in bluetoothctl in following format:

[CHG] Device AA:BB:CC:DD:EE:FF Name: Device_Name

To pair with the Bluetooth device use the following command:

pair AA:BB:CC:DD:EE:FF

Where AA:BB:CC:DD:EE:FF is MAC-adress of the Bluetooth device.

To quit bluetoothctl use the following command:

[Device_Name]# quit

CPU frequency

Admolition note.png The operations below requires root access.

CPU frequency can be changed in one of the following methods:

Changing the scaling governor

Execute the following command to change scaling governor:

echo performance > /sys/devices/system/cpu/cpufreq/policy0/scaling_governor

Where perfomance is name of the scaling governor.

Execute the following command to see available scaling governors:

cat /sys/devices/system/cpu/cpufreq/policy0/scaling_available_governors

Execute the following command to see current scaling governor:

cat /sys/devices/system/cpu/cpufreq/policy0/scaling_governor

Changing CPU frequency

Admolition note.png CPU frequency can be changed only when userspace scaling governor is enabled.

Execute the following command to change scaling governor to userspace:

echo userspace > /sys/devices/system/cpu/cpufreq/policy0/scaling_governor

Execute the following command to see available CPU frequencies:

cat /sys/devices/system/cpu/cpufreq/policy0/scaling_available_frequencies

Execute the following command to select the CPU frequency 1.2GHz:

echo 1200000 > /sys/devices/system/cpu/cpufreq/policy0/scaling_setspeed

Execute the following command to see current CPU frequency:

cat /sys/devices/system/cpu/cpufreq/policy0/cpuinfo_cur_freq

CPU temperature

Execute the following command to see current CPU temperature:

cat /sys/class/thermal/thermal_zone0/temp

RTC

Admolition note.png The operations below requires root access.

Execute the following command to set the date and write it into the RTC do the following:

root@cl-som-imx8x:~# date -s "12 SEP 2019 10:00:00"
Thu Sep 12 10:00:00 UTC 2019
root@cl-som-imx8x:~# /sbin/hwclock --systohc
root@cl-som-imx8x:~# hwclock -w

Execute the following command to access the RTC time and date run:

root@cl-som-imx8x:~# hwclock
Thu Sep 12 10:00:48 2019  0.000000 seconds

See Also