Personal tools

Log in

Changes

From IGEP - ISEE Wiki

Jump to: navigation, search

What can I do with IGEPv2

6,926 bytes removed, 11:41, 2 August 2012
Re-ordered and adapted some sections
{{Table/IGEP Technology Devices| cellspacingTech_Family="0" cellpadding="5" border="1" align="center" width="100%" style="text-align{{#lst:Template: left;"Links|-IGEPv2_Tech_Family}}| bgcolorTech_ID="#cccccc" |'''IGEPv2 - Part 2/3'''|-| It is recommended that you '''follow the [[{{#lst:Template:Links|IGEPv2_Community_Guides_1IGEPv2_Tech_ID}}|previous chapters]]''' of this guide before continuing with this tutorial.|}  {{Navigation/IGEP Technology Guides
|Name={{#lst:Template:Links|IGEPv2_Name}}
|Image={{#lst:Template:Links|IGEPv2_Image}}
|ISEE_MainPage={{#lst:Template:Links|IGEPv2_ISEE_MainPage}}
|ISEE_Hardware={{#lst:Template:Links|IGEPv2_ISEE_Hardware}}
|Community_MainPage={{#lst:Template:Links|IGEPv2_Community_MainPage}}
|Community_Guides_1={{#lst:Template:Links|IGEPv2_Community_Guides_1}}
|Community_Guides_2={{#lst:Template:Links|IGEPv2_Community_Guides_2}}
}}
{| cellspacing="0" cellpadding="5" border="1" align="center" style="text-align: left;"__TOC__ |-| bgcolor="#cccccc" colspanOverview ="3" | '''IGEP Technology Devices Guides - Part 2/3 - Summary'''|-| [[Image:{{#lst:Template:Links|IGEPv2_Image}}|250px|center|link={{#lst:Template:Links|IGEPv2_Community_MainPage}}]] |-|'''1) [[#Booting and setting up|Booting up IGEPv2]]'''|-|'''This is the 2) [[#Updating the pre-installed software|Updating the pre-installed software]]'''|-|'''/3) [[#Flashing the software image|Flashing the latest firmware to the chapter of IGEPv2 flash memory]]'''Tutorial Guide.|-|'''4) [[#Connect We will learn some basic tasks such to IGEPv2 via network interfaces|Connect to IGEPv2 via network interfaces]]'''|-|'''5) [[#Basic instructions|Basic instructions]]'''|-|'''6) [[#Send send a file between a PC IGEPv2 and IGEPv2|Send a file between a your PC and , handle the IGEPv2]]'''|Leds, update the pre-|'''7) [[#How installed software to handle the gpio-LED's|Handle IGEPv2's leds]]'''|-|'''8) [[#Mount a MicroSD card|Mount a MicroSD card]]'''|-|}latest release, etc.
__NOTOC__
=What can I do == Booting and setting up ===----
{| cellspacing="0" cellpadding="5" border="1" align="center" widthHandle the gpio-LED's ="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.|}''' Basic '''
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.
All IGEP Processor Boards have a pre-installed software which consists of a You can easily '''minimal Linux-based distributionturn LED''' with a lite X Window System s on and GNOME Mobile based applications created with 'off''Poky Platform Builder'using the 'echo'instruction.
In Log into IGEPv2 (for example via SSH, as shown in the previous chapter of this tutorial), we have booted IGEPv2 with its pre-installed software.and run the following commands to turn LED's on:
Once the board has booted up, it asks for a login in the serial debug port. You can log in into IGEPv2 via the serial interface.<pre>echo 1 &gt; /sys/devices/platform/leds-gpio/leds/d240\:green/brightnessecho 1 &gt; /sys/devices/platform/leds-gpio/leds/d240\:red/brightnessecho 1 &gt; /sys/devices/platform/leds-gpio/leds/d440\:green/brightnessecho 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'.
*The default login user is: '''root'''
*There is '''no password''' for this user.
''' Know more '''
IGEPv2 LED's are controlled with it''Boot priority'''s platform device at /sys/devices/platform/leds-gpio/leds/
In fact, IGEPv2 If you want to trigger the leds you can boot from many other devices enable this mode and select the trigger source (listed none by prioritydefault)to: mmc0, mmc1, timer, heartbeat and default-on.<br>
# from USB# from UART3# from To enable any of this modes you just have to change a MMC/MicroSD card # from OneNAND memoryparameter in the directory of the led you want to control. You can see all the possibilities using the instruction 'cat':<br>
<pre>$ cat /sys/devices/platform/leds-gpio/leds/d240\:green/trigger
As we haven't set any other boot device rather than the oneNAND (the IGEPv2 flash memory) the system boots from it.[none] mmc0 mmc1 timer heartbeat default-on</pre>
In the example above, we have checked the status of the trigger in led D240:green. Mode 'none' is selected.
ButTo change it, as for example, to the ''timer'the MicroSD card has an upper priority than the flash'mode you can use 'echo', if you plug a MicroSD card (with the right configuration on it) to the MicroSD card reader, IGEPv2 will boot from it and won't boot from the flash memory.:
<pre>echo timer &gt; /sys/devices/platform/leds-gpio/leds/d240\:green/trigger
</pre>
NowIn this case, We are going we have set the trigger to use this functionality to update your pre-installed softwarethe 'timer' mode.Now you can set the time for what the led is ON and the time it is OFF using:
=== Updating the <pre>echo 250 &gt; /sys/devices/platform/leds-installed software ===gpio/leds/d240\:green/delay_onecho 750 &gt; /sys/devices/platform/leds----gpio/leds/d240\:green/delay_off</pre>
{| cellspacing="0" cellpadding="5" border="1" align="center" width="100%" style="text-align: left;"|-| bgcolor="#cccccc" |'''Requirements - Overview'''|-| For this purpose, you will need:Now the selected led is configured with a timer consisting of 250 miliseconds ON and 750 miliseconds OFF.
* 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 == Send a file'''.between your PC and IGEPv2 via SCP ==
3) '''Create a MicroSD cardBasic ''' in your external computer.
4In a Linux host PC, you can use SCP (secure copy) '''Plug the MicroSD card''' via SSH to transfer files between IGEPv2 and boot from ityour PC.|}
Now let's transfer a file called original.file in your host PC to IGEPv2 in /home/root/
We are now going to update the pre-installed software to the latest version.In your Host PC open Terminal and type:
{{#lst:How to create a SD scp -card with the latest software image|r original.file root@< IGEPv2}}IP >:/home/root/destination.file
4) '''Plug You can repeat the MicroSD card'''process from the IGEPv2 console, and transfer a file from IGEPv2 to your Host PC.
Therefore, you are ready to try the MicroSD Card. '''Plug the MicroSD card into IGEPv2''' and '''power up your board'''.
=== Flashing the Update your pre-installed software image ===----
{| cellspacing="0" cellpadding="5" border="1" alignOverview ="center" width="100%" style="text-align: left;"|-| bgcolor="#cccccc" |'''Overview'''|-| 1) '''Log into IGEPv2'''
2) '''Run /opt/# Download the latest firmware/flasher.sh script'''into an external computer|}# Uncompress the downloaded file# Create a MicroSD card in your external computer# Plug the MicroSD card to IGEPv2 and boot from it.
=== Requirements ===
Now your IGEPv2 has the latest firmware * a '''microSD card'''* a '''computer'''running from MicroSD with microSD cardreader (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
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.=== Basic ===
We are now going to update the pre-installed software to the latest version.
''Note{{#lst: The following process is assuming that your host PC is connected How to IGEPv2 via create a SD-card with the Serial Debug port. If not, read the Serial Port instructions in the [[Getting Started with latest software image|IGEPv2|previous chapter of this tutorial]].''}}
Enter to IGEPv2 using:== Flash the latest software image ==
* root as login name * an empty passwordIf you followed the previous section you have IGEPv2 with 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.
The software provided by ISEE has a script that flashes the content of your MicroSD Card to the flash memory in your IGEPv2. You have to run this script, that is located at /opt/firmware directory.
You have to run this script, that is located at /opt/firmware directory. Open a Terminal Log into IGEPv2 and runthe following commands:
cd /opt/firmware
reboot
Enjoy You will have the new firmware running from IGEPv2 flash memory.
'''Other references''': [[Update_the_PRE-INSTALLED_software_image_to_a_current_release|'''update your pre-installed software image''']]
=== Connect to IGEPv2 via network interfaces ===----''' Know more '''
{| cellspacing="0" cellpadding="5" border="1" align="center" width="100%" style="text-align: left;"|-| bgcolor="#cccccc" |'''Overview'''|-| 1) '''Plug an ethernet cable to IGEPv2 2) '''Connect via ethernet network''', SSHcan run many other software distributions. Check the [[: root@192.168.x.x 3) '''Connect via wireless network''', SSHCategory: IGEP_WLAN at root@192.168.xSoftware distributions]] to learn how to install other distributions.x|}
You can log into IGEPv2 via many '''interfaces with network connectivity''', such ethernet, wifi, usb-ethernet gadget, etc.
In this tutorial we are going to connect via an ethernet cable. To to that, you need to set an IP in IGEPv2 (host) and start a SSH session in your PC (client). Let's do it. First of all, you will need: * an '''Ethernet cable'''* a '''Linux or a Windows host PC'''  Log into IGEPv2 via the '''serial cable to the serial debug port in IGEPv2''', as you have done in the previous chapter of this tutorial guide. Once you are logged in, run the following command:  ifconfig This will '''list all the enabled network interfaces''' in your IGEPv2. We are going to '''focus on 'eth0''''. This is the ethernet interface in your IGEPv2, which is the interface we will '''connect to from our host PC'''. Connect the ethernet cable between your host PC and IGEPv2 (or through any wired network such switch). Now, let's '''set an static IP''' to this interface in IGEPv2, so we will be able to reach the target from the PC. Type the following command in your serial console:  ifconfig eth0 192.168.6.2  Next, set an '''IP within the subnet''' in your host PC, for example: 192.168.6.3 Then, run a '''SSH client''' such '''Putty''' and start a SSH session to the target from your host PC. You can download it from its official page at: http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html Install and run Putty. It will look like this: [[Image:Putty ssh.png|center]] # Select the '''SSH''' at connection type.# Next insert the '''IP address of the target'''. In this case, the IGEPv2 IP you have already set (192.168.6.3).# Ensure that the port is set to '''22''', the default for SSH communications.# Finally, push the '''Open button''' to start the SSH session.  If everything goes right, you will be able to access to an IGEPv2 console from your PC via ethernet. === 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|}
IGEPv2 is '''compatible with many Linux distributions'''. In this tutorial we are using Poky Linux, which is the pre-installed software from ISEE.
=== Send a file between a PC and IGEPv2 ===---- {| cellspacing="0" cellpadding="5" border="1" align="center" width="100%" style="text-align: left;"|-| bgcolor="#cccccc" |'''Overview'''|-| Transfer a file from IGEPv2 to your PC via SCP|} In a Linux host PC, you can use SCP (secure copy) via SSH to transfer files between IGEPv2 and your host PC. First of all, set an static IP to your Linux Host (for example, 192.168.6.3) and another IP within the subnet for IGEPv2 (for example, 192.168.6.2). First of all, you check the connectivity (From IGEPv2 console):  ping 192.168.6.3 Press CTRL-C to stop the command. Now let's transfer a file called original.file in your host PC to IGEPv2 in /home/root/ In your Host PC open Terminal and type:  scp -r original.file root@192.168.6.2:/home/root/destination.file You can repeat the process from the IGEPv2 console, and transfer a file from IGEPv2 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 IGEPv2 LED's with the associated platform device at /sys/devices/platform/leds-gpio/leds/|} IGEPv2 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 IGEPv2 (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/d240\:green/brightnessecho 1 &gt; /sys/devices/platform/leds-gpio/leds/d240\:red/brightnessecho 1 &gt; /sys/devices/platform/leds-gpio/leds/d440\:green/brightnessecho 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'.  '''Other functionalities''' 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>  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':<br>  <pre>$ cat /sys/devices/platform/leds-gpio/leds/d240\:green/trigger [none] mmc0 mmc1 timer heartbeat default-on</pre>  In the example above, we have checked the status of the trigger in led D240:green. Mode 'none' is selected.  To change it, for example, to the timer mode you can use 'echo': <pre>echo timer &gt; /sys/devices/platform/leds-gpio/leds/d240\: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: <pre>echo 250 &gt; /sys/devices/platform/leds-gpio/leds/d240\:green/delay_onecho 750 &gt; /sys/devices/platform/leds-gpio/leds/d240\: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 ===
{| cellspacing="0" cellpadding="5" border="1" align="center" width="100%" style="text-align: left;"
|-
(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/
=== How to use RS-485 ===
----
{| cellspacing="0" cellpadding="5" border="1" align="center" width="100%" style="text-align: left;"|-| bgcolor="#cccccc" |'''Overview'''|-| Follow the link to the extensive article: [[How_to_use_RS485_on_IGEP0020_board|How to use RS-485 on IGEPv2 board]]|} ==
Follow the link to the extensive article: [[How_to_use_RS485_on_IGEP0020_board|How to use RS-485 on IGEPv2 board]]
=== How to get sound out (audio out) ===
----
{| cellspacing="0" cellpadding="5" borderHow to get sound in (audio in) ="1" align="center" width="100%" style="text-align: left;"|-| bgcolor="#cccccc" |'''Overview'''|-| Use: aplay |}
The amplifiers for the headset output are disabled by default, so the first thing you'll do is enable these amplifiers with:'' Basic '''
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 External Audio input devices, such as a *.wav sound with powered microphone or the application Aplayaudio output of a PC or MP3 player, for example:  aplay samplecan be connected to the via a 3.wav === How to get sound in 5mm jack (audio inAudio IN) === {| cellspacing="0" cellpadding="5" border="1" align="center" width="100%" style="text-align: left;"|-| bgcolor="#cccccc" |'''Overview'''|-| Use: arecord|}.
You can record audio in with the application Arecord, for example:
When ever you think you want to stop recording just press CTRL+C
 
 
== How to get sound out (audio out) ==
 
''' Basic '''
 
Connect an '''external output audio device''' to the 3.5mm jack Audio Out connector in IGEPv2, such as external stereo powered speakers.
 
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 with the application Aplay, for example:
 
aplay audio-in.wav
 
{{Navigation/IGEP Technology Devices Guides/Next Step
[[Category:IGEP Technology Devices Guides]]
[[Category:IGEP0020]]
[[Category:Work in progress]]
0
edits