Difference between revisions of "CM-T3730: Linux: Angstrom"

From Compulab Mediawiki
Jump to: navigation, search
(See also)
(Introduction)
 
(3 intermediate revisions by 3 users not shown)
Line 12: Line 12:
 
* The Digital Video SDK (DVSDK) version 4.03.00.06 including Linux kernel modules, multimedia and DSP packages and ready to run DSP functionality demos
 
* The Digital Video SDK (DVSDK) version 4.03.00.06 including Linux kernel modules, multimedia and DSP packages and ready to run DSP functionality demos
  
The [[CM-T3730: Linux: Getting started|Getting started with Linux on CM-T3730]] page provides a brief introduction on how to install the run-time Linux image. This article describes package structure and peripheral device options specific to the CM-T3730.
+
The [[CM-T3730: Linux: Getting started]] page provides a brief introduction on how to install the run-time Linux image.<br>
 
+
The [[CM-T3730: Linux: Package contents]] article describes Linux package structure specific to CM-T3730.
= Package contents =
 
 
 
== version.txt ==
 
The contents of the {{filename|version.txt}} identifies the package version.
 
 
 
== images ==
 
* {{filename|uImage-cm-t3730.bin}} - ready to run Linux kernel image binary for CM-T3730
 
* {{filename|Angstrom-image-cm-t3730.tar.bz2}} - archive of Angstrom root file system
 
* {{filename|Angstrom-image-cm-t3730.ubi}} - ready to run Angstrom Linux image for installation onto CM-T3730 NAND
 
* {{filename|bootscr.img}} - U-Boot script used for image installation
 
* {{filename|kernel.img}} - Kernel image required for CM-T3730 Linux and Angstrom images installation
 
* {{filename|ramdisk.img}} - Ramdisk image required for Linux and Angstrom images installation
 
 
 
== kernel ==
 
* {{filename|uImage-3.0.50-cm-t3730-4.bin}} - ready to run Linux kernel 3.0.50-cm-t3730-4 for CM-T3730
 
* {{filename|linux-3.0.50-cm-t3730-4.config}} - Linux kernel 3.0.50-cm-t3730-4 configuration file
 
* {{filename|linux-3.0.50-cm-t3730-4.patch}} - patch vs. [http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=commit;h=27d0858dbcf199838b8c50a3e94d397bf326d986 Linux stable kernel 3.0.50] with support for CM-T3730 peripherals
 
* {{filename|patches}} - ordered collection of patches, that form the single patch above ({{filename|linux-3.0.50-cm-t3730-4.patch}})
 
 
 
== oe ==
 
The {{filename|oe}} directory contains configuration files and CM-T3730 specific package definition for OpenEmbedded.
 
* {{filename|base-revision}} - the OpenEmbedded commit id that was used to create the Angstrom root file system image.
 
* {{filename|local.conf}} - configuration file used to build Angstrom Linux image for CM-T3730. This file should be placed in ${OEBASE}/build/conf directory.
 
* {{filename|openembedded-cm-t3730-4.patch}} - patch vs. OE commit id specified in the {{filename|base-revision}} to support CM-T3730
 
* {{filename|patches}} - ordered collection of patches, that form the single patch above ({{filename|openembedded-cm-t3730-4.patch}})
 
* {{filename|extra}} - directory contains miscellaneous files and examples
 
** {{filename|oe_sample_appl.zip}} - archive of a sample Bitbake recipe that allows building a basic "Hello world" application
 
 
 
== utilities ==
 
The {{filename|utilities}} directory contains miscellaneous utilities useful for development
 
* {{filename|Angstrom-image.cfg}} - configuration file used by {{filename|ubinize}} utility for {{filename|Angstrom-image-cm-t3730.ubi}} generation.
 
* {{filename|tftpd32.zip}} - TFTP server for Windows users
 
* {{filename|eeprom-util}} - CompuLab EEPROM utility for reading information found inside the EEPROM on CompuLab boards
 
* {{filename|bootscr.src}} - U-Boot script source used for booting into the installation environment.
 
 
 
== extra ==
 
The {{filename|extra}} files that are not directly connected to the Linux kernel or the OE framework
 
* {{filename|dvsdk_04_03_00_06}} - DSP related files
 
** {{filename|dvsdk_04_03_00_06-cm-t3730-3.patch}} - patch that provides support for mainline Linux kernel and CM-T3730 device with the DVSDK
 
** {{filename|patches}} - ordered collection of patches, that form the single patch above ({{filename|dvsdk_04_03_00_06-cm-t3730-3.patch}})
 
* {{filename|Graphics_SDK_4_05_00_03}} - graphics (SGX) related files
 
