Difference between revisions of "What can I do with BASE0010"

From IGEP - ISEE Wiki

Jump to: navigation, search
(Created page with '(work in progress) === BASE0010 Rev. A === * eth0 * eth1 * USB Host * AUdio IN * Audio OUT * Serial * Button = Leds = = RS-485 = = Bring up eth0 = udhcpc -i eth0 = …')
 
m (Redirected old article)
 
(19 intermediate revisions by 2 users not shown)
Line 1: Line 1:
(work in progress)
+
#REDIRECT:[[Category:BASE0010]]
 +
__NOTOC__
  
=== BASE0010 Rev. A ===
+
If you have '''successfully completed the [[Getting_Started_with_BASE0010_board|getting started guide]]''' for BASE0010, you can follow this first introduction about what can you do with this board:
  
* eth0
+
{{Navigation/IGEP Technology Guides|device=BASE0010}}
* eth1
 
* USB Host
 
* AUdio IN
 
* Audio OUT
 
* Serial
 
* Button
 
  
= Leds =
+
= How to get DVI output  =
  
= RS-485 =
+
By default the DVI is outputs 1024 x 768 @ 60Hz, so if your monitor support this resolution you'll see the desktop when board is up.
  
= Bring up eth0 =
+
Unfortunately the capability to automatically set the display resolution to match your monitor isn't yet available. The simplest method to customize the display resolution is to set it using [[How do I edit my kernel command line | kernel command line]
udhcpc -i eth0
 
  
= Bring up wlan0 =
+
The required arguments use the following pattern: omapfb.mode=<display>:<resolutionMR-bpp@refresh> omapdss.def_disp=<display> where:
  
= ALSA active the headset path =
+
For example:
  
  amixer set -D hw:0 'Headset' 6dB
+
  omapdss.def_disp=dvi omapfb.mode=1024x768MR-16@60
  amixer set -D hw:0 'HeadsetL Mixer AudioL2' on
+
  omapdss.def_disp=dvi omapfb.mode=hd720-16@60
amixer set -D hw:0 'HeadsetR Mixer AudioR2' on
 
  
= SGX Video Acceleration =
+
See also: [[How do I edit my kernel command line]].
  
You can test the SGX with a DEMO, grab and untar the SDK Demo Package
+
= How to configure ethernet =
  wget http://neuvoo.org/neuvoo/distfiles/SGX-3.01.00.07-SDK.tar.gz
 
tar xzf SGX-3.01.00.07-SDK.tar.gz
 
  
Then to run the demos just get into the X11 Binaries directory (e.g. OGLES/SDKPackage/Binaries/CommonX11/Demos/EvilSkull) and run the demo:
+
There are two Ethernets on the BASE0010 board which can be used, for example if your access to the internet is via a route you can configure one of them with following command:  
./OGLESEvilSkull
 
  
= DSP using dspbridge =
+
ifconfig eth0 up
 +
udhcpc -i eth0
  
fw_setenv bootargs-base 'mem=506M console=ttyS2,115200n8 console=tty0 omapfb.mode=dvi:1024x768MR-32@60 omapfb.vram=0:8M,1:4M'
+
For second interface just change the eth0 device for eth1
  
  wget http://download.blender.org/peach/bigbuckbunny_movies/big_buck_bunny_480p_surround-fix.avi
+
= How to get sound out (audio out) =
  
modprobe mailbox_mach
+
The amplifiers for the headset output are disabled by default, so the first thing you'll do is enable these amplifiers with
modprobe bridgedriver base_img=/lib/dsp/baseimage.dof phys_mempool_base=0x9FA00000
 
  
  DISPLAY=:0 gst-launch -v playbin uri=file:/home/root/big-buck-bunny-480p-surround.avi
+
  amixer set -D hw:0 'Headset' 0dB
 
+
  amixer set -D hw:0 'HeadsetL Mixer AudioL2' on
= TFT and Touchscreen =
+
  amixer set -D hw:0 'HeadsetR Mixer AudioR2' on
 
 
Seiko 7.0 inch WVGA (800 x RGB x 480) TFT:
 
fw_setenv bootargs-base 'console=ttyS2,115200n8 console=tty0 omapdss.def_disp=lcd-70 omapfb.mode=dvi:1024x768MR-32@60'
 
 
 
Powertip 4.3 inch (480 x RGB x 272) TFT:
 
  fw_setenv bootargs-base 'console=ttyS2,115200n8 console=tty0 omapdss.def_disp=lcd-43 omapfb.mode=dvi:1024x768MR-32@60'
 
 
 
DVI output:
 
  fw_setenv bootargs-base 'console=ttyS2,115200n8 console=tty0 omapdss.def_disp=dvi omapfb.mode=dvi:1024x768MR-32@60'
 
 
 
Edit the InputDevice section in your xorg.conf
 
 
 
cat >> /etc/X11/xorg.conf << EOF
 
