Ubuntu Core with Qt-Embedded
- 1 Introduction
- 2 Download Image Files
- 3 Work with Ubuntu Core
- 4 Develop Qt Application
- 5 Q & A
- 6 Update Log
Ubuntu Core with Qt-Embedded is a light Linux system without X-windows. It uses the Qt-Embedded's GUI and is popular in industrial and enterprise applications.
Besides the regular Ubuntu core's features our Ubuntu-Core has the following additional features:
- it supports our LCDs with both capacitive touch and resistive touch(S700, X710, HD702, S430, HD101 and S70)
- it supports WiFi
- it supports Ethernet
- it supports Bluetooth and has been installed with bluez utilities
- it supports audio playing
Download Image Files
You can download an image file for a board on the board's wiki page
Work with Ubuntu Core
Ubuntu-Core's User Accounts
- If your board is connected to an HDMI monitor you need to use a USB mouse and keyboard.
- If you need to do kernel development you need to connect a serial communication board to your board and access your board from a serial terminal.
- UbuntuCore User Accounts:
User Name: pi Password: pi
User Name: root Password: fa
The system is automatically logged in as "pi". You can do "sudo npi-config" to disable auto login.
- Update packages
$ sudo apt-get update
Configure System with npi-config
The npi-config is a commandline utility which can be used to initialize system configurations such as user password, system language, time zone, Hostname, SSH switch , Auto login and etc. Type the following command to run this utility.
$ sudo npi-config
Extend TF Card's Section
When Ubuntu is loaded the TF card's section will be automatically extended.You can check the section's size by running the following command:
$ df -h
You can use the NetworkManager utility in Ubuntu to manager its network. You can run "nmcli" in the commandline utility to start it. Here are the commands to start a WiFi connection:
- Check device list
sudo nmcli dev
Note: if the status of a device is "unmanaged" it means that device cannot be accessed by NetworkManager. To make is accessed you need to clear the settings under "/etc/network/interfaces" and reboot your system.
- Start WiFi
sudo nmcli r wifi on
- Scan Surrounding WiFi Sources
sudo nmcli dev wifi
- Connect to a WiFi Source
sudo nmcli dev wifi connect "SSID" password "PASSWORD"
The "SSID" and "PASSWORD" need to be replaced with your actual SSID and password.If you have multiple WiFi devices you need to specify the one you want to connect to a WiFi source with iface
If a connection succeeds it will be automatically setup on next system reboot.
For more details about NetworkManager refer to this link: Use NetworkManager to configure network settings
If a board is connected to a network via Ethernet before it is powered on it will automatically obtain an IP with DHCP activated after it is powered up. If you want to set up a static IP refer to: Use NetworkManager to configure network settings。
If your board has an onboard bluetooth module you can search for surrounding bluetooth devices by running the following command:
You can run "hciconfig" to check bluetooth's status.
You can play an audio file by running the following command:
aplay -t raw -c 2 -f S16_LE -r 44100 /root/test.pcm
Run Qt Demo
Run the following command
$ sudo /opt/QtE-Demo/run.sh
Setup Program to AutoRun
You can setup a program to autorun on system boot with npi-config:
Go to Boot Options -> Autologin -> Qt/Embedded, select Enable and reboot.
Work with LCD
If you connect your board to an LCD with capacitive touch panel in general that LCD's calibration is not required. However if your LCD is one with resistive touch panel you will have to do calibration which is triggered by running "/usr/bin/setqt4env" on your first system booting.
If you want to re-calibrate your LCD with resistive touch panel you need to delete the calibration file by using the following command:
After you reboot your system you will enter the calibration process.
Develop Qt Application
Please refer to: How to build Qt application
Q & A
- When I compile my Qt program I get a message complaining that linking to libraries such as libts and libz failed
Your arm-linux-gcc 4.9.3 may not include these library files. You need to try downloading the compiler again.
- Where should I get UbuntuCore's source code
We used the bin file released by UbuntuCore's official site. You can get its source code from http://packages.ubuntu.com/.
- Released English version
- Added sections 6.1, 6.2 and 6.3
- Updated section 4