Difference between revisions of "User:Pau pajuelo"

From IGEP - ISEE Wiki

Jump to: navigation, search
m
m
Line 14: Line 14:
  
 
Link all development tools documentation when possible
 
Link all development tools documentation when possible
 +
 +
= Overview<br>  =
 +
 +
This How-To is meant to be a starting point for people to learn use UART for IGEPv2 devices as quickly and easily as possible. In this how-to, we use [http://releases.linaro.org/platform/linaro-m/headless/final/linaro-m-headless-tar-20101108-2.tar.gz Linaro Headless] with [[Linux Kernel 2.6.35.y|Kernel 2.6.35.y]] and [http://labs.isee.biz/images/e/ee/Uart-test-beta2.tar.bz2 UART test program]
 +
 +
More information about [http://en.wikipedia.org/wiki/UART UART].
 +
 +
'''Note''': This program has a debug option using GPIOs to debug via oscilloscope, this option is useful to learnt about the Kernel latencies. Debug has set to "write" and "select" functions.
 +
 +
[[Frequently Asked Questions and Their Answers#How_many_UARTs_are_available.3F|More information]]
 +
 +
= Feedback and Contributing  =
 +
 +
At any point, if you see a mistake you can contribute to this How-To.
 +
 +
= Preparing IGEP  =
 +
 +
=== Configure UART1 and UART3 in IGEP with RS232 levels on J960 connector  ===
 +
 +
To test UARTs we use UART1 (dev/ttyS0) and UART3 (dev/ttyS2) via J960 connector using RS232 standard.
 +
 +
NOTE: Make sure that you installed open SSH server. If you don't have it go [[How to forge a local file system server with IGEP0020 board#Installing_Open_SSH_Server|here]].
 +
 +
By default, UART1 is used by RS485 driver, we need to disable it, edit igep.ini file: <br>
 +
<pre>board.ei485= yes
 +
</pre>
 +
UART1 is configured in RS232 driver, when igep line is replaced by (or type in -Maybe you don't found this line-):<br>
 +
<pre>board.ei485= no
 +
</pre>
 +
By default, UART3 is used by Kernel serial console, we need to disable it, go to igep.ini file, comment next line: <br>
 +
<pre>console=ttyS2,115200n8</pre>
 +
=== Check UARTs devices  ===
 +
 +
Make sure that Kernel detects UARTs, type:
 +
<pre>dmesg | grep tty</pre>
 +
The result will be similar at that:
 +
<pre>root@localhost:~/PROGRAM# dmesg | grep tty
 +
[    0.000000] console [tty0] enabled
 +
[    0.598999] serial8250.0: ttyS0 at MMIO 0x4806a000 (irq = 72) is a ST16654
 +
[    0.784057] serial8250.1: ttyS1 at MMIO 0x4806c000 (irq = 73) is a ST16654
 +
[    0.969085] serial8250.2: ttyS2 at MMIO 0x49020000 (irq = 74) is a ST16654
 +
[    1.153503] serial8250.3: ttyS3 at MMIO 0x49042000 (irq = 80) is a ST16654
 +
root@localhost:~/PROGRAM# </pre>
 +
Get information about UARTs, type:
 +
<pre>setserial -g /dev/ttyS[0123]</pre>
 +
The result will be similar at that:
 +
<pre>root@localhost:~/PROGRAM# setserial -g /dev/ttyS*
 +
/dev/ttyS0, UART: 16654, Port: 0x0000, IRQ: 72
 +
/dev/ttyS1, UART: 16654, Port: 0x0000, IRQ: 73
 +
/dev/ttyS2, UART: 16654, Port: 0x0000, IRQ: 74
 +
/dev/ttyS3, UART: 16654, Port: 0x0000, IRQ: 80
 +
root@localhost:~/PROGRAM# </pre>
 +
If you don't have setserial installed type:
 +
<pre>apt-get install setserial</pre>
 +
NOTE: Starting from Kernel 2.6.37.y, ttySx are named ttyOx. You need to edit source program.
 +
 +
=== Connect peripherals  ===
 +
 +
Connect IGEPv2 board using J960 connector like this:
 +
<pre> J960   
 +
                  ------ 
 +
    (Not used) x---| 1  2 |---o (Connect to 8)
 +
(Connect to 9) o---| 3  4 |---x (Not used)
 +
        (GND)·|---| 5  6 |---|· (GND)
 +
    (Not used)x---| 7  8 |---o (Connect to 2)
 +
(Connect to 3) o---| 9 10 |---x (Not used)
 +
                  ------ 
 +
</pre>
 +
=== Send some data  ===
 +
 +
Use minicom to prove it, open two terminals via SSH&nbsp;and log with root user:
 +
 +
Terminal 1:
 +
<pre>minicom -D /dev/ttyS0</pre>
 +
Terminal 2:
 +
<pre>minicom -D /dev/ttyS2 </pre>
 +
Type something in one terminal.
 +
 +
{| cellspacing="1" cellpadding="1" width="200" border="1" align="center"
 +
|-
 +
| style="text-align: left;" | [[Image:Minicom screenshot.png|640x400px]]
 +
|}
 +
 +
= Schematics  =
 +
 +
=== RS232 Schematic Igep V2  ===
 +
 +
{| cellspacing="1" cellpadding="1" border="1" align="center"
 +
|-
 +
| [[Image:RS232 Schematic Igep V2.png|800x531px]]
 +
|}
 +
 +
<br>
 +
 +
=== Uart Schematic Igep Module  ===
 +
 +
{| cellspacing="1" cellpadding="1" width="200" border="1" align="center"
 +
|-
 +
| [[Image:Uart Schematic Igep Module.png|581x600px]]
 +
|}
 +
 +
= Compile and run program  =
 +
 +
Download [http://labs.isee.biz/images/e/ee/Uart-test-beta2.tar.bz2 program source].
 +
 +
As explained above, the program uses GPIO for debug option via oscilloscope, it is necessary install user-gpio-drv.ko driver inside Linux Kernel, more information [[How to use GPIOs|here]] .
 +
 +
There are some interesting things to configure, before compiling the program. Open it, seek next lines:
 +
<pre>//Define Array char size
 +
#define SIZE 30
 +
//Define Debug mode:0==Disable
 +
#define DEBUG 0
 +
 +
//Define wait select
 +
#define WAIT 5
 +
 +
//Set GPIO Debugger port
 +
//Be sure that mux is correctly configured and GPIOs are not used
 +
#define GPIO1 136
 +
#define GPIO2 137 </pre>
 +
Constant SIZE: it determines the max number of char than can be sent<br>
 +
 +
Constant DEBUG: it can break program infinite loop part, it can be useful to debug some errors, 0 (infinite loop) or positive number determine loop max entrances
 +
 +
Constant WAIT: it configurea select max time.
 +
 +
Constants GPIO1 and GPIO2: they configure GPIOs used for debug via oscilloscope. Take care to configure mux and don't use them for other purposes<br>
 +
 +
Once you have installed module. Compile program using your Cross Compiler, I used arm-linux-gnueabi-:
 +
<pre>arm-linux-gnueabi-gcc uart-test-beta1.c -o uart-test-beta1 </pre>
 +
= Testing UART  =
 +
 +
Some tests do it:
 +
 +
=== Decode Characters  ===
 +
 +
Decoded with [http://www.asciitable.com/ ASCII table].
 +
 +
{| cellspacing="1" cellpadding="1" width="200" border="1" align="center"
 +
|-
 +
| [[Image:Uart decode1withlf.JPG|350x230px]]
 +
| [[Image:Uart decode0withlf.JPG|350x230px]]
 +
| [[Image:Uart decode100000withlf.JPG|350x230px]]
 +
|-
 +
| Decoding "1\n"
 +
| Decoding "0\n"
 +
| Decoding "100000\n"
 +
|}
 +
 +
Click to enlarge image
 +
 +
=== select timeout  ===
 +
 +
Program sends information via UART1 but don't receive response via UART3, because only a process is executed. This problem is repeated every 5 seconds (constant WAIT=5) until other process sends information via UART3 at the same speed. If "select" hasn't been implemented, process would have stayed blocked.<br>
 +
 +
{| cellspacing="1" cellpadding="1" width="200" border="1" align="center"
 +
|-
 +
| [[Image:Uart select timeout9.JPG|350x230px]]
 +
|-
 +
| UART1=Blue and UART3=Green
 +
|}
 +
 +
Click to enlarge image
 +
 +
=== RS232 Voltage params  ===
 +
 +
More information [http://en.wikipedia.org/wiki/RS-232#Standard_details here].
 +
 +
{| cellspacing="1" cellpadding="1" width="200" border="1" align="center"
 +
|-
 +
| [[Image:Uart voltageparams8.JPG|350x230px]]
 +
|-
 +
| Vpp=11.8V aprox , Vmin=-5.6V aprox
 +
|}
 +
 +
Click to enlarge image
 +
 +
=== Speed Overview  ===
 +
 +
Note that wave is degraded when speed is higher
 +
 +
{| cellspacing="1" cellpadding="1" width="200" border="1" align="center"
 +
|-
 +
| [[Image:Uart 300 o.JPG|260x172px]]
 +
| [[Image:Uart 4800 o.JPG|260x172px]]
 +
| [[Image:Uart 115200 o.JPG|260x172px]]
 +
| [[Image:Uart 3000000 o.JPG|260x172px]]
 +
|-
 +
| Overview signal to 300 bauds
 +
| Overview signal to 4800 bauds
 +
| Overview signal to 115200 bauds
 +
| Overview signal to 3000000 bauds
 +
|-
 +
| [[Image:Uart 300 s.JPG|260x172px]]
 +
| [[Image:Uart 4800 s.JPG|260x172px]]
 +
| [[Image:Uart 115200 s.JPG|260x172px]]
 +
| [[Image:Uart 3000000 s.JPG|260x172px]]
 +
|-
 +
| Specific wave to 300 bauds
 +
| Specific wave to 4800 bauds
 +
| Specific wave to 115200 bauds<br>
 +
| Specific wave to 3000000 bauds<br>
 +
|}
 +
 +
Click to enlarge image
 +
 +
=== Lag  ===
 +
 +
You can see that RS232 have some lag between transmisions. This caused mainly by kernel process management. UART peripheral is controlled by Linux and It isn't a [http://en.wikipedia.org/wiki/Real-time_operating_system real-time operating system].&nbsp;
 +
 +
{| cellspacing="1" cellpadding="1" width="200" border="1" align="center"
 +
|-
 +
| [[Image:Uart lag left6.JPG|350x230px]]
 +
| [[Image:Uart lag right7.JPG|350x230px]]select: blocked until all data is available.
 +
|-
 +
| Lag between UART1 and UART3 (300 bauds)
 +
| Lag between UART3 and UART1 (300 bauds)
 +
|}
 +
 +
Click to enlarge image
 +
 +
This program have three I/O functions that connect to UART driver via ioctl: (read(), write() and select()). But select() and write() change process stat to sleep mode until system don't receive or transmit all information via UART. "select" function is used to prevent that read function can be blocked when data aren't available. <br>The next images (program with debug_gpio enabled and 300 bauds speed) show when process is executed or is waiting. Blue=UART1, Violet="write" and Green="select". When GPIO has HIGH value, process is blocked.<br>
 +
 +
{| cellspacing="1" cellpadding="1" width="200" border="1" align="center"
 +
|-
 +
| [[Image:Uart select5.JPG|260x172px]]
 +
| [[Image:Uart select to write1.JPG|260x172px]]
 +
| [[Image:Uart write2.JPG|260x172px]]
 +
| [[Image:Uart write to select0.JPG|260x172px]]
 +
|-
 +
| select function time
 +
| Time between select and write
 +
| write function time
 +
| Time between write and select
 +
|}
 +
 +
Click to enlarge image<br>
 +
 +
In this case:
 +
 +
select: blocked until all data is available (LF char received).
 +
 +
write: blocked until all data is send to UART buffer.
 +
 +
=== Error test  ===
 +
 +
Every full process the number is increased twice. Program checks that this condicion is true, if it isn't accomplished, process will be finish.
 +
 +
{| cellspacing="1" cellpadding="1" width="200" border="1" align="center"
 +
|-
 +
| [[Image:Uart error test2.png|640x400px]]
 +
|-
 +
| Runs 16h without any transfer error (3000000 bauds)<br>
 +
|}
 +
 +
<br>
 +
 +
[[Category:UART]]
  
 
= Getting started with IGEPv2 Expansion<br>  =
 
= Getting started with IGEPv2 Expansion<br>  =

Revision as of 12:29, 22 August 2012

TODO:

Update peripheral tutorials

Categorize new tutorials

Upgrade ethernet gadget tutorial for new IGEP firmware and VM

Finish tutorials below

igep.ini table

Upgrade IGEP Technology Devices Guides

Link all development tools documentation when possible

Overview

This How-To is meant to be a starting point for people to learn use UART for IGEPv2 devices as quickly and easily as possible. In this how-to, we use Linaro Headless with Kernel 2.6.35.y and UART test program

More information about UART.

Note: This program has a debug option using GPIOs to debug via oscilloscope, this option is useful to learnt about the Kernel latencies. Debug has set to "write" and "select" functions.

More information

Feedback and Contributing

At any point, if you see a mistake you can contribute to this How-To.

Preparing IGEP

Configure UART1 and UART3 in IGEP with RS232 levels on J960 connector

To test UARTs we use UART1 (dev/ttyS0) and UART3 (dev/ttyS2) via J960 connector using RS232 standard.

NOTE: Make sure that you installed open SSH server. If you don't have it go here.

By default, UART1 is used by RS485 driver, we need to disable it, edit igep.ini file:

board.ei485= yes

UART1 is configured in RS232 driver, when igep line is replaced by (or type in -Maybe you don't found this line-):

board.ei485= no

By default, UART3 is used by Kernel serial console, we need to disable it, go to igep.ini file, comment next line:

console=ttyS2,115200n8

Check UARTs devices

Make sure that Kernel detects UARTs, type:

dmesg | grep tty

The result will be similar at that:

root@localhost:~/PROGRAM# dmesg | grep tty
[    0.000000] console [tty0] enabled
[    0.598999] serial8250.0: ttyS0 at MMIO 0x4806a000 (irq = 72) is a ST16654
[    0.784057] serial8250.1: ttyS1 at MMIO 0x4806c000 (irq = 73) is a ST16654
[    0.969085] serial8250.2: ttyS2 at MMIO 0x49020000 (irq = 74) is a ST16654
[    1.153503] serial8250.3: ttyS3 at MMIO 0x49042000 (irq = 80) is a ST16654
root@localhost:~/PROGRAM# 

Get information about UARTs, type:

setserial -g /dev/ttyS[0123]

The result will be similar at that:

root@localhost:~/PROGRAM# setserial -g /dev/ttyS*
/dev/ttyS0, UART: 16654, Port: 0x0000, IRQ: 72
/dev/ttyS1, UART: 16654, Port: 0x0000, IRQ: 73
/dev/ttyS2, UART: 16654, Port: 0x0000, IRQ: 74
/dev/ttyS3, UART: 16654, Port: 0x0000, IRQ: 80
root@localhost:~/PROGRAM# 

If you don't have setserial installed type:

apt-get install setserial

NOTE: Starting from Kernel 2.6.37.y, ttySx are named ttyOx. You need to edit source program.

Connect peripherals

Connect IGEPv2 board using J960 connector like this:

 J960    
                  ------  
    (Not used) x---| 1  2 |---o (Connect to 8)
(Connect to 9) o---| 3  4 |---x (Not used)
         (GND)·|---| 5  6 |---|· (GND)
     (Not used)x---| 7  8 |---o (Connect to 2)
(Connect to 3) o---| 9 10 |---x (Not used)
                  ------  

Send some data

Use minicom to prove it, open two terminals via SSH and log with root user:

Terminal 1:

minicom -D /dev/ttyS0

Terminal 2:

minicom -D /dev/ttyS2 

Type something in one terminal.

Minicom screenshot.png

Schematics

RS232 Schematic Igep V2

RS232 Schematic Igep V2.png


Uart Schematic Igep Module

Uart Schematic Igep Module.png

Compile and run program

Download program source.

As explained above, the program uses GPIO for debug option via oscilloscope, it is necessary install user-gpio-drv.ko driver inside Linux Kernel, more information here .

There are some interesting things to configure, before compiling the program. Open it, seek next lines:

//Define Array char size
#define SIZE 30
//Define Debug mode:0==Disable
#define DEBUG 0

//Define wait select
#define WAIT 5

//Set GPIO Debugger port
//Be sure that mux is correctly configured and GPIOs are not used
#define GPIO1 136
#define GPIO2 137 

Constant SIZE: it determines the max number of char than can be sent

Constant DEBUG: it can break program infinite loop part, it can be useful to debug some errors, 0 (infinite loop) or positive number determine loop max entrances

Constant WAIT: it configurea select max time.

Constants GPIO1 and GPIO2: they configure GPIOs used for debug via oscilloscope. Take care to configure mux and don't use them for other purposes

Once you have installed module. Compile program using your Cross Compiler, I used arm-linux-gnueabi-:

arm-linux-gnueabi-gcc uart-test-beta1.c -o uart-test-beta1 

Testing UART

Some tests do it:

Decode Characters

Decoded with ASCII table.

Uart decode1withlf.JPG Uart decode0withlf.JPG Uart decode100000withlf.JPG
Decoding "1\n" Decoding "0\n" Decoding "100000\n"

Click to enlarge image

select timeout

Program sends information via UART1 but don't receive response via UART3, because only a process is executed. This problem is repeated every 5 seconds (constant WAIT=5) until other process sends information via UART3 at the same speed. If "select" hasn't been implemented, process would have stayed blocked.

Uart select timeout9.JPG
UART1=Blue and UART3=Green

Click to enlarge image

RS232 Voltage params

More information here.

Uart voltageparams8.JPG
Vpp=11.8V aprox , Vmin=-5.6V aprox

Click to enlarge image

Speed Overview

Note that wave is degraded when speed is higher

Uart 300 o.JPG Uart 4800 o.JPG Uart 115200 o.JPG Uart 3000000 o.JPG
Overview signal to 300 bauds Overview signal to 4800 bauds Overview signal to 115200 bauds Overview signal to 3000000 bauds
Uart 300 s.JPG Uart 4800 s.JPG Uart 115200 s.JPG Uart 3000000 s.JPG
Specific wave to 300 bauds Specific wave to 4800 bauds Specific wave to 115200 bauds
Specific wave to 3000000 bauds

Click to enlarge image

Lag

You can see that RS232 have some lag between transmisions. This caused mainly by kernel process management. UART peripheral is controlled by Linux and It isn't a real-time operating system

Uart lag left6.JPG Uart lag right7.JPGselect: blocked until all data is available.
Lag between UART1 and UART3 (300 bauds) Lag between UART3 and UART1 (300 bauds)

Click to enlarge image

This program have three I/O functions that connect to UART driver via ioctl: (read(), write() and select()). But select() and write() change process stat to sleep mode until system don't receive or transmit all information via UART. "select" function is used to prevent that read function can be blocked when data aren't available.
The next images (program with debug_gpio enabled and 300 bauds speed) show when process is executed or is waiting. Blue=UART1, Violet="write" and Green="select". When GPIO has HIGH value, process is blocked.

Uart select5.JPG Uart select to write1.JPG Uart write2.JPG Uart write to select0.JPG
select function time Time between select and write write function time Time between write and select

Click to enlarge image

In this case:

select: blocked until all data is available (LF char received).

write: blocked until all data is send to UART buffer.

Error test

Every full process the number is increased twice. Program checks that this condicion is true, if it isn't accomplished, process will be finish.

Uart error test2.png
Runs 16h without any transfer error (3000000 bauds)


Getting started with IGEPv2 Expansion


Overview

This is the 1/3 chapter of IGEPv2 Expansion Tutorial Guide.

In this first chapter, we will learn how to connect some expansion peripherals.

Requirements

In these tutorials we are going to need the following components :

  • IGEPv2, +5V DC power supply, Ethernet cable and a PC with Linux or Windows.
  • Powertrip 4.3" or Seiko 7" screen if you need a touch screen.
  • DB9 connector and USB serial converter to follow serial communication tutorial
  • 4 pin connector for CAN Bus with another IGEPv2 and Expansion to follow CAN Bus communication tutorial
  • SIM card with an antenna to follow Telit modem tutorial
  • Composite video cable, composite video output peripheral (PAL or NTSC) and a screen to follow TVP5151 tutorial

Getting started

Connect IGEPv2 Expansion with IGEPv2 Board

Basic

The IGEPv2 Expansion connects to the IGEPv2 Board through J990, JA41, JA42, JC30 and J960 connectors. Some IGEPv2 Expansion may include three jumpers, you should remove it because they are designed for test and lab purposes. Just take a look on the figure below to mount it:

Igepv2expconnectoigepv2.PNG
Igepv2expconnectoigepv2 2.PNG

TFT and Touchscreen

Basic

IGEP0022 PROTO RA DSC 0142.JPG
IGEPv2 Expansion integrates a LCD backlight driver (Texas instruments TPS61081) and touch screen controller (Texas instruments TSC2046), 4-wire touch screen controller which supports a low-voltage I/O interface which can be directly connected to a SEIKO 7” LCD or to a POWERTIP 4.3” LCD. Use J301 connector for POWERTRIP 4.3" or use J302, J303 and J304 connector for SEIKO 7".

Know more

IGEPv2 Expansion integrates LCD backlight driver (TPS61081) and touch screen controller (TSC2046), a 4-wire touch screen controller which supports a low voltage I/O interface from 1.5V to 5.25V.

Serial port

Basic
Igepv2expdb9connector.PNG

IGEPv2 Expansion integrates a DB9 RS232 connector. Plug a DB9 cable.

Know more

This peripheral (UART 3) can be used to debug system using kernel traces, getting a remote prompt, etc.


VGA monitor

Basic 

Igepv2expconnecttovga.jpg Igepv2expvgaconnector.PNG

IGEPv2 Expansion integrates a VGA connector, the output VGA signal is equal to HDMI connector. Plug a monitor with VGA input.

Know more

This output is controled by ADV7125KSTZ140 Integrated Circuit.




CAN bus

Basic

Igepv2expcanconnector.PNG
IGEPv2 Expansion integrates a CAN peripheral. Connect any CAN bus device or network to the CAN bus connector (J703).

Know more

This output is controled by MICROCHIP MCP2515. J703 is a 3.5 mm pitch terminal blocks 4 Positions:

Signal Name Pin #
Description
VDD_CAN J703:1 Supply Voltage (+5V DC)
CANL J703:2 CAN Low-Level Voltage I/O
GND J703:3 Ground
CANH J703:4 CAN High-Level Voltage I/O

GSM/GPRS modem

Basic

IGEP0022 Modem with antenna.png
Igepv2expcardreader.PNG
GSM-GPRS antenna (highly recommended) SIM card reader

IGEPv2 Expansion integrates a GSM/GPRS modem to make phone calls or to send SMS or to write and read data from it, etc.

Know more Modem chip Telit GE865 is a small GSM/GPRS Ball-Grid-Array BGA module with next main features:

  • Quad-band EGSM 850 / 900 / 1800 / 1900 MHz
  • Power consumption (typical values)

    - Power off: ‹ 62 uA
    - Idle (registered, power saving): 1.6 mA @ DRX=9


Composite Video Decoder

Basic

Igepv2expvideocompositeconnector.PNG
IGEPv2 Expansion integrates two composite video connectors to decode analog input signal. Plug some peripheral with video composite output.

Know more

Analog input is decoded by TVP5151.


----


You have successfully completed this chapter of the guide.


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


What can i do with igepv2 expansion



Overview

This is the 2/3 chapter of IGEPv2 Expansion Tutorial Guide.

We will learn some basic tasks such add support to IGEPv2 Expansion, control some peripherals, etc.

What can I do

How to use Serial communication (DB9 connector)

Basic

RS232 link for UART 3 (/dev/ttyO2) can be obtained through J502 DB9 connector. You can use PuTTy to get a shell prompt to IGEP:

  • Power up IGEPv2
  • Open PuTTy.
  • Choose Serial line. If you are running PuTTy on Windows, the Serial line will be like (COM1 or COM2 or COM3, etc.). If you are running PuTTy on Ubuntu, the Serial line will be like (/dev/ttyS0 or /dev/ttyS1 or /dev/ttyS3, etc.). Note that if you are using a USB->Serial converter, the Serial line will be like /dev/ttyUSB0
  • Configure Speed to 115200
  • Select Serial Connection type
  • Press on Open button
  • You will successfully started the console.


IGEPV2EXPCHMDB9.png Remoteshellpromptdb9putty.jpg

Know more

Read this tutorial to learn about UARTs.

How to use TFT and Touchscreen

Seiko a Powertip touch screens are not supported by default in IGEPv2. Use the following steps for it:

ssh root@192.168.5.1 
mkdir /tmp/temp
mount -t jffs2 /dev/mtdblock1 /tmp/temp 
vi /tmp/temp/igep.ini 
  • In Seiko screen add the following line:
omapdss.def_disp=lcd-70
  • In Powertip screen add the following line:
omapdss.def_disp=lcd-43
  • Save changes and reboot your IGEP Device to finish it.

How to use Telit Modem

Basic

Telit modem is not supported by default in IGEPv2. Use the following steps for it:

ssh root@192.168.5.1 
mkdir /tmp/temp
mount -t jffs2 /dev/mtdblock1 /tmp/temp 
vi /tmp/temp/igep.ini 
  • Add the following line (press i to insert content):
buddy.modem=yes
  • Save changes (ESC -> :wq -> Enter) and reboot your IGEP Device
  • Power up the modem. You can power off using again these commands:
echo 0 > /sys/class/gpio/gpio140/value
echo 1 > /sys/class/gpio/gpio141/value
sleep 1
echo 0 > /sys/class/gpio/gpio141/value
  • Once the modem is on (led D401, near SIM card reader, is blinking now), you can interact with it via UART 2. You can use Microcom to comunicate with it from the serial debug console:
microcom -s 115200 /dev/ttyO1
  • To check the modem status use the command:
at
  • Answer should be OK.
  • Now unlock it by inserting your SIM card PIN number. Use the command:
at+cpin=<PIN>
  • If you correctly inserted the PIN number, the answer should be OK. If you fail more than 3 times, your SIM card will lock and you will have to insert PUK number.
  • Now you are ready to use the GSM/GPS modem.

Examples

If you successfully followed the the previous instructions, you are ready to test the GSM/GPRS modem. Here are some examples:

You can check the complete list of AT commands at the Official manufacturer Software User Guide.

Test received signal strength

Use the instruction:

at+csq

The answer should be: +CSQ: X,0, where X is the signal strenght. For example 12 is poor and 18 is good. If the answer is +CSQ:99,99 you should check your coverage or use an antenna

Making a phone call

Use the instruction, replace number_to_call with your number:

atd number_to_call

Press any key to end call

NOTE: If "NO CARRIER" message appears, check your coverage or use an antenna.

Sending a SMS

First of all, you need to configure the SMS format type. Telit GE865 GSM/GPRS supports PDU format and Text format. We use Text format. Type the following command:

AT+CMGF=1

There are so many ways in this modem to send a message. Here you have a simple example. Use the instruction, replace destination_number with your number:

at+cmgs= destination_number
> insert here your text message

When you are ready to send your message use Ctrl+Z to send it.

If you want to cancel or restart the message press ESC.

NOTE: If "NO CARRIER" message appears, check your coverage or use an antenna.

NOTE: Don't use special characters in SMS text message like <`´'">.

Know more

Here you have the official manuals from the manufacturer's webpage:

How to use TVP5151 Video Decoder

Basic

Use the following steps to capture analog video:

  • Connect a video composite input to J501 connector from IGEPv2 Expansion (near CAN Bus)
  • Connect a screen, for example HDMI monitor.
  • Log into IGEPv2 (via SSH, as shown in the previous chapter), and run the following commands:
ssh root@192.168.5.1 
  • Now you have a remote igep terminal
  • Refresh repositories and accept it.
zypper ref 
  • Install video4linux2 plugin
zypper in gst-plugins-good-video4linux2
  • Load OMAP ISP kernel module
modprobe omap3-isp
  • Configure ISP, for PAL resulution use 720x576 for NTSC resolution use 720x480:
media-ctl -r -l '"tvp5150 2-005c":0->"OMAP3 ISP CCDC":0[1], "OMAP3 ISP CCDC":1->"OMAP3 ISP CCDC output":0[1]'
media-ctl -v --set-format '"tvp5150 2-005c":0 [UYVY 720x480]'
media-ctl -v --set-format '"OMAP3 ISP CCDC":0 [UYVY 720x480]'
media-ctl -v --set-format '"OMAP3 ISP CCDC":1 [UYVY 720x480]' 
  • Export display
export DISPLAY=:0.0 
  • Launch gstreamer
gst-launch-0.10 -v v4l2src device=/dev/video2 queue-size=8 ! video/x-raw-yuv,format=\(fourcc\)UYVY,width=720,height=480 ! ffmpegcolorspace ! autovideosink
  • Now you can see in your IGEP screen a result similar like this
Igepv2expgstreamercapture.jpg


Know more

You can use other programs like yavta

How to use EEPROM

Basic

The IGEP0022 expansion board provides an AT24C01B serial EEPROM memory which is connected to the OMAP via I2C (register 50).

Use i2c-tools to manage it:

i2cget <bus> <chip> <register>
i2cset <bus> <chip> <register> <value>

For example, the following writes the value 0x22 to register 0x10 of device 0x50 on i2c bus 2:

i2cset -f -y 2 0x50 0x10 0x22
i2cget -f -y 2 0x50 0x10

Know more

See also: i2dump(8), i2cget(8) and i2cset(8) man page

How to use CAN bus (under construction)

You have to connect the two boards like this:

IGEPv2 1             IGEPv2 2
.---                 .---
| 1 |-X            X-| 1 |
| 2 |------------------| 2 | 
| 3 |------------------| 3 |
| 4 |------------------| 4 |
.---                 .---

If this is your first time accessing CAN bus, check J702 jumper is not connected before follow this tutorial. If you don't have this jumper, don't worry because its function is only for testing.

Now you can set up the interface (on all boards when using multiple IGEPv2 EXPANSION connected to a CAN network simultaneously):

/bin/ip link set can0 up type can bitrate 125000

If you want to receive CAN data, use:

candump can0

If you want to send CAN data, use:

cansend can0 -i 0x123 0xaa 0xbb 0xcc 0xdd

On the receiver side, you must see the following messages:

can0  123  [4] aa bb cc dd

Switch roles and try it again

----


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