** {{filename|graphics_sdk_04_05_00_03-cm-t3730-3.patch}} - patch to fix the Graphics SDK v4.05.00.03 compile time errors
 
** {{filename|patches}} - ordered collection of patches, that form the single patch above ({{filename|graphics_sdk_04_05_00_03-cm-t3730-3.patch}})
 
* {{filename|WL1271_Linux_SDK_3_00_01_06}} - WL1271 WLAN/Bluetooth single chip related support files
 
** {{filename|wl1271_linux_sdk-cm-t3730-4.patch}} - patch to fix the compile time issues and to provide support for CM-T3730
 
** {{filename|extra_files}} - files for Wl1271 Linux SDK and CM-T3730
 
*** {{filename|bluetooth_src}} - additional libraries and packages for Wl1271 Linux SDK
 
*** {{filename|BT_firmware}} - bluetooth firmware binaries for CM-T3730
 
*** {{filename|gallery}} - media files that can be used for Bluetooth usage demonstration
 
*** {{filename|patches}} - additional patches for after installation adjustments
 
  
 
= Using Angstrom Linux on CM-T3730 =
 
= Using Angstrom Linux on CM-T3730 =
  
 
== Display options ==
 
== Display options ==
CM-T3730 evaluation platform has four video output interfaces: LCD, DVI, LVDS and TV-out. Default configuration of Angstrom Linux for CM-T3730 uses DVI as primary video output. It is possible to switch between the DVI and LCD interfaces on the fly. TV-out can be used simultaneously with LCD or DVI interface.<br>
+
CM-T3730 evaluation platform has four video output interfaces: LCD, DVI, LVDS and TV-out. Default configuration of Angstrom Linux for CM-T3730 uses DVI as primary video output.
 +
It is possible to switch between the DVI and LCD interfaces on the fly. TV-out can be used simultaneously with LCD or DVI interface.<br>
 
