Utilite2 Linux User How-To's

From Utilite Wiki

Jump to: navigation, search

Contents

Software Management

Ubuntu Linux image for Utilite includes all the information required to use Debian package management utilities. You can use apt-get and dpkg out of the box.

Adding a 512 MiB swap

  • Create a file for 512 MiB swap space:
utilite@utilite-desktop:~$ sudo fallocate -l 512m /mnt/512MiB.swap
utilite@utilite-desktop:~$ sudo chmod 600 /mnt/512MiB.swap
  • Format that file to create a swapping device:
utilite@utilite-desktop:~$ sudo mkswap /mnt/512MiB.swap
Setting up swapspace version 1, size = 524284 KiB
no label, UUID=5c3f1d84-0526-4b39-bab7-8f20cf5e97a1
  • Add the swap to the running system:
utilite@utilite-desktop:~$ sudo swapon /mnt/512MiB.swap
  • Make the change permanent. Edit the /etc/fstab by adding this line at the end of the file:
/mnt/512MiB.swap  none  swap  sw  0 0
  • After the next reboot the swap will be used automatically.

For more details see here SwapFaq

Audio

Utilite2 features analog and digital (HDMI) audio interfaces. Audio settings can be configured using the Gnome System Settings --> Sound graphical application. In order to enable analog or HDMI output choose Headphones or HDMI Digital Stereo output device respectively.

Alternatively ALSA UCM command line tool can be used as follows. Proper UCM profile configuration files are available in the image in the folder /usr/share/alsa/ucm/apq8064-tabla-snd-card/.

  • To enable the analog output run the following commands:
utilite@utilite-desktop:~$ alsaucm -c apq8064-tabla-snd-card set _verb HiFi set _disdev Headphones
utilite@utilite-desktop:~$ alsaucm -c apq8064-tabla-snd-card set _verb HDMI set _disdev HDMI-stereo
utilite@utilite-desktop:~$ alsaucm -c apq8064-tabla-snd-card set _verb HiFi set _enadev Headphones
  • To enable the HDMI output run the following commands:
utilite@utilite-desktop:~$ alsaucm -c apq8064-tabla-snd-card set _verb HiFi set _disdev Headphones
utilite@utilite-desktop:~$ alsaucm -c apq8064-tabla-snd-card set _verb HDMI set _disdev HDMI-stereo
utilite@utilite-desktop:~$ alsaucm -c apq8064-tabla-snd-card set _verb HDMI set _enadev HDMI-stereo

Bluetooth

Utilite2 features Bluetooth 4.0 interface. The Bluetooth can be set up and operated using the Gnome System Settings --> Bluetooth graphical application.

Alternatively, bluez command line utilities can be used as follows.


Admolition note.png Some commands require root permissions.
  • hciconfig is an HCI device configuration utility. Can be used for example to open/close the HCI device or to retrieve a detailed information about it.
utilite@utilite-desktop:~$ hciconfig -a
hci0:   Type: BR/EDR  Bus: UART
        BD Address: 00:3C:7F:F0:F0:0A  ACL MTU: 1021:8  SCO MTU: 124:0
        UP RUNNING PSCAN 
        RX bytes:2386 acl:12 sco:0 events:93 errors:0
        TX bytes:2295 acl:12 sco:0 commands:59 errors:0
        Features: 0xff 0xfe 0x0d 0xfe 0xd8 0x7f 0x7b 0x87
        Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 
        Link policy: RSWITCH HOLD SNIFF 
        Link mode: SLAVE ACCEPT 
        Name: 'utilite-desktop-0'
        Class: 0x6c0100
        Service Classes: Rendering, Capturing, Audio, Telephony
        Device Class: Computer, Uncategorized
        HCI Version: 4.0 (0x6)  Revision: 0x102
        LMP Version: 4.0 (0x6)  Subversion: 0x1
        Manufacturer: Atheros Communications, Inc. (69)

utilite@utilite-desktop:~$ sudo hciconfig hci0 down
utilite@utilite-desktop:~$ hciconfig 
hci0:   Type: BR/EDR  Bus: UART
        BD Address: 00:3C:7F:F0:F0:0A  ACL MTU: 1021:8  SCO MTU: 124:0
        DOWN 
        RX bytes:2673 acl:12 sco:0 events:97 errors:0
        TX bytes:2311 acl:12 sco:0 commands:63 errors:0

