Difference between revisions of "Serial Transfer"

From ArmadeusWiki
Jump to: navigation, search
(Links)
m
Line 1: Line 1:
Instructions to use the serial port of your Armadeus board to communicate with your PC.<br>
+
Instructions to use the serial port of your Armadeus board to transfer files from/to your PC.
'''This page explains how to communicate from a Bash shell on the board when the Linux system is started, not from U-Boot.'''
+
{{Note|This page explains how to transfer files on the board when the Linux system has started, '''not from U-Boot !'''.
To know how to configure serial link for U-Boot communication, [[Connection_with_U-Boot_on_Linux|it's here]].
+
To know how to configure serial link for U-Boot communication, [[Connection_with_U-Boot_on_Linux|it's here]].}}
  
 
==Introduction==
 
==Introduction==
Line 34: Line 34:
 
After having booted your Armadeus system, launch '''rz''' for receiving and '''sz''' to send files:
 
After having booted your Armadeus system, launch '''rz''' for receiving and '''sz''' to send files:
 
* On your Target, open a new terminal:
 
* On your Target, open a new terminal:
 +
<pre class="apf">
 
  # /sbin/getty -L ttygserial 115200 vt100
 
  # /sbin/getty -L ttygserial 115200 vt100
 +
</pre>
 
* On your Host, launch Minicom and configure it to use /dev/ttyUSB1 at 115200, then connect it to this terminal
 
* On your Host, launch Minicom and configure it to use /dev/ttyUSB1 at 115200, then connect it to this terminal
  
* Host --> Target
+
===Host --> Target===
 +
<pre class="apf">
 
  # cd /whereToPutTheFileOnTheTarget/
 
  # cd /whereToPutTheFileOnTheTarget/
 
  # rz -bZ
 
  # rz -bZ
 
  .. waiting to receive.
 
  .. waiting to receive.
 +
</pre>
 
then in minicom do: '''Ctrl+A , s''' and choose zmodem protocol and the file to send. <br>
 
then in minicom do: '''Ctrl+A , s''' and choose zmodem protocol and the file to send. <br>
 
Wait a little and your file will be copied to your board rootfs ! ;-)
 
Wait a little and your file will be copied to your board rootfs ! ;-)
  
* Target --> Host
+
===Target --> Host===
 +
<pre class="apf">
 
  # cd /whereIsTheFileToSendOnTheTarget/
 
  # cd /whereIsTheFileToSendOnTheTarget/
 
  # sz -b --zmodem filename
 
  # sz -b --zmodem filename
 +
</pre>
 
Minicom handles the file receiving automatically (put it in your $HOME by default)
 
Minicom handles the file receiving automatically (put it in your $HOME by default)
  

Revision as of 19:32, 25 February 2009

Instructions to use the serial port of your Armadeus board to transfer files from/to your PC.

Note Note: This page explains how to transfer files on the board when the Linux system has started, not from U-Boot !.

To know how to configure serial link for U-Boot communication, it's here.


Introduction

When you only have a serial link (RS232/USB) as connection with your devt PC (ie no Ethernet available), then you can use Zmodem protocol to send/receive files to/from your Shell/Console of your Armadeus board.

Installation

  • Target:

Modify your Buildroot configuration:

[user@toto]$ make menuconfig

to add lrzsz package:
Menuconfig package.png

Menuconfig package net.png

and then rebuild your RootFS

[user@toto]$ make

Check that rz and sz executables are present in your RootFS and, if not, copy them to there:

[user@toto]$ cp ./project_build_armv4t/apf9328/lrzsz-0.12.20/src/lsz ./project_build_armv4t/apf9328/root/usr/bin/sz

end then rebuild your RootFS:

[user@toto]$ make
  • Host:

Install lrzsz package, if not already installed on your system. For example on Ubuntu/Debian:

[root@toto]# apt-get install lrzsz

Usage

You must use minicom as serial terminal and not kermit for the moment sorry ! :-(
Be sure to have correctly configured Minicom: line speed, 8N1, no control, and correct download/upload directories path.
After having booted your Armadeus system, launch rz for receiving and sz to send files:

  • On your Target, open a new terminal:
 # /sbin/getty -L ttygserial 115200 vt100
  • On your Host, launch Minicom and configure it to use /dev/ttyUSB1 at 115200, then connect it to this terminal

Host --> Target

 # cd /whereToPutTheFileOnTheTarget/
 # rz -bZ
 .. waiting to receive.

then in minicom do: Ctrl+A , s and choose zmodem protocol and the file to send.
Wait a little and your file will be copied to your board rootfs ! ;-)

Target --> Host

 # cd /whereIsTheFileToSendOnTheTarget/
 # sz -b --zmodem filename

Minicom handles the file receiving automatically (put it in your $HOME by default)

TBDL

Links