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

From IGEP - ISEE Wiki

Jump to: navigation, search
m (Booting and setting up)
Line 1: Line 1:
__NOTOC__
+
{{Table/IGEP Technology Devices
 
+
|Tech_Family={{#lst:Template:Links|IGEP_COM_PROTON_Tech_Family}}
{| cellspacing="0" cellpadding="5" border="1" align="center" width="100%" style="text-align: left;"
+
|Tech_ID={{#lst:Template:Links|IGEP_COM_PROTON_Tech_ID}}
|-
 
| bgcolor="#cccccc" |'''What can I do with IGEP COM PROTON'''
 
|-
 
| If you have '''successfully completed the [[{{#lst:Template:Links|IGEP_COM_PROTON_Community_MainPage}}|first chapter of this guide]]''', you can continue with this tutorial guide about IGEP COM PROTON.
 
|}
 
 
 
 
 
{{Navigation/IGEP Technology Guides
 
 
|Name={{#lst:Template:Links|IGEP_COM_PROTON_Name}}
 
|Name={{#lst:Template:Links|IGEP_COM_PROTON_Name}}
 
|Image={{#lst:Template:Links|IGEP_COM_PROTON_Image}}
 
|Image={{#lst:Template:Links|IGEP_COM_PROTON_Image}}
 
|ISEE_MainPage={{#lst:Template:Links|IGEP_COM_PROTON_ISEE_MainPage}}
 
|ISEE_MainPage={{#lst:Template:Links|IGEP_COM_PROTON_ISEE_MainPage}}
 
|ISEE_Hardware={{#lst:Template:Links|IGEP_COM_PROTON_ISEE_Hardware}}
 
|ISEE_Hardware={{#lst:Template:Links|IGEP_COM_PROTON_ISEE_Hardware}}
|Community_MainPage={{#lst:Template:Links|IGEP_COM_PROTON_Community_MainPage}}
 
|Community_Guides_1={{#lst:Template:Links|IGEP_COM_PROTON_Community_Guides_1}}
 
|Community_Guides_2={{#lst:Template:Links|IGEP_COM_PROTON_Community_Guides_2}}
 
 
}}
 
}}
  
  
{| cellspacing="0" cellpadding="5" border="1" align="center" style="text-align: left;"
+
__TOC__
|-
 
| bgcolor="#cccccc" colspan="3" | '''Overview'''
 
|-
 
| [[Image:{{#lst:Template:Links|IGEP_COM_PROTON_Image}}|250px|center|link={{#lst:Template:Links|IGEP_COM_PROTON_Community_MainPage}}]]
 
|-
 
|'''1) [[#Booting and setting up|Booting up IGEP COM PROTON]]'''
 
|-
 
|'''2) [[#Basic instructions|Basic instructions]]'''
 
|-
 
|'''3) [[#Send a file between a PC and IGEP COM PROTON|Send a file between a PC and IGEP COM PROTON]]'''
 
|-
 
|'''4) [[#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 of 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 IGEP COM PROTON with its pre-installed software.
 
 
 
Once the board has booted up, you can log in into IGEP COM PROTON 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 IGEP COM PROTON to an IGEP Expansion Board.
 
 
 
'''Boot priority'''
 
 
 
In fact, IGEP COM PROTON 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 IGEP COM PROTON 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, IGEP COM PROTON 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.
 
 
 
=== 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
 
|}
 
 
 
IGEP COM PROTON 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 IGEP COM PROTON''' 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 IGEP COM PROTON.
 
 
 
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 IGEP COM PROTON ===
 
----
 
 
 
In a Linux host PC, you can '''use SCP (secure copy) via SSH to transfer files''' between IGEP COM PROTON and your host PC.
 
 
 
We are going to use the default settings in IGEP COM PROTON for USB Ethernet Gadget.
 
 
 
''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 IGEP COM PROTON.
+
= Overview =
  
In your Host PC open Terminal and type:
+
This is the 2/3 chapter of IGEP COM PROTON Tutorial Guide.
  
scp -r original.file root@<destination_IP>:/home/root/destination.file
+
We will learn some basic tasks such to send a file between IGEP COM PROTON and your PC , handle the IGEP COM Leds, update the pre-installed software to the latest release, etc.
  
where:
+
= What can I do =
 +
== Handle the gpio-LED's ==
 +
{{#lst:How to handle the gpio-LED|IGEP_COM_PROTON}}
  
*destination_IP: 192.168.7.2 via USB Ethernet Gadget, 192.168.6.1 via Wifi
+
{{Table/IGEP Technology Devices
 
+
|Tech_Family={{#lst:Template:Links|IGEP_COM_PROTON_Tech_Family}}
+
|Tech_ID={{#lst:Template:Links|IGEP_COM_PROTON_Tech_ID}}
You can repeat the process from the IGEP COM PROTON console, and transfer a file from IGEP COM PROTON to your Host PC.
 
 
 
 
 
=== Mount a MicroSD card ===
 
----
 
 
 
(Work in progress section!)
 
 
 
==== Access to Generic FAT32 microSD  ====
 
 
 
mount -t vfat /dev/mmcblk0 /mnt/tmp/
 
 
 
==== Access to Generic USB Flash disk  ====
 
 
 
mount -t vfat /dev/sda1 /mnt/tmp/
 
 
 
==== Safety Remove microSD  ====
 
 
 
umount /mnt/tmp
 
 
 
==== Access to IGEP demo microSD  ====
 
 
 
mount -t jffs2 /dev/mmcblk0 /mnt/tmp/
 
 
 
 
 
{{Navigation/IGEP Technology Devices Guides/Next Step
 
 
|Name={{#lst:Template:Links|IGEP_COM_PROTON_Name}}
 
|Name={{#lst:Template:Links|IGEP_COM_PROTON_Name}}
|Community_MainPage={{#lst:Template:Links|IGEP_COM_PROTON_Community_MainPage}}
+
|Image={{#lst:Template:Links|IGEP_COM_PROTON_Image}}
|Next_Step=Start developing under IGEP Technology
+
|ISEE_MainPage={{#lst:Template:Links|IGEP_COM_PROTON_ISEE_MainPage}}
 +
|ISEE_Hardware={{#lst:Template:Links|IGEP_COM_PROTON_ISEE_Hardware}}
 
}}
 
}}
  
 
[[Category:IGEP Technology Devices Guides]]
 
[[Category:IGEP Technology Devices Guides]]
[[Category:IGEP0032]]
 
[[Category:Work in progress]]
 

Revision as of 17:07, 28 August 2012


Overview

This is the 2/3 chapter of IGEP COM PROTON Tutorial Guide.

We will learn some basic tasks such to send a file between IGEP COM PROTON and your PC , handle the IGEP COM Leds, update the pre-installed software to the latest release, etc.

What can I do

Handle the gpio-LED's

Basic

Log into IGEP COM PROTON (for example via SSH, as shown in the previous chapter), and run the following commands to turn LED's on:

echo 1 > /sys/devices/platform/leds-gpio/leds/d242\:green/brightness
echo 1 > /sys/devices/platform/leds-gpio/leds/d441\:green/brightness
echo 1 > /sys/devices/platform/leds-gpio/leds/d442\:green/brightness

You can turn them down using the same command and write '0' instead of '1'.


Know more

IGEP COM PROTON LED's are controlled with it's platform device at /sys/devices/platform/leds-gpio/leds/

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.

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 the instruction 'cat':

$   cat /sys/devices/platform/leds-gpio/leds/d242\:green/trigger

[none] nand-disk mmc0 timer heartbeat backlight gpio default-on

In the example above, we have checked the status of the trigger in led d242:green. Mode 'none' is selected.

To change it, for example, to the timer mode you can use 'echo':

echo timer > /sys/devices/platform/leds-gpio/leds/d242\:green/trigger

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:

echo 250 > /sys/devices/platform/leds-gpio/leds/d242\:green/delay_on
echo 750 > /sys/devices/platform/leds-gpio/leds/d242\:green/delay_off

Now the selected led is configured with a timer consisting of 250 miliseconds ON and 750 miliseconds OFF.