Linux implementation of the OMAP3 display subsystem is described in detail in {{filename|[http://gitorious.org/linux-omap-dss2/linux/blobs/master/Documentation/arm/OMAP/DSS Documentation/arm/OMAP/DSS]}} file in the Linux kernel source tree.  
 
Linux implementation of the OMAP3 display subsystem is described in detail in {{filename|[http://gitorious.org/linux-omap-dss2/linux/blobs/master/Documentation/arm/OMAP/DSS Documentation/arm/OMAP/DSS]}} file in the Linux kernel source tree.  
  
 
=== Display resolutions ===
 
=== Display resolutions ===
 
* The Toppoly LCD supplied with CM-T3730 evaluation kit supports 480x640 resolution with 18 bits per color
 
* The Toppoly LCD supplied with CM-T3730 evaluation kit supports 480x640 resolution with 18 bits per color
 +
* The DataImage LCD supplied with CM-T3730 evaluation kit supports 480x800 resolution with 18 bits per color
 
* DVI output can be configured for standard resolutions using kernel command line parameter {{parameter|omapfb.mode}}:
 
* DVI output can be configured for standard resolutions using kernel command line parameter {{parameter|omapfb.mode}}:
 
*: 1024x768 - omapfb.mode=dvi:1024x768-24@60
 
*: 1024x768 - omapfb.mode=dvi:1024x768-24@60
Line 132: Line 84:
 
echo "1" $tv/enabled
 
echo "1" $tv/enabled
 
</pre>
 
</pre>
 +
 +
== Touchscreen ==
 +
CM-T3730 Evaluation Kit can be equipped with either of the following LCD touch panels: Toppoly TDO35S or DataImage SCF0403.
 +
See [[CM-T3730: Linux: Getting started#Select LCD model|Select LCD model]] to enable support for the particular LCD touch panel.
 +
The X Windows system of CM-T3730 uses tslib X server input driver to get the input from the touchscreen.
 +
 +
=== Touchscreen calibration ===
 +
Touchscreen calibration can be performed with {{cmd|ts_calibrate}} utility available in package {{filename|libts-bin}}.
 +
To calibrate the touchscreen:
 +
* Run {{cmd|ts_calibrate}} utility. For proper calibration you are required to touch the touchscreen corners and center in the following order: top-left, top-right, bottom-right, bottom-left, center. The calibration results are saved to file {{filename|/etc/pointercal}}.
  
 
== GPIO access ==
 
== GPIO access ==
Line 140: Line 102:
 
<pre>
 
<pre>
 
echo 140 > /sys/class/gpio/export
 
echo 140 > /sys/class/gpio/export
echo 1 > /sys/class/gpio/gpio140/direction
+
echo out > /sys/class/gpio/gpio140/direction
 
echo 0 > /sys/class/gpio/gpio140/value
 
echo 0 > /sys/class/gpio/gpio140/value
 
echo 1 > /sys/class/gpio/gpio140/value
 
echo 1 > /sys/class/gpio/gpio140/value
Line 180: Line 142:
 
* Attach the ttyO1 serial port to the HCI Bluetooth subsystem:
 
* Attach the ttyO1 serial port to the HCI Bluetooth subsystem:
 
<pre>
 
<pre>
root@cm-t3730:~# hciattach /dev/ttyO1 texas 3000000 &
+
root@cm-t3730:~# hciattach -s 115200 /dev/ttyO1 texas 3000000 &
 
Found a Texas Instruments' chip!
 
Found a Texas Instruments' chip!
 
Firmware file : /lib/firmware/TIInit_7.6.15.bts
 
Firmware file : /lib/firmware/TIInit_7.6.15.bts
Line 200: Line 162:
 
* Recognize the Bluetooth adapter:
 
* Recognize the Bluetooth adapter:
 
<pre>
 
<pre>
root@cm-t3730:~# export BT_ADAPTER=/org/bluez/1559/hci0
+
root@cm-t3730:~# export BT_ADAPTER=`dbus-send --system --dest=org.bluez --print-reply / org.bluez.Manager.DefaultAdapter | tail -n 1 | sed 's/^.*"\(.*\)".*$/\1/'`
 
</pre>
 
</pre>
 
* Start the BlueZ D-Bus Agent:
 
* Start the BlueZ D-Bus Agent:
Line 216: Line 178:
 
* Recognize the headphones address {{parameter|00:07:A4:F2:B3:CB}}
 
* Recognize the headphones address {{parameter|00:07:A4:F2:B3:CB}}
 
* Add new PCM device by editing {{filename|/etc/asound.conf}}:
 
* Add new PCM device by editing {{filename|/etc/asound.conf}}:
 +
 
<pre>
 
<pre>
pcm.!bluetooth {
+
pcm.btheadphones {
    type bluetooth
+
  type plug
    device "00:07:A4:F2:B3:CB"
+
  slave {
    }
+
      pcm {
 +
          type bluetooth
 +
          device 00:07:A4:F2:B3:CB
 +
          profile "auto"
 +
      }
 +
  }
 +
  hint {
 +
      show on
 +
      description "BT Headphones"
 +
  }
 +
}
 +
ctl.btheadphones {
 +
  type bluetooth
 +
}
 +
</pre>
  
pcm.!default {
+
* List device names to ensure correct settings in {{filename|/etc/asound.conf}}:
     type plug
+
<pre>
     slave.pcm "bluetooth"
+
root@cm-t3730:~# aplay -L
     }
+
null
 +
    Discard all samples (playback) or generate zero samples (capture)
 +
btheadphones
 +
     BT Headphones
 +
default:CARD=overo
 +
     overo,
 +
     Default Audio Device
 
</pre>
 
</pre>
 +
 
* Put the headphones in the pairing mode and pair devices:
 
* Put the headphones in the pairing mode and pair devices:
 
<pre>
 
<pre>
Line 232: Line 216:
 
> objpath:$BT_ADAPTER/dev_00_07_A4_F2_B3_CB
 
> objpath:$BT_ADAPTER/dev_00_07_A4_F2_B3_CB
 
root@cm-debian:~# dbus-send --system --print-reply --dest=org.bluez $BT_ADAPTER org.bluez.Adapter.CreatePairedDevice \
 
root@cm-debian:~# dbus-send --system --print-reply --dest=org.bluez $BT_ADAPTER org.bluez.Adapter.CreatePairedDevice \
> string:$DEV_ADDR objpath:/org/bluez/agent string:DisplayYesNo
+
> string:00:07:A4:F2:B3:CB objpath:/org/bluez/agent string:DisplayYesNo
 
Pincode request for device /org/bluez/1559/hci0/dev_00_07_A4_F2_B3_CB
 
Pincode request for device /org/bluez/1559/hci0/dev_00_07_A4_F2_B3_CB
 
bluetoothd[1559]: pin_code_request (sba=1C:45:93:3B:EF:98, dba=00:07:A4:F2:B3:CB)
 
bluetoothd[1559]: pin_code_request (sba=1C:45:93:3B:EF:98, dba=00:07:A4:F2:B3:CB)
Line 244: Line 228:
 
sudo cp -r /path/to/cm-t3730-linux/extra/WL1271_Linux_SDK_3_00_01_06/extra_files/gallery /path/to/cm-t3730/rootfs/opt/WL1271_demo_01/
 
sudo cp -r /path/to/cm-t3730-linux/extra/WL1271_Linux_SDK_3_00_01_06/extra_files/gallery /path/to/cm-t3730/rootfs/opt/WL1271_demo_01/
 
</pre>
 
</pre>
* Lunch aplay playback tool:
+
* Lunch {{filename|aplay}} playback tool:
 
<pre>
 
<pre>
root@cm-t3730:~# aplay -Dplug:bluetooth /opt/WL1271_demo_01/gallery/Pop.wav
+
root@cm-t3730:~# aplay -D btheadphones /opt/WL1271_demo_01/gallery/Pop.wav
 
bluetoothd[1559]: link_key_request (sba=1C:45:93:3B:EF:98, dba=00:07:A4:F2:B3:CB)
 
bluetoothd[1559]: link_key_request (sba=1C:45:93:3B:EF:98, dba=00:07:A4:F2:B3:CB)
 
Playing WAVE '/opt/WL1271_demo_01/gallery/Pop.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
 
Playing WAVE '/opt/WL1271_demo_01/gallery/Pop.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
Line 417: Line 401:
 
== Graphics SDK ==
 
== Graphics SDK ==
 
The CM-T3730 Linux package contains pre-built and ready to run SGX functionality demo programs.
 
The CM-T3730 Linux package contains pre-built and ready to run SGX functionality demo programs.
The SGX configuration script must be run on CM-T3730 before first use:
+
The SGX configuration script must be run on CM-T3730 before '''first use''':
 
<pre>
 
<pre>
 
root@cm-t3730:~# /etc/init.d/omap-demo
 
root@cm-t3730:~# /etc/init.d/omap-demo
 +
</pre>
 +
 +
* The SGX kernel modules must be loaded prior running the demos:
 +
<pre>
 +
root@cm-t3730:~# /etc/init.d/rc.pvr start
 
</pre>
 
</pre>
  
Line 446: Line 435:
 
= See also =
 
= See also =
 
* [[CM-T3730: Linux: Getting started]]
 
* [[CM-T3730: Linux: Getting started]]
 +
* [[CM-T3730: Linux: Debian]]
 
* [[CM-T3730: Linux: Kernel]]
 
* [[CM-T3730: Linux: Kernel]]
 
* [[CM-T3730: Linux: Camera]]
 
* [[CM-T3730: Linux: Camera]]
 
* [[CM-T3730: Linux: Video Playback]]
 
* [[CM-T3730: Linux: Video Playback]]
 
* [[CM-T3730: Linux: Building images]]
 
* [[CM-T3730: Linux: Building images]]
* [[Linux Development for ARM modules]]
+
* [[Linux: Development for ARM modules|Linux Development for ARM modules]]
 
* [http://www.angstrom-distribution.org Angstrom Distribution]
 
* [http://www.angstrom-distribution.org Angstrom Distribution]
 
* [http://www.openembedded.org OpenEmbedded]
 
* [http://www.openembedded.org OpenEmbedded]

Latest revision as of 08:27, 18 February 2014

Introduction

The example run-time Linux filesystem image for CM-T3730 is based on Angstrom Linux 2012. The CompuLab Linux package for CM-T3730 includes ready to run Angstrom Linux filesystem image, Linux kernel and source code patches.

The default Angstrom Linux image includes more than 1000 software packages. Among them:

  • Core system
  • X11 Windowing System
  • Enlightenment v0.16 desktop manager
  • Midory web browser
  • Totem and MPlayer media players
  • GStreamer with multiple plugins
  • The Graphics SDK version 4.05.00.03 including the Linux graphics (SGX) drivers and ready to run SGX functionality demos
  • The Digital Video SDK (DVSDK) version 4.03.00.06 including Linux kernel modules, multimedia and DSP packages and ready to run DSP functionality demos

The CM-T3730: Linux: Getting started page provides a brief introduction on how to install the run-time Linux image.
The CM-T3730: Linux: Package contents article describes Linux package structure specific to CM-T3730.

Using Angstrom Linux on CM-T3730

Display options

CM-T3730 evaluation platform has four video output interfaces: LCD, DVI, LVDS and TV-out. Default configuration of Angstrom Linux for CM-T3730 uses DVI as primary video output. It is possible to switch between the DVI and LCD interfaces on the fly. TV-out can be used simultaneously with LCD or DVI interface.
Linux implementation of the OMAP3 display subsystem is described in detail in Documentation/arm/OMAP/DSS file in the Linux kernel source tree.

Display resolutions

  • The Toppoly LCD supplied with CM-T3730 evaluation kit supports 480x640 resolution with 18 bits per color
  • The DataImage LCD supplied with CM-T3730 evaluation kit supports 480x800 resolution with 18 bits per color
  • DVI output can be configured for standard resolutions using kernel command line parameter omapfb.mode:
    1024x768 - omapfb.mode=dvi:1024x768-24@60
    800x600 - omapfb.mode=dvi:800x600-24@60
    640x480 - omapfb.mode=dvi:640x480-24@60
  • TV-out supports PAL and NTSC standards

Examples

Switch from LCD to DVI

mgr0=/sys/devices/platform/omapdss/manager0
lcd=/sys/devices/platform/omapdss/display0
dvi=/sys/devices/platform/omapdss/display1
fb0=/sys/class/graphics/fb0

w=`cat $dvi/timings | cut -d "," -f 2 | cut -d "/" -f 1`
h=`cat $dvi/timings | cut -d "," -f 3 | cut -d "/" -f 1`

echo "0" > $lcd/enabled
echo "" > $mgr0/display
fbset -fb /dev/fb0 -xres $w -yres $h -vxres $w -vyres $h
# at this point you have to switch the dvi/lcd dip-switch from the omap board
echo "dvi" > $mgr0/display
echo "1" > $dvi/enabled

Clone GFX overlay to LCD and TV

ovl0=/sys/devices/platform/omapdss/overlay0
ovl1=/sys/devices/platform/omapdss/overlay1
tv=/sys/devices/platform/omapdss/display2
fb0=/sys/class/graphics/fb0
fb1=/sys/class/graphics/fb1

w=`cat $tv/timings | cut -d "," -f 2 | cut -d "/" -f 1`
h=`cat $tv/timings | cut -d "," -f 3 | cut -d "/" -f 1`

echo "0" > $ovl0/enabled
echo "0" > $ovl1/enabled

echo "" > $fb1/overlays
echo "0,1" > $fb0/overlays

echo "$w,$h" > $ovl1/output_size
echo "tv" > $ovl1/manager

echo "1" > $ovl0/enabled
echo "1" > $ovl1/enabled

echo "1" > $tv/enabled

Switch TV-out from PAL to NTSC

tv=/sys/devices/platform/omapdss/display2
echo "0" $tv/enabled
echo "ntsc" $tv/timings
echo "1" $tv/enabled

Touchscreen

CM-T3730 Evaluation Kit can be equipped with either of the following LCD touch panels: Toppoly TDO35S or DataImage SCF0403. See Select LCD model to enable support for the particular LCD touch panel. The X Windows system of CM-T3730 uses tslib X server input driver to get the input from the touchscreen.

Touchscreen calibration

Touchscreen calibration can be performed with ts_calibrate utility available in package libts-bin. To calibrate the touchscreen:

  • Run ts_calibrate utility. For proper calibration you are required to touch the touchscreen corners and center in the following order: top-left, top-right, bottom-right, bottom-left, center. The calibration results are saved to file /etc/pointercal.

GPIO access

Linux provides simple and convenient GPIO access via sysfs interface. A GPIO should be exported using /sys/class/gpio/export. After the GPIO is exported it is possible to change its direction and value using /sys/class/gpio/gpioX/direction and /sys/class/gpio/gpioX/value attributes.

Example

The following example demonstrates how to configure GPIO 140 as output and produce a 1usec pulse:

echo 140 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio140/direction
echo 0 > /sys/class/gpio/gpio140/value
echo 1 > /sys/class/gpio/gpio140/value
usleep 1
echo 0 > /sys/class/gpio/gpio140/value

Bluetooth

The CM-T3730 features Bluetooth 4.0 interface. The CM-T3730 Linux package contains pre-build Bluetooth support package based on the TI WL1271 SDK version 3.00.01.06-WL6.1.6.0.3. The following sections demonstrate the Bluetooth device initialization procedure and simple use cases. The CM-T3730 Linux package also provides several scripts for Bluetooth functionality demonstration. The scripts are installed under the /opt/WL1271_demo_01/bluetooth_scripts location.

Configure Bluetooth support package

  • Run the installation and configuration script before first use of the Bluetooth:
root@cm-t3730:~# cd /opt/WL1271_demo_01/
root@cm-t3730:/opt/WL1271_demo_01# ./install.sh
  • Reboot the CM-T3730.

Setup Bluetooth Environment

  • Setup environment variables before using the Bluetooth support package:
root@cm-t3730:~# export EXE_PATH=/usr/local/wl1271/wl1271_bluetooth
root@cm-t3730:~# export PATH=$EXE_PATH/bin:$EXE_PATH/sbin:$PATH
  • Start the Dbus deamon:
root@cm-t3730:~# rm -f $EXE_PATH/var/run/dbus/pid
root@cm-t3730:~# dbus-daemon --system &
  • Start the Bluetooth deamon:
root@cm-t3730:~# bluetoothd -n &
  • Attach the ttyO1 serial port to the HCI Bluetooth subsystem:
root@cm-t3730:~# hciattach -s 115200 /dev/ttyO1 texas 3000000 &
Found a Texas Instruments' chip!
Firmware file : /lib/firmware/TIInit_7.6.15.bts
Loaded BTS script version 1
texas: changing baud rate to 3000000, flow control to 1
Bluetooth: HCI UART driver ver 2.2
Bluetooth: HCI H4 protocol initialized
Bluetooth: HCI BCSP protocol initialized
Bluetooth: HCILL protocol initialized
bluetoothd[1559]: HCI dev 0 registered
bluetoothd[1559]: HCI dev 0 up
bluetoothd[1559]: Starting security manager 0
bluetoothd[1559]: Adapter /org/bluez/1559/hci0 has been enabled
Device setup complete
bluetoothd[1559]: Failed to access HAL
Bluetooth: BNEP (Ethernet Emulation) ver 1.3
Bluetooth: BNEP filters: protocol multicast
  • Recognize the Bluetooth adapter:
root@cm-t3730:~# export BT_ADAPTER=`dbus-send --system --dest=org.bluez --print-reply / org.bluez.Manager.DefaultAdapter | tail -n 1 | sed 's/^.*"\(.*\)".*$/\1/'`
  • Start the BlueZ D-Bus Agent:
root@cm-t3730:~# agent --path /org/bluez/agent 0000 &

A2DP Headphones

  • Scan for available devices to find out Headphones BT device address:
root@cm-t3730:~# hcitool scan --refresh
Scanning ...
	00:07:A4:F2:B3:CB	Motorola HT820
  • Recognize the headphones address 00:07:A4:F2:B3:CB
  • 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-t3730:~# aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
btheadphones
    BT Headphones
default:CARD=overo
    overo, 
    Default Audio Device
  • Put the headphones in the pairing mode and pair devices:
root@cm-debian:~# dbus-send --system --print-reply --dest=org.bluez  $BT_ADAPTER org.bluez.Adapter.RemoveDevice \
> objpath:$BT_ADAPTER/dev_00_07_A4_F2_B3_CB
root@cm-debian:~# dbus-send --system --print-reply --dest=org.bluez $BT_ADAPTER org.bluez.Adapter.CreatePairedDevice \
> string:00:07:A4:F2:B3:CB objpath:/org/bluez/agent string:DisplayYesNo
Pincode request for device /org/bluez/1559/hci0/dev_00_07_A4_F2_B3_CB
bluetoothd[1559]: pin_code_request (sba=1C:45:93:3B:EF:98, dba=00:07:A4:F2:B3:CB)
bluetoothd[1559]: link_key_notify (sba=1C:45:93:3B:EF:98, dba=00:07:A4:F2:B3:CB, type=0)
bluetoothd[1559]: link_key_request (sba=1C:45:93:3B:EF:98, dba=00:07:A4:F2:B3:CB)
method return sender=:1.0 -> dest=:1.3 reply_serial=2
   object path "/org/bluez/1559/hci0/dev_00_07_A4_F2_B3_CB"
sudo cp	-r /path/to/cm-t3730-linux/extra/WL1271_Linux_SDK_3_00_01_06/extra_files/gallery /path/to/cm-t3730/rootfs/opt/WL1271_demo_01/
  • Lunch aplay playback tool:
root@cm-t3730:~# aplay -D btheadphones /opt/WL1271_demo_01/gallery/Pop.wav
bluetoothd[1559]: link_key_request (sba=1C:45:93:3B:EF:98, dba=00:07:A4:F2:B3:CB)
Playing WAVE '/opt/WL1271_demo_01/gallery/Pop.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
Authorizing request for /org/bluez/1559/hci0/dev_00_07_A4_F2_B3_CB
bluetoothd[1559]: link_key_request (sba=1C:45:93:3B:EF:98, dba=00:07:A4:F2:B3:CB)

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-T3730 Linux example root file system contains file transfer utility for devices that use the OBEX protocol. Following examples demonstrate OBEX usage on CM-T3730 with mobile phone device.

  • Enable Bluetooth on a phone. On CM-T3730, scan for available Bluetooth devices to find out phone's BT address:

root@cm-t3730:~# hcitool scan --refresh

Scanning ...
        5C:B5:24:3D:13:65       J20i
  • Recognize the phone address 5C:B5:24:3D:13:65
  • Ensure the phone supports Obex FTP service:
root@cm-t3730:~# sdptool search FTP
Inquiring ...
Searching for FTP on 5C:B5:24:3D:13:65 ...
Service Name: OBEX File Transfer
Service RecHandle: 0x2008008
Service Class ID List:
  "OBEX File Transfer" (0x1106)
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 7
  "OBEX" (0x0008)
Profile Descriptor List:
  "OBEX File Transfer" (0x1106)
    Version: 0x0100
  • Pair the devices:
root@cm-t3730:~# dbus-send --system --print-reply --dest=org.bluez  $BT_ADAPTER org.bluez.Adapter.RemoveDevice \
> objpath:$BT_ADAPTER/dev_5C_B5_24_3D_13_65
root@cm-t3730:~# dbus-send --system --print-reply --dest=org.bluez $BT_ADAPTER org.bluez.Adapter.CreatePairedDevice \
> string:5C:B5:24:3D:13:65 objpath:/org/bluez/agent string:DisplayYesNo
bluetoothd[1559]: link_key_request (sba=1C:45:93:3B:EF:98, dba=5C:B5:24:3D:13:65)
bluetoothd[1559]: io_capa_request (sba=1C:45:93:3B:EF:98, dba=5C:B5:24:3D:13:65)
bluetoothd[1559]: io_capa_response (sba=1C:45:93:3B:EF:98, dba=5C:B5:24:3D:13:65)
Confirmation request of 391382 for device /org/bluez/1559/hci0/dev_5C_B5_24_3D_13_65
bluetoothd[1559]: link_key_notify (sba=1C:45:93:3B:EF:98, dba=5C:B5:24:3D:13:65, type=5)
bluetoothd[1559]: probe failed with driver input-headset for device /org/bluez/1559/hci0/dev_5C_B5_24_3D_13_65
method return sender=:1.0 -> dest=:1.4 reply_serial=2
   object path "/org/bluez/1559/hci0/dev_5C_B5_24_3D_13_65"
  • Transfer a file from the CM-T3730 to the phone:
root@cm-t3730:~# obexftp -b 5C:B5:24:3D:13:65 -B 7 -p /opt/WL1271_demo_01/gallery/Document.jpg
Connecting...bluetoothd[1559]: link_key_request (sba=1C:45:93:3B:EF:98, dba=5C:B5:24:3D:13:65)
\done
Tried to connect for 598ms
Sending "/opt/WL1271_demo_01/gallery/Document.jpg"...|done
Disconnecting../done

Angstrom Linux package management

Angstrom Linux for CM-T3730 includes opkg package manager. It can be run from terminal command line.

Digital Video SDK

Overview

The Digital Video SDK (DVSDK) version 4.03.00.06 provides multiple resourses for evaluation and application development for the TI DM3730 platform. Current CM-T3730 Linux package contains the following pre-built DVSDK components: Multimedia Package, DSP Package, and several demo applications for functionality demonstration and validation.

Multimedia Package includes:

  • Multimedia Framework Product (MFP)
    • Codec Engine Framework
    • Framework Components
    • Linux Utils (CMEM)
    • XDAIS (eXpress DSP Algorithm Interoperability Standard)
  • Davinci Multimedia Application Interface (DMAI)
  • DSP Optimized codecs
    • Encoders: H.264, MPEG-4, JPEG, G711
    • Decoders: H.264, MPEG-4, MPEG-2, AAC. JPEG, G711
  • DSP accelerated Gstreamer TI plugin

DSP Package includes:

  • C6000 code generation tool chain
  • DSP/BIOS Real Time Operating System
  • DSPLink Inter Processor Communication
  • C6Accel - easy access to DSP accelerated function libraries
  • C6Run - tool to easily run C code on the DSP

The DVSDK was built outside of OpenEmbedded framework and intensively tested with Linux kernel version 3.0.38. For custom Linux kernel build, the DVSDK must be re-built to avoid compatibility issues. This section describes how to configure Linux kernel at boot time and run DVSDK demos. For detailed DVSDK build instruction please refer to the CM-T3730: Linux: Building images page.

Kernel parameters

The framebuffer plains 1 and 2 must be enabled in the kernel command line for the GStreamer-TI package will work correctly:

vram=18M omapfb.vram=0:6M,1:6M,2:6M

Additionally, DSP kernel modules require a memory "window" in the kernel memory to allocate a heap buffer of 73MB at 0x83700000. This memory must not be used by any other module or process, so the following parameters must be added to the kernel command line:

mem=55M@0x80000000 mem=128M@0x88000000
Admolition note.png We do not recommend using DVSDK on CM-T3730 devices with less then 256MB of RAM.

Running Demos

Current CM-T3730 Linux package contains pre-built and ready to run DVSDK functionality demo programs. For additional information about the DVSDK demos please refer to the DVSDK Software Developers Guide.

DSPLink Examples

The DSPLink includes several sample application examples. Use the following example to run the demo applications on CM-T3730:

root@cm-t3730:~# cd /usr/share/ti/ti-dsplink-examples/
root@cm-t3730:/usr/share/ti/ti-dsplink-examples# ./ti-dsplink-examples-run.sh

C6Accel Apps

The C6Accel package includes a small test application for benchmarking all the DSP kernel APIs for fixed point and floating point calculations. To run the application, run the following commands on CM-T3730:

root@cm-t3730:~# cd /usr/share/ti/c6accel-apps/
root@cm-t3730:~# ./c6accel_app

DMAI Apps

The Davinci Multimedia Application Interface (DMAI) includes small sample applications (and also source code). Before running a DMAI sample application, copy sample media files found in the CM-T3730 Linux package to the device rootfs under the /usr/share/ti location:

sudo cp	-r /path/to/cm-t3730-linux/extra/dvsdk_04_03_00_06/extra_files/data /path/to/cm-t3730/rootfs/usr/share/ti/

To run a DMAI sample application, make sure the current directory on CM-T3730 is ti-dmai-apps:

root@cm-t3730:~# cd /usr/share/ti/ti-dmai-apps/
Decode Examples

To decode an H.264 BP encoded video to a YUV file execute:

root@cm-t3730:/usr/share/ti/ti-dmai-apps# ./video_decode_io2_dm3730.x470MV -c h264dec \
 -i /usr/share/ti/data/videos/davincieffect_480p30.264 -o h264_test_output.yuv

To decode a JPEG encoded image to a YUV file execute:

root@cm-t3730:/usr/share/ti/ti-dmai-apps# ./image_decode_io1_dm3730.x470MV -c jpegdec \
 -i /usr/share/ti/data/images/remi003_422i.jpg -o jpeg_test_output.yuv

To decode an AAC encoded audio:

root@cm-t3730:/usr/share/ti/ti-dmai-apps# ./audio_decode_io1_dm3730.x470MV -c aachedec \
 -i /usr/share/ti/data/sounds/davincieffect_lc.aac -o aac_test_output.pcm
Encode Examples

To encode 100 frames of resolution 720x480 from a YUV file to an H.264 BP encoded file execute:

root@cm-t3730:/usr/share/ti/ti-dmai-apps# ./video_encode_io1_dm3730.x470MV -c h264enc \
 -i h264_test_output.yuv -o output.264 -r 720x480 -n 100

To encode a YUV file to a JPEG encoded file execute:

root@cm-t3730:/usr/share/ti/ti-dmai-apps# ./image_encode_io1_dm3730.x470MV -c jpegenc -e encode \
 -i jpeg_test_output.yuv -o Output.jpeg -r 720x576 --iColorSpace 3 --oColorSpace 1

Graphics SDK

The CM-T3730 Linux package contains pre-built and ready to run SGX functionality demo programs. The SGX configuration script must be run on CM-T3730 before first use:

root@cm-t3730:~# /etc/init.d/omap-demo
  • The SGX kernel modules must be loaded prior running the demos:
root@cm-t3730:~# /etc/init.d/rc.pvr start

Running Graphics SDK OpenGL ES1.x Demos

To run OpenGL ES1.x demos, perform the following:

root@cm-t3730:~# cd /opt/gfxsdkdemos/ogles
root@cm-t3730:/opt/gfxsdkdemos/ogles# ./OGLESSkybox

This will execute the OGLESSkybox demo. Press ‘q’ on the CM-T3730 console to stop the demo execution. Similarly, any other OpenGL ES1.x demo can be executed.

For more information and command line options of the OpenGL ES1.x demos, please refer to the SDK user guide: Graphics_SDK_4_05_00_03/GFX_Linux_SDK/OGLES/SDKPackage/OpenGL ES SDK.User Guide.1.20f.External.pdf.

Running Graphics SDK OpenGL ES2.0 Demos

To run OpenGL ES2.x demos, perform the following:

root@cm-t3730:~# cd /opt/gfxsdkdemos/ogles2
root@cm-t3730:/opt/gfxsdkdemos/ogle2s# ./OGLES2Coverflow

This will execute the OGLES2Coverflow demo. Press ‘q’ on the CM-T3730 console to stop the demo execution. Similarly, any other OpenGL ES2.0 demo can be executed.

For more information and command line options on the OpenGL ES2.0 demos, please refer to the SDK user guide: Graphics_SDK_4_05_00_03/GFX_Linux_SDK/OGLES2/SDKPackage/OpenGL ES 2.x SDK.User Guide.1.20f.External.pdf.

See also