Difference between revisions of "What can I do with IGEP COM MODULE"

From IGEP - ISEE Wiki

Jump to: navigation, search
 
(23 intermediate revisions by 3 users not shown)
Line 1: Line 1:
__NOTOC__
+
{{Table/IGEP Technology Devices
 
+
|Tech_Family={{#lst:Template:Links|IGEP_COM_MODULE_Tech_Family}}
{| cellspacing="0" cellpadding="5" border="1" align="center" width="100%" style="text-align: left;"
+
|Tech_ID={{#lst:Template:Links|IGEP_COM_MODULE_Tech_ID}}
|-
 
| bgcolor="#cccccc" |'''What can I do with IGEP0030'''
 
|-
 
| If you have '''successfully completed the [[Getting Started with IGEP0030 board|first chapter of this guide]]''', you can continue with this tutorial guide about IGEP0030.
 
|}
 
 
 
 
 
{{Navigation/IGEP Technology Guides
 
 
|Name={{#lst:Template:Links|IGEP_COM_MODULE_Name}}
 
|Name={{#lst:Template:Links|IGEP_COM_MODULE_Name}}
 
|Image={{#lst:Template:Links|IGEP_COM_MODULE_Image}}
 
|Image={{#lst:Template:Links|IGEP_COM_MODULE_Image}}
 
|ISEE_MainPage={{#lst:Template:Links|IGEP_COM_MODULE_ISEE_MainPage}}
 
|ISEE_MainPage={{#lst:Template:Links|IGEP_COM_MODULE_ISEE_MainPage}}
 
|ISEE_Hardware={{#lst:Template:Links|IGEP_COM_MODULE_ISEE_Hardware}}
 
|ISEE_Hardware={{#lst:Template:Links|IGEP_COM_MODULE_ISEE_Hardware}}
|Community_MainPage={{#lst:Template:Links|IGEP_COM_MODULE_Community_MainPage}}
 
|Community_Guides_1={{#lst:Template:Links|IGEP_COM_MODULE_Community_Guides_1}}
 
|Community_Guides_2={{#lst:Template:Links|IGEP_COM_MODULE_Community_Guides_2}}
 
 
}}
 
}}
  
  
{| cellspacing="0" cellpadding="5" border="1" align="center" style="text-align: left;"
+
= Overview =
|-
 
| bgcolor="#cccccc" colspan="3" | '''Overview'''
 
|-
 
| [[Image:Igep0030.jpg|250px|center|link=Category:IGEP0030]]
 
|-
 
|'''1) [[What can I do with IGEP0030#Booting and setting up|Booting up IGEP0030]]'''
 
|-
 
|'''2) [[What can I do with IGEP0030#Updating the pre-installed software|Updating the pre-installed software]]'''
 
|-
 
|'''3) [[What can I do with IGEP0030#Flashing the software image|Flashing the latest firmware to the IGEP0020 flash memory]]'''
 
|-
 
|'''4) [[What can I do with IGEP0030#Connect to IGEP0030 via network interfaces|Connect to IGEP0030 via network interfaces]]'''
 
|-
 
|'''5) [[What can I do with IGEP0030#Basic instructions|Basic instructions]]'''
 
|-
 
|'''6) [[What can I do with IGEP0030#Send a file between a PC and IGEP0030|Send a file between a PC and IGEP0030]]'''
 
|-
 
|'''7) [[What can I do with IGEP0030#How to handle the gpio-LED's|Handle IGEP0020 LED's]]'''
 
|-
 
|'''8) [[What can I do with IGEP0030#Mount a MicroSD card|Mount a MicroSD card]]'''
 
|-
 
|}
 
 
 
 
 
=== Booting and setting up ===
 
----
 
 
 
{| cellspacing="0" cellpadding="5" border="1" align="center" width="100%" style="text-align: left;"
 
|-
 
| bgcolor="#cccccc" |'''Pre-installed software'''
 
|-
 
|By default, '''all brand new IGEP Processor Boards have a firmware installed''' on its flash memory.
 
 
 
That means that if you power up your board it will run a Linux distribution provided and installed by ISEE.
 
|}
 
 
 
 
 
This distribution consists on a '''minimal Linux-based distribution''' with a lite X Window System and GNOME Mobile based applications created with '''Poky Platform Builder'''.
 
 
 
In the previous chapter of this tutorial, we have booted IGEP0030 with its pre-installed software.
 
 
 
Once the board has booted up, you can log in into IGEP0030 via many interfaces. In the previous chapter of this tutorial we have used the USB Ethernet Gadget and the Wifi interface, but you can use many other interfaces when connecting IGEP0030 to an IGEP Expansion Board.
 
 
 
'''Boot priority'''
 
 
 
In fact, IGEP0030 can boot from many other devices (listed by priority):
 
 
 
# from USB
 
# from UART3
 
# from a MMC/MicroSD card
 
# from OneNAND memory
 
 
 
 
 
As we haven't set any other boot device rather than the oneNAND (the IGEP0030 flash memory) the system boots from it.
 
 
 
 
 
But, as '''the MicroSD card has an upper priority than the flash''', if you plug a MicroSD card (with the right configuration on it) to the MicroSD card reader, IGEP0030 will boot from it and won't boot from the flash memory.
 
 
 
 
 
Now, We are going to use this functionality to update your pre-installed software.
 
 
 
 
 
=== Updating the pre-installed software ===
 
----
 
 
 
{| cellspacing="0" cellpadding="5" border="1" align="center" width="100%" style="text-align: left;"
 
|-
 
| bgcolor="#cccccc" |'''Requirements - Overview'''
 
|-
 
| For this purpose, you will need:
 
 
 
* a '''microSD card'''
 
* a '''computer''' with microSD card reader (or with adapter)
 
* a '''GNU/Linux distribution installed''' on the computer (a Linux partition or a virtual machine on Windows)
 
** the main reason is that Windows does not detect multiple partitions on a microSD card
 
|-
 
|1) '''Download the latest firmware''' into an external computer.
 
 
 
2) '''Uncompress the downloaded file'''.
 
 
 
3) '''Create a MicroSD card''' in your external computer.
 
 
 
4) '''Plug the MicroSD card''' to IGEP0030 and boot from it.
 
|}
 
 
 
 
 
We are now going to update the pre-installed software to the latest version.
 
 
 
(if you are familiar with Linux, there might be some instructions and comments you can ignore, as they are for Linux newbies)
 
 
 
 
 
1) '''Downloading the latest firmware'''
 
 
 
The first thing you'll need to do is to '''download the latest firwmare''' from ISEE.
 
 
 
At your '''Linux host PC''' you should open '''Terminal''' and type the following command:
 
 
 
wget http://downloads.igep.es/binaries/firmware/poky-firmware-3.3.1-10.tar.gz
 
 
 
* Or download it from: http://www.isee.biz/component/zoo/item/igep-firmware
 
 
 
2) ''' Uncompressing the downloaded file'''
 
 
 
Now you have downloaded a compressed file with the latest official firmware into the current directory (.tar.gz).
 
 
 
Next, we will use the application 'tar' to untar (uncompress) the donwloaded file. In the same Terminal session, type:
 
 
 
tar xzf poky-firmware-3.3.1-10.tar.gz
 
 
 
Next, you can go into the extracted directory with the system 'cd' instruction:
 
 
 
cd poky-firmware-3.3.1-10/
 
 
 
 
 
3) '''Create a MicroSD card'''
 
 
 
We are going to create the MicroSD card with the latest firmware. Before it, you have to know '''which 'device' is the MicroSD listed in the /dev/ directory''', a directory where the detected devices are listed by the Linux system.
 
 
 
To '''know the device name''', follow this instructions:
 
 
 
'''Insert your MicroSD card''' into the Linux host machine (the machine where you have downloaded the firmware).
 
 
 
In your Terminal session, run the following '''system command''':
 
 
 
dmesg
 
 
 
This instruction will prompt all the '''system traces'''. If your MicroSD card has actually been detected by the system, '''the last lines of that prompt''' will correspond to the MicroSD card detection and mounting.
 
 
 
Check the '''MicroSD name and path''', for example: /dev/sdb and remember it.
 
 
 
Now you can '''run the following script''' in the folder you have just extracted, and you will have to add some parameters. In your Terminal session, type:
 
 
 
 
 
./poky-media-create --mmc [device] --binary poky-image-sato-igep00x0-[timestamp].tar.gz --machine igep0030
 
 
 
where:
 
* [device] is the SD card device name, for example: /dev/sdb
 
* [timestamp] the parameter --binary is actually the name of another .tar.gz compressed file that you have already extracted in the previous steps. If you want to auto-complete the [timestamp] parameter, press TAB in the ''timestamp'' when writing the instruction and the system will write the name of the file automatically.
 
 
 
 
This instruction will last a few minutes. When the process ends, you will have a '''MicroSD card with the latest software''' on it.
 
 
 
 
 
4) '''Plug the MicroSD card'''
 
 
 
Therefore, you are ready to try it. '''Plug the MicroSD card into IGEP0030''' and '''power up your board'''.
 
 
 
=== Flashing the software image ===
 
----
 
 
 
Now your IGEP0030 has the latest firmware '''running from MicroSD card'''.
 
 
 
But you might want to write the firmware to the flash memory, so '''you won't need the MicroSD card when booting''' the board. So let's do it.
 
 
 
 
 
''Note: The following process is assuming that your host PC is connected to IGEP0020 via USB Ethernet Gadget or via Wifi. If not, read the [[Getting Started with IGEP0030 board|previous chapter of this tutorial]].''
 
 
 
 
 
Enter to IGEP0030 using:
 
 
 
* root as login name
 
* an empty password
 
 
 
The software provided by ISEE has a script that flashes the content of your MicroSD Card to the flash memory in your IGEP0030.
 
 
 
You have to run this script, that is located at /opt/firmware directory. Open a Terminal and run:
 
 
 
cd /opt/firmware
 
./flash.sh
 
 
 
This will last a few minutes. When it is ready, unplug the SD card from IGEP0030 and reboot the board:
 
 
 
reboot
 
 
 
Enjoy the new firmware running from flash memory.
 
 
 
'''Other references''': [[Update_the_PRE-INSTALLED_software_image_to_a_current_release|'''update your pre-installed software image''']]
 
 
 
 
 
=== Basic instructions ===
 
----
 
 
 
{| cellspacing="0" cellpadding="5" border="1" align="center" width="100%" style="text-align: left;"
 
|-
 
| bgcolor="#cccccc" |'''Overview'''
 
|-
 
| Learn some Bash basic instructions in Linux (for newbies).
 
 
1) Create, edit, move and delete files
 
 
 
2) Run a simple script
 
|}
 
 
 
IGEP0030 is '''compatible with many Linux distributions'''. In this tutorial we are using Poky Linux, which is the pre-installed software from ISEE.
 
 
 
In case you are not familiar with Bash instructions, here comes some basic instructions to help you startup with the board.
 
 
 
First of all, '''log in to IGEP0030''' with a console from your host PC (via serial port or via SSH), as shown previous sections in this article. Remember the default settings:
 
 
 
login: root
 
password: (none: press return)
 
 
 
Once you are logged in IGEP0030, run the following commands:
 
 
 
cd /
 
ls
 
 
 
You have moved to the root directory, that is "/".
 
The instruction "ls" lists all the existing files and directories in the current "path".
 
 
 
Now let's go to the directory /home/root/ with:
 
 
 
cd /home/root/
 
 
 
You can always check at which directory you are with the instruction:
 
 
 
pwd
 
 
 
Most instructions include a 'help' option that can be accessed by inserting the parameter --help. Check out the help page of 'echo' instruction, for example:
 
 
 
echo --help
 
 
 
You can try the instruction by yourself and type:
 
 
 
echo Hello
 
 
 
You have sent the text "Hello" to the standard output, that is the console you are interacting with.
 
 
 
But you can change and 'redirect' the output by using the character '>' :
 
 
 
echo Hello world! > /home/root/name.file
 
 
 
Now notice you have redirected the output to a file called name.file :
 
 
 
ls
 
 
 
You can append any file using '>>' instead of '>'.
 
You can print the content of the file to the standard output:
 
 
 
cat /home/root/name.file
 
 
 
'''Building a basic script'''
 
 
 
You can create a script that can run any instruction you want to use in Bash. The main advantage is that you do not have to compile the code, as is auto-interpereted by the system.
 
 
 
We are going to create a basic 'Hello World' script that is going to run the same command you have actually used before:
 
 
 
echo "echo > Hello world!" > /home/root/example.sh
 
cat example.sh
 
 
 
Now you have created a file called example.sh, but by default it has no execute permissions (x):
 
 
 
ls -la
 
 
 
We are going to add permission to the file by:
 
 
 
chmod a+x example.sh
 
ls -la
 
 
 
Now you can run the script:
 
 
 
./example.sh
 
 
 
You can edit this file (example.sh) with 'vi', the pre-installed text editor in IGEP0030.
 
 
 
vi example.sh
 
 
 
Press ESC and:
 
 
 
* :q! , to exit without saving
 
* :w , to save
 
* :wq , to quit and save
 
* i , to insert text
 
 
 
'''Other simple & useful instructions'''
 
 
 
* mkdir
 
* rmdir
 
* find
 
* grep
 
 
 
You can stop any instruction by pressing CTRL+C
 
 
 
 
 
=== Send a file between a PC and IGEP0030 ===
 
----
 
 
 
In a Linux host PC, you can '''use SCP (secure copy) via SSH to transfer files''' between IGEP0030 and your host PC.
 
 
 
We are going to use the default settings in IGEP0030 for USB Ethernet Gadget and Wifi.
 
 
 
''Note: This section is assuming you have successfully followed the previous chapters in this tutorial''
 
 
 
Now let's transfer a file called original.file from your host PC to the directory /home/root/ in your IGEP0030.
 
 
 
In your Host PC open Terminal and type:
 
 
 
scp -r original.file root@<destination_IP>:/home/root/destination.file
 
 
 
where:
 
 
 
*destination_IP: 192.168.7.2 via USB Ethernet Gadget, 192.168.6.1 via Wifi
 
 
 
 
You can repeat the process from the IGEP0030 console, and transfer a file from IGEP0030 to your Host PC.
 
 
 
 
 
=== How to handle the gpio-LED's ===
 
----
 
 
 
{| cellspacing="0" cellpadding="5" border="1" align="center" width="100%" style="text-align: left;"
 
|-
 
| bgcolor="#cccccc" |'''Overview'''
 
|-
 
| Using IGEP0030 LED's with the associated platform device at /sys/devices/platform/leds-gpio/leds/
 
|}
 
 
 
IGEP0030 has many devices that can be controlled using '''simple instructions'''.
 
 
 
In this tutorial, we are going to use the '''4 LED's available in the board''', which probably is the most simple feature in the board, but sometimes you may want LED's to be a way of checking the status of some of your applications.
 
 
 
You can easily '''turn LED's on and off''' using the 'echo' instruction.
 
 
 
Log into IGEP0030 (via serial port or via SSH, as shown before), and run the following commands to turn LED's on:
 
 
 
<pre>echo 1 &gt; /sys/devices/platform/leds-gpio/leds/d210\:green/brightness
 
echo 1 &gt; /sys/devices/platform/leds-gpio/leds/d210\:red/brightness
 
echo 1 &gt; /sys/devices/platform/leds-gpio/leds/d440\:green/brightness
 
echo 1 &gt; /sys/devices/platform/leds-gpio/leds/d440\:red/brightness
 
</pre>
 
You can turn them down using the same command and write '0' instead of '1'. (Note: read [[What can I do with IGEP0030#Known issues|known issues]] below)<br>
 
  
If you want to trigger the leds you can enable this mode and select the trigger source (none by default) to: mmc0, mmc1, timer, heartbeat and default-on.<br>
+
This is the 2/3 chapter of the Getting Started with IGEP COM MODULE Tutorial Guide.
  
To enable any of this modes you just have to change a parameter in the directory of the led you want to control. You can see all the possibilities using 'cat':<br>
+
In this second chapter, we will learn some basics tasks. Upon completion, you will be ready to continue with chapter 3/3 that explains more advanced tasks.
<pre>$  cat /sys/devices/platform/leds-gpio/leds/d210\:green/trigger
 
  
none mmc0 mmc1 timer heartbeat [default-on]
+
__TOC__
</pre>
 
In the example above, we have checked the status of the trigger in led D240:green. Mode 'default-on' is selected.
 
  
To change it, for example, to the timer mode you can use 'echo':<br>
 
<pre>echo timer &gt; /sys/devices/platform/leds-gpio/leds/d210\:green/trigger
 
</pre>
 
In this case, we have set the trigger to the 'timer' mode. Now you can set the time for what the led is ON and the time it is OFF using:<br>
 
<pre>echo 250 &gt; /sys/devices/platform/leds-gpio/leds/d210\:green/delay_on
 
echo 750 &gt; /sys/devices/platform/leds-gpio/leds/d210\:green/delay_off
 
</pre>
 
Now the selected led is configured with a timer consisting of 250 miliseconds ON and 750 miliseconds OFF.
 
  
=== Mount a MicroSD card ===
+
= What can I do =
----
 
  
(Work in progress section!)
+
You must logged in the board.
  
==== Access to Generic FAT32 microSD  ====
+
== Handle the GPIO-LEDS ==
  
mount -t vfat /dev/mmcblk0 /mnt/tmp/
+
The board has two user bicolor (green/red) leds available that can be controlled. In its simplest form, you can control of LEDs from
 +
userspace. LEDs appear in /sys/class/leds/ and you can turn on and off with following commands:
  
==== Access to Generic USB Flash disk ====
+
  $ echo 1 > /sys/class/leds/d210\:red/brightness
 +
$ echo 0 > /sys/class/leds/d210\:red/brightness
  
  mount -t vfat /dev/sda1 /mnt/tmp/
+
  $ echo 1 > /sys/class/leds/d440\:green/brightness
 +
$ echo 1 > /sys/class/leds/d440\:red/brightness
  
==== Safety Remove microSD  ====
+
A detailed guide on how use GPIO-LEDS can be found by following this link: [[How to handle the gpio-LED]]
  
umount /mnt/tmp
+
== How to use wifi ==
  
==== Access to IGEP demo microSD  ====
+
If you have a wireless network adapter in your computer you can also connect to the board using the ad hoc network connection that the firmware configures by default.
  
mount -t jffs2 /dev/mmcblk0 /mnt/tmp/
+
Use your wireless manager to connect to the wireless network called in the form
  
 +
IGEP_xx
  
= How to use wireless =
+
After connecting, a DHCP IP address should be adquired. Now you can access, for example via ssh, to the target board connecting to the 192.168.7.1 address.
  
* [[How to setup Marvell 88w8686 SDIO wifi]]
+
$ ssh root@192.168.6.1
  
= How to use bluetooth =
+
A detailed guide on how use wifi can be found by following this link: [[Using IGEP WLAN to communicate]]
  
* [[How to setup Marvell bluetooth]]
+
== How to use bluetooth ==
  
= Known issues  =
+
A detailed guide on how use wifi can be found by following this link: [[How to setup Marvell bluetooth]]
  
*In the IGEP0030 Revision E, the D440 Green LED does not turn off completely due to hardware configuration.
+
== How to use the SD card ==
  
 +
You can connect a micro SD card for storage. After plugin the SD card the kernel should detect the card and automount in /media directory.
  
{{Navigation/IGEP Technology Guides/What can I do/Ending|device=IGEP0030}}
+
{{Template:Navigation/IGEP Technology Guides/What can I do/Ending}}
  
[[Category:IGEP0030]]
+
[[Category:IGEP Technology Devices Guides]]
[[Category:Tutorials]]
 
[[Category:Work in progress]]
 

Latest revision as of 12:17, 29 January 2013


Overview

This is the 2/3 chapter of the Getting Started with IGEP COM MODULE Tutorial Guide.

In this second chapter, we will learn some basics tasks. Upon completion, you will be ready to continue with chapter 3/3 that explains more advanced tasks.


What can I do

You must logged in the board.

Handle the GPIO-LEDS

The board has two user bicolor (green/red) leds available that can be controlled. In its simplest form, you can control of LEDs from userspace. LEDs appear in /sys/class/leds/ and you can turn on and off with following commands:

$ echo 1 > /sys/class/leds/d210\:red/brightness
$ echo 0 > /sys/class/leds/d210\:red/brightness
$ echo 1 > /sys/class/leds/d440\:green/brightness
$ echo 1 > /sys/class/leds/d440\:red/brightness

A detailed guide on how use GPIO-LEDS can be found by following this link: How to handle the gpio-LED

How to use wifi

If you have a wireless network adapter in your computer you can also connect to the board using the ad hoc network connection that the firmware configures by default.

Use your wireless manager to connect to the wireless network called in the form

IGEP_xx

After connecting, a DHCP IP address should be adquired. Now you can access, for example via ssh, to the target board connecting to the 192.168.7.1 address.

$ ssh root@192.168.6.1

A detailed guide on how use wifi can be found by following this link: Using IGEP WLAN to communicate

How to use bluetooth

A detailed guide on how use wifi can be found by following this link: How to setup Marvell bluetooth

How to use the SD card

You can connect a micro SD card for storage. After plugin the SD card the kernel should detect the card and automount in /media directory.



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