Section "InputDevice"
 
        Identifier      "Configured Touchscreen"
 
        Driver          "tslib"
 
        Option          "CorePointer"          "true"
 
        Option          "SendCoreEvents"        "true"
 
        Option          "Device"                "/dev/input/touchscreen0"
 
        Option          "Protocol"              "Auto"
 
EndSection
 
EOF
 
 
 
Add "Configured Touchscreen" in "ServerLayout" section and remove "Configured Mouse"
 
Section "ServerLayout"
 
    Identifier    "Default Layout"
 
    Screen        "Default Screen"
 
    InputDevice    "Generic Keyboard"
 
#  InputDevice    "Configured Mouse"
 
    InputDevice    "Configured Touchscreen"
 
    Option        "AllowEmptyInput" "no"
 
EndSection
 
  
Edit /etc/formfactor/machconfig like this
+
Then you can easily play a wav sound, for example
HAVE_TOUCHSCREEN=1
 
HAVE_KEYBOARD=0
 
  
calibrate your touchscreen
+
aplay sample.wav
  
for Powertip 4.3 inch (480 x RGB x 272) TFT:
+
= How to get sound in (audio in) =
  
echo -n "8407 -476 -31410144 3 -4861 38051952 655366" > /etc/pointercal
+
You can record audio in with
  
for Seiko 7.0 inch WVGA (800 x RGB x 480) TFT:
+
  arecord -t wav -c 2 -r 44100 -f S16_LE -v audio-in.wav
   
 
echo -n "13714 0 -56041568 1 -8076 63332096 6553665536" > /etc/pointercal
 
  
or calibrate it yourself until you are happy with the result, for example:
+
Following output is expected on console
  
<pre>
+
Recording WAVE 'audio-in.wav'&nbsp;: Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
  /etc/init.d/xserver-nodm stop
+
Plug PCM: Hardware PCM card 0 'TWL4030' device 0 subdevice 0
 +
Its setup is:
 +
stream      &nbsp;: CAPTURE
 +
access      &nbsp;: RW_INTERLEAVED
 +
format      &nbsp;: S16_LE
 +
subformat  &nbsp;: STD
 +
channels    &nbsp;: 2
 +
  rate        &nbsp;: 44100
 +
exact rate  &nbsp;: 44100 (44100/1)
 +
msbits      &nbsp;: 16
 +
buffer_size &nbsp;: 32768
 +
period_size &nbsp;: 2048
 +
period_time &nbsp;: 46439
 +
tick_time  &nbsp;: 7812
 +
tstamp_mode &nbsp;: NONE
 +
period_step &nbsp;: 1
 +
sleep_min  &nbsp;: 0
 +
avail_min  &nbsp;: 2048
 +
xfer_align  &nbsp;: 2048
 +
start_threshold &nbsp;: 1
 +
stop_threshold  &nbsp;: 32768
 +
silence_threshold: 0
 +
silence_size&nbsp;: 0
 +
boundary    &nbsp;: 1073741824
  
TSLIB_CALIBFILE=/etc/pointercal TSLIB_TSDEVICE=/dev/input/touchscreen0 TSLIB_CONSOLEDEVICE=none ts_calibrate
+
When ever you think you want to stop just press CONTRL+C
  
  /etc/init.d/xserver-nodm start
+
= How to get user button =
</pre>
 
  
= Modem =
+
There is one button on the BASE0010 board which can be used by the software for user interaction.
  
= CAN =
+
The kernel driver creates a device in /dev/input directory. To access to the button you will use the Linux Input Device subsystem. In Particular evdev, which is a generic input event interface. It passes the events generated in the kernel straight to the program, with timestamps. The event codes are the same on all architectures and are hardware independent.
  
