Difference between revisions of "What can I do with IGEPv2 EXPANSION"

From IGEP - ISEE Wiki

Jump to: navigation, search
m (How to use CAN bus)
m
Line 28: Line 28:
 
|'''Work in progress article. Coming soon!'''
 
|'''Work in progress article. Coming soon!'''
 
|}
 
|}
 +
 +
 +
{{Message/Work in progress}}
 +
 +
 +
= Add support for IGEPv2 EXPANSION  =
 +
 +
The required [[Linux Kernel 2.6.37.y#Scenarios|kernel command line]] option here is:
 +
 +
buddy=igep0022
 +
 +
 
= How to use Serial communication  =
 
= How to use Serial communication  =
Please contribute ..
+
 
 +
* [[Peripherals Summary#UART|UART]]
 +
* [[How to use UARTs| Use UART's]]
 +
* [[:Category:UART]]
 +
 
  
 
= How to get VGA output  =
 
= How to get VGA output  =

Revision as of 10:47, 4 June 2012


What can I do with IGEP BERLIN
If you have successfully completed the [[Getting started with IGEPv2 EXPANSION|first chapter of this guide]], you can continue with this tutorial guide about IGEPv2 EXPANSION.


link=IGEPv2 EXPANSION
IGEPv2 EXPANSION

  • IGEPv2 EXPANSION guides:
  1. [[Getting started with IGEPv2 EXPANSION|Getting started]]
  2. [[What can I do with IGEPv2 EXPANSION|What can I do with IGEPv2 EXPANSION]]
  3. Start developing


Overview
link=IGEPv2 EXPANSION
Work in progress article. Coming soon!


Igep community logo.png This is a work in progress article. Help other developers like you in the IGEP Community by improving it!


Add support for IGEPv2 EXPANSION

The required kernel command line option here is:

buddy=igep0022


How to use Serial communication


How to get VGA output

The required kernel command line option here is omapfb.mode followed by the desired resolution, make sure to select a video mode compatible with your monitor

For example:

omapdss.def_disp=dvi omapfb.mode=dvi:1024x768-16@60

Note that you could connect both a VGA monitor and a DVI-D monitor and see the same image, as long as the video mode is compatible with both monitors.

How to use TFT and Touchscreen

Seiko 7.0 inch WVGA (800 x RGB x 480) TFT:

Add the following line to igep.ini

omapdss.def_disp=lcd-70

Powertip 4.3 inch (480 x RGB x 272) TFT:

Add the following line to igep.ini

omapdss.def_disp=lcd-43


You should reboot your IGEP Device to enable a new resolution configuration.


To configure the touchscreen, add "Configured Touchscreen" in "ServerLayout" section and remove "Configured Mouse" in /etc/X11/xorg.conf

Section "ServerLayout"
Identifier    "Default Layout"
Screen        "Default Screen"
InputDevice    "Generic Keyboard"
#   InputDevice    "Configured Mouse"
InputDevice    "Configured Touchscreen"
Option         "AllowEmptyInput" "no"
EndSection

calibrate it yourself until you are happy with the result, for example:

/etc/init.d/xserver-nodm stop
TSLIB_CALIBFILE=/etc/pointercal TSLIB_TSDEVICE=/dev/input/touchscreen0 TSLIB_CONSOLEDEVICE=none ts_calibrate
/etc/init.d/xserver-nodm start

How to use Telit Modem

The IGEP0022 expansion board provides a Telit GE865 GSM/GPRS modem which is connected to the OMAP via some GPIO pins and UART 2.

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


Here there are a few instructions in order to introduce the Telit modem.

If this is your first time accessing Telit Modem, check J402 and J403 jumpers are not connected before follow this tutorial. If you don't have these jumpers, don't worry because their functions are only for testing.

Insert a valid SIM card to the SIM card reader of your IGEP0022.

Now, you must add the following line at the kernel file (igep.ini) in order to enable GE865 support:

buddy.modem=yes


Now its time to power up your modem. You may read the Official manufacturer Hardware User Guide, where there is a complete explanation about the sequence.

In IGEP0022, the modem is connected to 3 GPIO pins from the OMAP, which are: <omap_pin_name (modem_function)>

  • GPIO_140 (Reset)
  • GPIO_141 (On_Off)
  • GPIO_156 (PWRMON)

You can power up your modem using the following sequence:

(Note: the following instructions are correctly 'toggled' do to pull-up resistors. Refer to schematics at the Official IGEP0022 Hardware Manual from ISEE)

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, 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/ttyS1

(Note: GE865 has auto baud rate detection, so you can use a different speed)

To check the modem status use the command:

at

Answer should be OK.

Note: correcting syntax with 'backspace' may cause error in a serial command if you are not writing the command at first take. Don't type <> when use the following commands

In order to use your GSM/GPRS you should connect the antenna as it is explained in the Getting Started with IGEP0022 article.

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.

(Note: 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 of simple commands:

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 6 is poor and 15 is good. If the answer is +CSQ:99,99 you should check the antenna.

Making a phone call

Use the instruction:

atd <number_to_call>

Press any key to end call

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:

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.

How to use TVP5151 Video Decoder

Requirements




There are two modules that you will use that are not inserted into the kernel: iommu2 (tvp5151) and isp.

You have to load these kernel modules before start:

modprobe iommu2
modprobe omap3-isp

(Note: The first load order must be the iommu2 and then the omap3-isp)



Now, use the program media-ctl. This program is useful to configure the ISP. You can download it from here. Then you have to transfer it to your IGEP0022 (for example via SCP command).

Now you have to configure the ISP and TVP5151:

./media-ctl -r -l '"tvp5150 2-005c":0->"OMAP3 ISP CCDC":0[1], "OMAP3 ISP CCDC":1->"OMAP3 ISP CCDC output":0[1]'

Configure the video capture setup:

./media-ctl --set-format '"tvp5150 2-005c":0 [UYVY 720x628]'

Connect a video camera or any device with PAL output to the Composite Video RCA input connector of the IGEP0022.

Use gstreamer as live stream to capture video from your video source.

Now setup the gstreamer pipeline:

gst-launch-0.10 -v v4l2src device=/dev/video2 queue-size=1 ! video/x-raw-yuv,format=\(fourcc\)UYVY,width=720,height=628 ! omapfbsink

If everything was fine you will see the live video at the screen.

TVP5151 video decoder.jpg
See also: How to setup tvp5151 video decoder

How to use EEPROM

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

You can use easily simple reads/writes to access to the eeprom:

echo "hello world!" > /sys/devices/platform/i2c_omap.2/i2c-2/2-0050/eeprom
cat /sys/devices/platform/i2c_omap.2/i2c-2/2-0050/eeprom

Or read/write from userspace using i2c-tools:

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

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

How to use CAN bus

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


Continue with this tutorial at: Start developing under IGEP Technology