utilite@utilite-desktop:~$ sudo hciconfig hci0 up
utilite@utilite-desktop:~$ hciconfig 
hci0:   Type: BR/EDR  Bus: UART
        BD Address: 00:3C:7F:F0:F0:0A  ACL MTU: 1021:8  SCO MTU: 124:0
        UP RUNNING PSCAN 
        RX bytes:3186 acl:12 sco:0 events:119 errors:0
        TX bytes:2916 acl:12 sco:0 commands:85 errors:0
  • hcitool is Bluetooth connections configuration utility. Can be used to inquire remote devices.
utilite@utilite-desktop:~$ hcitool scan
Scanning ...
        00:07:A4:F2:B3:CB       Motorola HT820
        BC:F5:AC:53:15:60       Nexus 5
  • sdptool is Bluetooth Service Discovery Protocol utility. Can be used to search/browse available services on remote devices.
utilite@utilite-desktop:~$ sdptool search FTP
Inquiring ...
Searching for FTP on BC:F5:AC:53:15:60 ...
Service Name: OBEX FTP
Service RecHandle: 0x1000c
Service Class ID List:
  UUID 128: 00001106-0000-1000-8000-00805f9b34fb
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 5
  • l2ping is a connection testing utility.
utilite@utilite-desktop:~$ sudo l2ping 00:07:A4:F2:B3:CB
Ping: 00:07:A4:F2:B3:CB from 00:3C:7F:F0:F0:0A (data size 44) ...
4 bytes from 00:07:A4:F2:B3:CB id 0 time 17.18ms
4 bytes from 00:07:A4:F2:B3:CB id 1 time 31.43ms
4 bytes from 00:07:A4:F2:B3:CB id 2 time 31.04ms
...

A2DP Headphones

  • Scan for available devices to find out Headphones BT device address:
utilite@utilite-desktop:~$ hcitool scan
Scanning ...
	00:07:A4:F2:B3:CB	Motorola HT820
  • Add new PCM device by editing /etc/asound.conf file:
pcm.btheadphones {
   type plug
   slave {
       pcm {
           type bluetooth
           device 00:07:A4:F2:B3:CB
           profile "auto"
       }
   }
   hint {
       show on
       description "BT Headphones"
   }
}
ctl.btheadphones {
  type bluetooth
}
  • List device names to ensure correct settings in /etc/asound.conf:
utilite@utilite-desktop:~$ aplay -L | grep -i bt
btheadphones
    BT Headphones
  • Put the headphones in the pairing mode and launch bluez-simple-agent application and provide device PIN code on request:
utilite@utilite-desktop:~$ sudo bluez-simple-agent hci0 00:07:A4:F2:B3:CB 
RequestPinCode (/org/bluez/2101/hci0/dev_00_07_A4_F2_B3_CB)
Enter PIN Code: 0000
Release
New device (/org/bluez/2101/hci0/dev_00_07_A4_F2_B3_CB)
  • Launch aplay playback tool:
utilite@utilite-desktop:~$ aplay -D btheadphones <audio-file.wav>

WLAN

Utilite2 features 802.11b/g/n wireless interface, implemented with the Atheros QCA6234 Wireless module. WLAN settings can be configured using the Gnome System Settings --> Network graphical application. Alternatively, same settings cam be obtained using Linux command line utilities as follows.

WLAN Initialization

  • The ath6kl WLAN driver gets loaded automatically. Make sure that the WLAN driver is loaded:
utilite@utilite-desktop:~$ lsmod | grep ath6kl_sdio
ath6kl_sdio           320500  0
cfg80211              184104  1 ath6kl_sdio

If the WLAN driver has not been loaded automatically, it can be loaded manually:

utilite@utilite-desktop:~$ sudo modprobe ath6kl_sdio   
  • iwconfig command from wireless-tools packge can be used to retrieve detailed information about WLAN interfaces:
utilite@utilite-desktop:~$ iwconfig wlan0
wlan0     IEEE 802.11abgn  ESSID:off/any  
          Mode:Managed  Access Point: Not-Associated   
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
  • WLAN interface activating:
utilite@utilite-desktop:~$ sudo ifconfig wlan0 up
  • Sample WLAN scanning:
utilite@utilite-desktop:~$ sudo iwlist wlan0 scan

The output will show the list of Access Points and Ad-Hoc cells in range. For more information about connecting to wireless networks and tuning WLAN interfaces refer to “wpa_supplicant” and “wireless-tools” man pages.

Mobile Broadband

A cellular USB modem with mini PCIe adaptor can be used by Utilite2 for mobile broadband connections. For installing a cellular modem and a SIM card:

  • Turn the Utilite2 computer off.
  • Remove the cover and plug a cellular modem into the mini PCIe socket (P12).
  • Plug a micro SIM card into the micro SIM socket (P11).
  • Return the cover and turn the Utilite2 on.

Mobile Broadband settings can be configured using the Gnome System Settings --> Network graphical application. Alternatively, same settings cam be obtained using Linux command line utilities as follows.

Create a Mobile Broadband connection file /etc/NetworkManager/system-connections/<connection id> using the template below. Provide a connection ID, UUID, ISP's APN and a desired baud rate:

[connection]
id=<Connection ID>
uuid=<Connection UUID>
type=gsm
autoconnect=false

[gsm]
number=*99#
apn=<ISP's APN>

[ppp]
lcp-echo-failure=5
lcp-echo-interval=30

[serial]
baud=<baud rate>

[ipv4]
method=auto

In the example below we assume a connection with id Test connection and UUID 17b5459a-95df-453a-a61f-8720eaab92e2 has been created. The nmcli utility can be used to open/close mobile broadband connection and retrieve a detailed information about it:

root@utilite-desktop:~# nmcli con 
NAME                      UUID                                   TYPE              TIMESTAMP-REAL                    
Test connection           17b5459a-95df-453a-a61f-8720eaab92e2   gsm               Wed 17 Jun 2015 01:47:35 PM UTC   
root@utilite-desktop:~# 
root@utilite-desktop:~# nmcli con up id "Test connection"
root@utilite-desktop:~# 
root@utilite-desktop:~# nmcli con status
NAME                      UUID                                   DEVICES    DEFAULT  VPN   MASTER-PATH                                 
Test connection           17b5459a-95df-453a-a61f-8720eaab92e2   ttyACM3    yes      no    --                                          
root@utilite-desktop:~# 
root@utilite-desktop:~# nmcli con status id "Test connection"
GENERAL.NAME:                           Test connection
GENERAL.UUID:                           17b5459a-95df-453a-a61f-8720eaab92e2
GENERAL.DEVICES:                        ttyACM3
GENERAL.STATE:                          activated
GENERAL.DEFAULT:                        yes
GENERAL.DEFAULT6:                       no
GENERAL.VPN:                            no
GENERAL.ZONE:                           --
GENERAL.DBUS-PATH:                      /org/freedesktop/NetworkManager/ActiveConnection/1
GENERAL.CON-PATH:                       /org/freedesktop/NetworkManager/Settings/1
GENERAL.SPEC-OBJECT:                    --
GENERAL.MASTER-PATH:                    --
IP4.ADDRESS[1]:                         ip = 172.17.71.226/32, gw = 172.17.71.226
IP4.DNS[1]:                             172.31.32.54
IP4.DNS[2]:                             172.31.32.56
root@utilite-desktop:~# 
root@utilite-desktop:~# nmcli con down id "Test connection"
root@utilite-desktop:~# 
root@utilite-desktop:~# nmcli con status id "Test connection"
Error: 'Test connection' is not an active connection.
root@utilite-desktop:~# nmcli con status 
NAME                      UUID                                   DEVICES    DEFAULT  VPN   MASTER-PATH                                 
root@utilite-desktop:~# 

Manual setting of RTC time

Disable NTP time updates by setting System Settings --> Date and Time --> Network Time to OFF.

Set the desired system time and propagate the changes to the hardware clock:

utilite@utilite-desktop:~$ sudo date --set="1 Mar 2015 15:07:15"
utilite@utilite-desktop:~$ sudo hwclock --systohc

Erase downloaded archive files

In order to free some space on the media the downloaded archive files can be safely erased:

utilite@utilite-desktop:~$ sudo apt-get clean

or

utilite@utilite-desktop:~$ sudo rm /var/cache/apt/archives/*.deb

Add new user with the terminal console

Execute the following commands:

utilite@utilite-desktop:~$ su
Password: 
root@utilite-desktop:/home/utilite# export USER_NAME="new_user"
root@utilite-desktop:/home/utilite# useradd -c $USER_NAME -m -s /bin/bash $USER_NAME
root@utilite-desktop:/home/utilite# usermod -aG adm,dialout,cdrom,sudo,audio,dip,video,plugdev,admin $USER_NAME 
Personal tools