Several tools are provided by socketCAN:
+
For example, the test program evtest ([http://beagleboard.googlecode.com/files/evtest.c evtest.c]) listens on the /dev/input/event0 file descriptor, trying to read any events
  
* candump: dump traffic on a CAN network
+
evtest /dev/input/event0
* cansend: simple command line tool to send CAN-frames via CAN_RAW sockets
 
* cangen: CAN frames generator for testing purpose
 
* canplayer: send CAN frames from a file to a CAN interface
 
  
  /sbin/ip link set can0 up type can bitrate 125000
+
  Input driver version is 1.0.0
 +
Input device ID: bus 0x19 vendor 0x1 product 0x1 version 0x100
 +
Input device name: "gpio-keys"
 +
Supported events:
 +
  Event type 0 (Sync)
 +
  Event type 1 (Key)
 +
    Event code 276 (ExtraBtn)
 +
Testing ... (interrupt to exit)
  
On the receiver side:
+
If you'll press the button you'll see
  
  candump can0
+
  Event: time 8354.388305, type 1 (Key), code 276 (ExtraBtn), value 0
 +
Event: time 8354.388335, -------------- Report Sync ------------
 +
Event: time 8354.573364, type 1 (Key), code 276 (ExtraBtn), value 1
 +
Event: time 8354.573364, -------------- Report Sync ------------
  
On the sender side:  
+
For more information please read:  
  
cansend can0 123#AABBCCDD
+
#linux-2.6/Documentation/input/input.txt
cansend can0 123#R
+
#linux-2.6/Documentation/input/input-programming.txt
cansend can0 1F334455#1122334455667788
 
cansend can0 1F334455#R
 
  
On the receiver side, you must see the following messages:
 
  
can0  123  [4] AA BB CC DD
+
{{Navigation/IGEP Technology Guides/What can I do/Ending|device=BASE0010}}
can0  123  [0] remote request
 
can0  1F334455  [8] 11 22 33 44 55 66 77 88
 
can0  1F334455  [0] remote request
 
  
Switch roles and do again
+
[[Category:Work in progress]]
 +
[[Category:Tutorials]]

Latest revision as of 15:21, 18 January 2013

Redirect to:


If you have successfully completed the getting started guide for BASE0010, you can follow this first introduction about what can you do with this board:

[[Image:{{{Image}}}|100px|center|link={{{Community_MainPage}}}]]

{{{Name}}}

  • [{{{ISEE_MainPage}}} Product Page]
  • [{{{ISEE_Hardware}}} Hardware manual]
  • {{{Name}}} guides:
  1. [[{{{Community_Guides_1}}}|Getting started]]
  2. [[{{{Community_Guides_2}}}|What can I do with {{{Name}}}]]
  3. Start developing

How to get DVI output

By default the DVI is outputs 1024 x 768 @ 60Hz, so if your monitor support this resolution you'll see the desktop when board is up.

Unfortunately the capability to automatically set the display resolution to match your monitor isn't yet available. The simplest method to customize the display resolution is to set it using [[How do I edit my kernel command line | kernel command line]

The required arguments use the following pattern: omapfb.mode=<display>:<resolutionMR-bpp@refresh> omapdss.def_disp=<display> where:

For example:

omapdss.def_disp=dvi omapfb.mode=1024x768MR-16@60
omapdss.def_disp=dvi omapfb.mode=hd720-16@60

See also: How do I edit my kernel command line.

How to configure ethernet

There are two Ethernets on the BASE0010 board which can be used, for example if your access to the internet is via a route you can configure one of them with following command:

ifconfig eth0 up
udhcpc -i eth0

For second interface just change the eth0 device for eth1

How to get sound out (audio out)

The amplifiers for the headset output are disabled by default, so the first thing you'll do is enable these amplifiers with

amixer set -D hw:0 'Headset' 0dB
amixer set -D hw:0 'HeadsetL Mixer AudioL2' on
amixer set -D hw:0 'HeadsetR Mixer AudioR2' on

Then you can easily play a wav sound, for example

aplay sample.wav

How to get sound in (audio in)

You can record audio in with

arecord -t wav -c 2 -r 44100 -f S16_LE -v audio-in.wav

Following output is expected on console

Recording WAVE 'audio-in.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
Plug PCM: Hardware PCM card 0 'TWL4030' device 0 subdevice 0
Its setup is:
stream       : CAPTURE
access       : RW_INTERLEAVED
format       : S16_LE
subformat    : STD
channels     : 2
rate         : 44100
exact rate   : 44100 (44100/1)
msbits       : 16
buffer_size  : 32768
period_size  : 2048
period_time  : 46439
tick_time    : 7812
tstamp_mode  : NONE
period_step  : 1
sleep_min    : 0
avail_min    : 2048
xfer_align   : 2048
start_threshold  : 1
stop_threshold   : 32768
silence_threshold: 0
silence_size : 0
boundary     : 1073741824

When ever you think you want to stop just press CONTRL+C

How to get user button

There is one button on the BASE0010 board which can be used by the software for user interaction.

The kernel driver creates a device in /dev/input directory. To access to the button you will use the Linux Input Device subsystem. In Particular evdev, which is a generic input event interface. It passes the events generated in the kernel straight to the program, with timestamps. The event codes are the same on all architectures and are hardware independent.

For example, the test program evtest (evtest.c) listens on the /dev/input/event0 file descriptor, trying to read any events

evtest /dev/input/event0
Input driver version is 1.0.0
Input device ID: bus 0x19 vendor 0x1 product 0x1 version 0x100
Input device name: "gpio-keys"
Supported events:
 Event type 0 (Sync)
 Event type 1 (Key)
   Event code 276 (ExtraBtn)
Testing ... (interrupt to exit)

If you'll press the button you'll see

Event: time 8354.388305, type 1 (Key), code 276 (ExtraBtn), value 0
Event: time 8354.388335, -------------- Report Sync ------------
Event: time 8354.573364, type 1 (Key), code 276 (ExtraBtn), value 1
Event: time 8354.573364, -------------- Report Sync ------------

For more information please read:

  1. linux-2.6/Documentation/input/input.txt
  2. linux-2.6/Documentation/input/input-programming.txt




You have successfully completed this chapter of the guide.


Continue this tutorial guide: 3/3 - Start developing under IGEP Technology
Igep forum.png If you have any question, don't ask to ask at the IGEP Community Forum or the IGEP Community Chat Irc.png