LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 08-01-2007, 10:23 PM   #1
baosheng
Member
 
Registered: Oct 2004
Location: Lubbock, TX, USA
Distribution: Ubuntu 7.10
Posts: 74

Rep: Reputation: 15
any x/y/zmodem supporting terminal to transfer files via RS-232 port?


Hi,

I am doing an application about running Linux on an ARM development kit. The bootloader is vivi while the CPU is SAMSUNG SBC2440.

I can "talk" to the board in minicom through RS-232 port.

But when I wanna transfer something through xmodem/ymodem/zmodem, I can't do it in minicom. For example, if I wanna download the kernel into the NAND flash in "load flash kernel x" through xmodem protocol.

How shall I do if I wanna transfer a program in xmodem/ymodem/zmodem protocol?
 
Old 08-01-2007, 11:18 PM   #2
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
In minicom, control-A,s will bring up the send dialog. You have a choice of zmodem, ymodem, xmodem, kermit and ascii.
 
Old 08-03-2007, 10:44 PM   #3
baosheng
Member
 
Registered: Oct 2004
Location: Lubbock, TX, USA
Distribution: Ubuntu 7.10
Posts: 74

Original Poster
Rep: Reputation: 15
but I found an error while I tried upload via xmodem

+-----------[xmodem upload - Press CTRL-C to quit]------------+
|Retry 0: NAK on sector |
|Retry 0: NAK on sector |
|Retry 0: Retry Count Exceeded |
| |
|Transfer incomplete |
| |
| READY: press any key to continue... |
+-------------------------------------------------------------+

I don't know whether there is any place I need to configure.
 
Old 08-03-2007, 10:58 PM   #4
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
It looks like the system that you are trying to upload to does not have automatic transfer detection. You will need to manually start the xmodem receive process on the system before you initiate the xmodem send on minicom.

If it still doesn't work, then the implementations may be incompatible for some reason. In that case, try a y or zmodem transfer instead, as these are both faster and more flexible.
 
Old 08-04-2007, 12:56 AM   #5
baosheng
Member
 
Registered: Oct 2004
Location: Lubbock, TX, USA
Distribution: Ubuntu 7.10
Posts: 74

Original Poster
Rep: Reputation: 15
but it works if I use the HyperTerminal on Windows.
On windows, I type the same command to initialize the xmodem transfer procedure and select transfer->Send File to activate the Send File dialog. With this dialog, select the name of the file to send, choose the Xmodem protocol, and then Send.
 
Old 08-04-2007, 01:25 AM   #6
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
Thirty year old quick and dirty protocols have their quirks. I remember many problems and incompatibilities with xmodem. The ymodem and zmodem protocols were developed specifically because of the poor performance and error prone nature of xmodem. Perhaps you should consider updating to a 21 year old robust protocol, like zmodem?
 
Old 08-04-2007, 01:56 AM   #7
baosheng
Member
 
Registered: Oct 2004
Location: Lubbock, TX, USA
Distribution: Ubuntu 7.10
Posts: 74

Original Poster
Rep: Reputation: 15
I finally solved this problem by reading a SAMSUNG documentation. I need to set the xmodem initial timeout a little longer, i. e. 10 seconds. The original timeout was too short that it can't wait for the file to transfer since I took too long time to select the file to be transferred.

It says:
If ‘transfer incomplete’ message is appeared while writing images, the reason is that the timeout of xmodem_initial is too short. In this case, you can solve the problem by increasing the timeout of xmodem_initial. First check the value of ‘xmodem_initial_timeout’ parameter. if it is too short,extend timeout properly.

vivi> param show
vivi> param set xmodem_initial_timeout 1000000 : “1000000” means 1 second because a unit is
microsecond.
vivi> param save

So I did as follows:

FriendlyARM>param show
Number of parameters: 9
name : hex integer
-------------------------------------------------------------
mach_type : 0000030e 782
media_type : 00000003 3
boot_mem_base : 30000000 805306368
baudrate : 0001c200 115200
xmodem : 00000001 1
xmodem_one_nak : 00000000 0
xmodem_initial_timeout : 000493e0 300000
xmodem_timeout : 000f4240 1000000
boot_delay : 01000000 16777216
Linux command line: noinitrd root=/dev/mtdblock2 init=/linuxrc console=ttySAC0
FriendlyARM> param set xmodem_initial_timeout 100000000
Change 'xmodem_initial_timeout' value. 0x000493e0(300000) to 0x05f5e100(1000000)
FriendlyARM> param save
Found block size = 0x0000c000
Erasing... ... done
Writing... ... done
Written 49152 bytes
Saved vivi private data
FriendlyARM> load flash kernel x
Ready for downloading using xmodem...
Waiting...
ize = 1469952 bytes
Found block size = 0x00168000
Erasing... ... done
Writing... ... done
Written 1469952 bytes
Erase TOC of Wince ..., OK!
 
Old 08-15-2007, 03:17 AM   #8
tianshi
LQ Newbie
 
Registered: Aug 2007
Posts: 1

Rep: Reputation: 0
How to set xmodem_initial_timeout .
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to send and receive files(txt,zip,pdf,jpe format) b/w two pc using RS-232 amit_pansuria Programming 10 05-28-2007 09:42 AM
use of zmodem sunhui Linux - Software 0 03-29-2006 12:54 AM
I want to sent string out to serial port com1 (RS-232) lek171 Programming 1 12-25-2005 03:44 PM
Serial port transfer tklima Programming 1 01-12-2005 02:13 PM
zmodem transfer BTseapig Linux - Software 2 11-02-2004 08:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 07:26 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration