Difference between revisions of "CM-QS600: Linux: Debian"

From Compulab Mediawiki
Jump to: navigation, search
(Audio)
(Installing Debian packages)
Line 30: Line 30:
  
 
=== kernel ===
 
=== kernel ===
* {{filename|zImage-3.4.0-14.10-cm-qs600-3.bin}} - pre-built Linux kernel version 3.4.0-14.10-cm-qs600-3 for CM-QS600
+
* {{filename|zImage-3.4.0-14.10-cm-qs600-3.3.bin}} - pre-built Linux kernel version 3.4.0-14.10-cm-qs600-3.3 for CM-QS600
* {{filename|modules-3.4.0-14.10-cm-qs600-3.tar.bz2}} - a modules tarball, that matches the ready to run Linux kernel ({{filename|zImage-3.4.0-14.10-cm-qs600-3.bin}})
+
* {{filename|modules-3.4.0-14.10-cm-qs600-3.3.tar.bz2}} - a modules tarball, that matches the ready to run Linux kernel ({{filename|zImage-3.4.0-14.10-cm-qs600-3.3.bin}})
* {{filename|linux-3.4.0-14.10-cm-qs600-3.config}} - Linux kernel 3.4.0-14.10-cm-qs600-3 configuration file
+
* {{filename|linux-3.4.0-14.10-cm-qs600-3.3.config}} - Linux kernel 3.4.0-14.10-cm-qs600-3.3 configuration file
* {{filename|linux-3.4.0-14.10-cm-qs600-3.patch}} - patch vs. [https://git.linaro.org/landing-teams/working/qualcomm/kernel.git/tag/refs/tags/ubuntu-ifc6410-14.10 ubuntu-ifc6410-14.10] tag with support for CM-QS600 peripherals
+
* {{filename|linux-3.4.0-14.10-cm-qs600-3.3.patch}} - patch vs. [https://git.linaro.org/landing-teams/working/qualcomm/kernel.git/tag/refs/tags/ubuntu-ifc6410-14.10 ubuntu-ifc6410-14.10] tag with support for CM-QS600 peripherals
* {{filename|patches}} - ordered collection of patches, that form the single patch above ({{filename|linux-3.4.0-14.10-cm-qs600-3.patch}})
+
* {{filename|patches}} - ordered collection of patches, that form the single patch above ({{filename|linux-3.4.0-14.10-cm-qs600-3.3.patch}})
 +
 
 +
=== extra ===
 +
* {{filename|cellular_modem}} - Cellular Modem support essentials, including software packages and configuration files:
 +
** {{filename|ppp_2.4.5-5.1+deb7u1_armel.deb}} - Point-to-Point Protocol (PPP)
 +
** {{filename|wvdial_1.61-4.1_armel.deb}} - intelligent Point-to-Point Protocol dialer
 +
** {{filename|libpcap0.8_1.3.0-1_armel.deb}} - system interface for user-level packet capture (needed for PPP)
 +
** {{filename|libuniconf4.6_4.6.1-5_armel.deb}} - C++ network libraries for rapid application development (needed for PPP)
 +
** {{filename|libwvstreams4.6-base_4.6.1-5_armel.deb}} - C++ network libraries for rapid application development (needed for PPP)
 +
** {{filename|libwvstreams4.6-extras_4.6.1-5_armel.deb}} - C++ network libraries for rapid application development (needed for PPP)
 +
** {{filename|.wvdialrc}} - sample configuration file for the {{cmd|wvdial}} utility
  
 
=== utilities ===
 
=== utilities ===
 
The {{filename|utilities}} directory contains miscellaneous utilities useful for development
 
The {{filename|utilities}} directory contains miscellaneous utilities useful for development
 
* {{filename|mkbootimg}} - prebuilt {{filename|mkbootimg}} utility binary
 
* {{filename|mkbootimg}} - prebuilt {{filename|mkbootimg}} utility binary
 
+
* {{filename|eeprom-util}} - CompuLab EEPROM utility for reading information found inside the EEPROM on CompuLab boards
 
 
  
 
== Using Debian Linux on CM-QS600 ==
 
== Using Debian Linux on CM-QS600 ==
Line 270: Line 279:
 
The output will show the list of Access Points and Ad-Hoc cells in range.
 
The output will show the list of Access Points and Ad-Hoc cells in range.
 
For more information about connecting to wireless networks and tunning WLAN interfaces refer to “wpa_supplicant” and “wireless-tools” man pages.
 
For more information about connecting to wireless networks and tunning WLAN interfaces refer to “wpa_supplicant” and “wireless-tools” man pages.
 +
 +
=== 3G Cellular Modem ===
 +
 +
CM-QS600 evaluation kit with 3G modem contains Telit HE910-D 3G cellular modem (USB module in mini-PCIe form-factor assembled in P12 socket) as well as cellular antenna and cable.
 +
 +
==== Installing Debian packages ====
 +
In order to use Telit HE910-D 3G cellular modem the several software packages have to be installed.
 +
<pre>
 +
root@cm-debian:~# apt-get install libpcap0.8 libuniconf4.6 libwvstreams4.6-base libwvstreams4.6-extras ppp wvdial
 +
</pre>
 +
For convenience all the cellular modem related packages are provided within the CM-QS600 Linux package in {{filename|cm-qs600-linux/extra/cellurar_modem}} directory.
 +
Make the *.deb files available for the CM-QS600 on a removable media (e.g. USB drive, micro SD) or network sharing tools (e.g. NFT, TFTP, etc.) and install them:
 +
<pre>
 +
root@cm-debian:~# dpkg -i /path/to/shared/directory/*.deb
 +
</pre>
 +
 +
==== Loading kernel modules ====
 +
If Point-to-Point protocol (PPP) drivers and/or USB modem drivers compiled as modules, they must be loaded prior to dialing.
 +
* Load USB modem driver module:
 +
<pre>
 +
root@cm-debian:~# modprobe cdc-acm
 +
</pre>
 +
* Load PPP generic driver module:
 +
<pre>
 +
root@cm-debian:~# modprobe ppp_generic
 +
[  150.897979] PPP generic driver version 2.4.2
 +
</pre>
 +
* Load asynchronous serial port module:
 +
<pre>
 +
root@cm-debian:~# modprobe ppp_async
 +
</pre>
 +
* Load synchronous tty module:
 +
<pre>
 +
root@cm-debian:~# modprobe ppp_synctty
 +
</pre>
 +
* Load BSD-Compress compression module:
 +
<pre>
 +
root@cm-debian:~# modprobe bsd_comp
 +
[  174.641845] PPP BSD Compression module registered
 +
</pre>
 +
* Load Deflate compression module:
 +
<pre>
 +
root@cm-debian:~# modprobe ppp_deflate
 +
[  184.826812] PPP Deflate Compression module registered
 +
</pre>
 +
 +
==== WvDial ====
 +
[https://wiki.debian.org/Wvdial WvDial] is a Point-to-Point Protocol dialer that automatically detects modem, and can log into almost any Internet Service Provider without a complicated configuration.
 +
The CM-QS600 Linux package provides a sample configuration file {{filename|cm-qs600-linux/extra/cellular_modem/.wvdiarc}} for the {{cmd|wvdial}} utility.
 +
It must be copied into the {{parameter|$HOME}} directory, then modified by providing a correct ISP APN instead of {{parameter|YOUR_ISP_APN}} stub.
 +
The following command can be used for dialing:
 +
<pre>
 +
root@cm-debian:~# wvdial cellular &
 +
</pre>
  
 
== See also ==
 
== See also ==
Line 278: Line 341:
 
* [[Linux: Debian: Minimal ARM filesystem]]
 
* [[Linux: Debian: Minimal ARM filesystem]]
 
* [http://www.debian.org/doc/manuals/reference/index.en.html Debian Reference].
 
* [http://www.debian.org/doc/manuals/reference/index.en.html Debian Reference].
 +
* [https://wiki.ubuntu.com/NetworkManager/Hardware/3G/Probing#Testing_your_modem_using_wvdial Testing your modem using wvdial]
  
 
[[Category:Linux|Debian]]
 
[[Category:Linux|Debian]]
 
[[Category:CM-QS600|Linux: Debian]]
 
[[Category:CM-QS600|Linux: Debian]]

Revision as of 11:12, 7 July 2015

Overview

The CompuLab CM-QS600 System-on-Module / Computer-on-Module Linux kernel is based on the Snapdragon 600 Linux Platform Ubuntu-based 14.09 release by Linaro. The example run-time Linux filesystem image for CM-QS600 is based on Debian GNU/Linux Wheezy. The CompuLab Linux package for CM-QS600 includes ready to run root filesystem demo archive, Linux kernel configuration and source code patches.

The default Debian Wheezy Linux image includes more than 400 software packages. Among them:

  • Core system
  • Debian package management system
  • X11 Windowing System
  • Fluxbox desktop manager
  • Iceweasel browser
  • Samba connectivity suite
  • SSH server and client
  • ALSA configuration and usage utilities
  • Bluetooth tools and daemons

The CM-QS600: Linux: Getting started page provides a brief introduction on how to install the run-time Linux image.

Package contents

version.txt

The contents of the version.txt identifies the package version.

images

  • boot-cm-qs600.img - boot image based on Linux kernel image binary for CM-QS600
  • bootramfs-cm-qs600.img - boot image based on Linux kernel image binary for CM-QS600 and initramfs required for installation images onto the eMMC
  • debian-image.tar.bz2 - archive of the Debian root file system
  • zImage-cm-qs600 - ready to run Linux kernel image binary for CM-QS600

kernel

  • zImage-3.4.0-14.10-cm-qs600-3.3.bin - pre-built Linux kernel version 3.4.0-14.10-cm-qs600-3.3 for CM-QS600
  • modules-3.4.0-14.10-cm-qs600-3.3.tar.bz2 - a modules tarball, that matches the ready to run Linux kernel (zImage-3.4.0-14.10-cm-qs600-3.3.bin)
  • linux-3.4.0-14.10-cm-qs600-3.3.config - Linux kernel 3.4.0-14.10-cm-qs600-3.3 configuration file
  • linux-3.4.0-14.10-cm-qs600-3.3.patch - patch vs. ubuntu-ifc6410-14.10 tag with support for CM-QS600 peripherals
  • patches - ordered collection of patches, that form the single patch above (linux-3.4.0-14.10-cm-qs600-3.3.patch)

extra

  • cellular_modem - Cellular Modem support essentials, including software packages and configuration files:
    • ppp_2.4.5-5.1+deb7u1_armel.deb - Point-to-Point Protocol (PPP)
    • wvdial_1.61-4.1_armel.deb - intelligent Point-to-Point Protocol dialer
    • libpcap0.8_1.3.0-1_armel.deb - system interface for user-level packet capture (needed for PPP)
    • libuniconf4.6_4.6.1-5_armel.deb - C++ network libraries for rapid application development (needed for PPP)
    • libwvstreams4.6-base_4.6.1-5_armel.deb - C++ network libraries for rapid application development (needed for PPP)
    • libwvstreams4.6-extras_4.6.1-5_armel.deb - C++ network libraries for rapid application development (needed for PPP)
    • .wvdialrc - sample configuration file for the wvdial utility

utilities

The utilities directory contains miscellaneous utilities useful for development

  • mkbootimg - prebuilt mkbootimg utility binary
  • eeprom-util - CompuLab EEPROM utility for reading information found inside the EEPROM on CompuLab boards

Using Debian Linux on CM-QS600

Connection and Logging In

Use the following username and password to login:

Account with administrative privileges:

cm-debian login: root
Password: 111111

Regular user account:

cm-debian login: user
Password: 111111

To login into the Linux system, you may use a serial console (ttyHSL0) at 115200 bps, or connect through the network, or use a keyboard and HDMI display.

Networking

To configure networking, edit /etc/network/interfaces, /etc/resolv.conf, /etc/hostname and /etc/hosts. For more information about Debian Linux network configuration read Network setup chapter in the Debian Reference.

Software Management

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

Audio

CM-QS600 provides an analog and a digital HDMI audio interfaces. The audio configuration can be set using ALSA UCM command line tool. Proper UCM profile configuration files are available in the image in the folder /usr/share/alsa/ucm/apq8064-tabla-snd-card/.

  • To enable analog output run the following command:
root@cm-debian:~# alsaucm -c apq8064-tabla-snd-card set _verb HiFi set _enadev Headphones
  • To enable HDMI output run the following command:
root@cm-debian:~# alsaucm -c apq8064-tabla-snd-card set _verb HDMI set _enadev HDMI-stereo
  • To play back an audio file launch aplay playback tool:
root@cm-debian:~# aplay <audio-file.wav>

Bluetooth

CM-QS600 features Bluetooth 4.0 interface. Following sections describe the initialization and simple use cases of Bluetooth device.

Host Controller Interface (HCI) Initialization

  • Attach the ttyHS0 serial port to the HCI Bluetooth subsystem:
root@cm-debian:~# hciattach -s 115200 /dev/ttyHS0 ath3k 3000000
Device setup complete
  • Run HCI device configuration utility to retrieve detailed information about the Bluetooth device:
root@cm-debian:~# 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:1153 acl:0 sco:0 events:37 errors:0
        TX bytes:927 acl:0 sco:0 commands:37 errors:0
        Features: 0xff 0xfe 0x0d 0xfe 0x98 0x7f 0x79 0x87
        Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 
        Link policy: RSWITCH HOLD SNIFF 
        Link mode: SLAVE ACCEPT 
        Name: 'cm-debian-0'
        Class: 0x6e0100
        Service Classes: Networking, Rendering, Capturing, Audio, Telephony
        Device Class: Computer, Uncategorized
        HCI Version: 3.0 (0x5)  Revision: 0x102
        LMP Version: 3.0 (0x5)  Subversion: 0x0
        Manufacturer: Atheros Communications, Inc. (69)

A2DP Headphones

  • Scan for available devices to find out Headphones BT device address:
root@cm-debian:~# hcitool scan
Scanning ...
	00:07:A4:F2:B3:CB	Motorola HT820
root@cm-debian:~#
  • Add new PCM device by editing /etc/asound.conf:
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:
root@cm-debian:~# aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
btheadphones
    BT Headphones
default:CARD=apq8064tablasnd
    apq8064-tabla-snd-card, 
    Default Audio Device
sysdefault:CARD=apq8064tablasnd
    apq8064-tabla-snd-card, 
    Default Audio Device
  • Put the headphones in the pairing mode and launch bluez-simple-agent application and provide device PIN code on request:
root@cm-debian:~# 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:
root@cm-debian:~# aplay -D btheadphones <audio-file.wav>

Obex FTP service

The OBject EXchange protocol (OBEX) can be used to exchange all kind of objects like files, pictures, calendar entries (vCal) and business cards (vCard) over bluetooth, IrDA, USB and serial cable links. CM-QS600 Linux example root file system contains file transfer utility for devices that use the OBEX protocol. Following examples demonstrate its usage with an Android device (phone).

  • Install Bluetooth File Transfer application via Google Play.
  • Enable bluetooth on the phone. On CM-QS600, scan for available devices to find out phone's BT address:
root@cm-debian:~# hcitool scan
Scanning ...
        BC:F5:AC:53:15:60       Nexus 5
  • Ensure the phone supports Obex FTP service:
root@cm-debian:~# sdptool search FTP
Inquiring ...
Searching for FTP on BC:F5:AC:53:15:60 ...
Service Name: OBEX FTP
Service RecHandle: 0x1000b
Service Class ID List:
  UUID 128: 00001106-0000-1000-8000-00805f9b34fb
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 4
  • Do NOT pair CM-QS600 and Android device explicitly.
  • Transfer a file from CM-QS600 to the phone. Confirm device pairing on the phone if required:
root@cm-debian:~# obexftp -b BC:F5:AC:53:15:60 --put testfile.txt 
Browsing BC:F5:AC:53:15:60 ...
Connecting..\done
Tried to connect for 1044ms
Sending "testfile.jpg"...|done
Disconnecting../done
  • List a content of a Pictures directory on the phone:
root@cm-debian:~# obexftp -b BC:F5:AC:53:15:60 --list Pictures
Browsing BC:F5:AC:53:15:60 ...
Connecting..\done
Tried to connect for 23ms
Receiving "Pictures".../<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE folder-listing SYSTEM "obex-folder-listing.dtd">
<folder-listing version="1.0">
  <folder name="cache" size="4096" modified="20141026T185556" user-perm="RWD" />
  <file name="testpicture.jpeg" size="161335" modified="20141128T104723" user-perm="RWD" />
</folder-listing>done
Disconnecting..-done
  • Transfer a file from the phone to CM-QS600. Confirm device pairing on the phone if required:
root@cm-debian:~# obexftp -b BC:F5:AC:53:15:60 -g Pictures/testpicture.jpeg
Browsing BC:F5:AC:53:15:60 ...
Connecting..\done
Tried to connect for 24ms
Receiving "Pictures/testpicture.jpeg"... Sending "Pictures"...|done
-done
Disconnecting..\done

WLAN

CM-QS600 features 802.11b/g/n wireless interface, implemented with the Atheros QCA6234 Wireless module.

WLAN Initialization

  • The ath6kl WLAN driver gets loaded automatically. Make sure that the WLAN driver is loaded:
root@cm-debian:~# 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:

root@cm-debian:~# modprobe ath6kl_sdio   
  • iwconfig command from wireless-tools packge can be used to retrieve detailed information about WLAN interfaces:
root@cm-debian:~# 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:
root@cm-debian:~# ifconfig wlan0 up
  • Sample WLAN scanning:
root@cm-debian:~# 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 tunning WLAN interfaces refer to “wpa_supplicant” and “wireless-tools” man pages.

3G Cellular Modem

CM-QS600 evaluation kit with 3G modem contains Telit HE910-D 3G cellular modem (USB module in mini-PCIe form-factor assembled in P12 socket) as well as cellular antenna and cable.

Installing Debian packages

In order to use Telit HE910-D 3G cellular modem the several software packages have to be installed.

root@cm-debian:~# apt-get install libpcap0.8 libuniconf4.6 libwvstreams4.6-base libwvstreams4.6-extras ppp wvdial

For convenience all the cellular modem related packages are provided within the CM-QS600 Linux package in cm-qs600-linux/extra/cellurar_modem directory. Make the *.deb files available for the CM-QS600 on a removable media (e.g. USB drive, micro SD) or network sharing tools (e.g. NFT, TFTP, etc.) and install them:

root@cm-debian:~# dpkg -i /path/to/shared/directory/*.deb

Loading kernel modules

If Point-to-Point protocol (PPP) drivers and/or USB modem drivers compiled as modules, they must be loaded prior to dialing.

  • Load USB modem driver module:
root@cm-debian:~# modprobe cdc-acm
  • Load PPP generic driver module:
root@cm-debian:~# modprobe ppp_generic
[  150.897979] PPP generic driver version 2.4.2
  • Load asynchronous serial port module:
root@cm-debian:~# modprobe ppp_async
  • Load synchronous tty module:
root@cm-debian:~# modprobe ppp_synctty
  • Load BSD-Compress compression module:
root@cm-debian:~# modprobe bsd_comp
[  174.641845] PPP BSD Compression module registered
  • Load Deflate compression module:
root@cm-debian:~# modprobe ppp_deflate
[  184.826812] PPP Deflate Compression module registered

WvDial

WvDial is a Point-to-Point Protocol dialer that automatically detects modem, and can log into almost any Internet Service Provider without a complicated configuration. The CM-QS600 Linux package provides a sample configuration file cm-qs600-linux/extra/cellular_modem/.wvdiarc for the wvdial utility. It must be copied into the $HOME directory, then modified by providing a correct ISP APN instead of YOUR_ISP_APN stub. The following command can be used for dialing:

root@cm-debian:~# wvdial cellular &

See also