Solved

xmodem transfer

Posted on 1998-08-25
8
230 Views
Last Modified: 2013-12-27
This is more of a programming question.

I am writing an application that attempts to upload a file  to a remote server using xmodem  and am having
difficulty getting the receiving site to return anything but
nak messages.

The question is does anyone have a detailed explanation
of the xmodem protocol detailing everything from the
packet structure to how the checksum is computed. Apparently what I have is completely wrong and I have no clue what to do at this point.

Thanks

Brett
0
Comment
Question by:mcello
  • 5
  • 3
8 Comments
 

Author Comment

by:mcello
ID: 1144673
Edited text of question
0
 
LVL 6

Accepted Solution

by:
joopv earned 250 total points
ID: 1144674
0
 

Author Comment

by:mcello
ID: 1144675
Thanks for the reference. The information you supplied was
what I had previously but I still havent been able to make it work. The test code in question is in VB. Maybe this is an obvious mistake but here it is with a couple extra comments.
The destination server responds repeatedly with naks.

Function buildPacket() As String

Dim PktString As String
Dim TXTMSG As String

'TXTMSG is a constant 127 character string used as a test

TXTMSG = "@H            1998031300000019980316000000COMMON EFT/DISB ROSE001PMOHELA                          82886300      OEMPORIA STATE "

'chr$(26) is the end of file character to make 128 total
TXTMSG = TXTMSG & Chr$(26)

'PktString is the actual packet string

'SOH header
PktString = Chr$(1)

'packet number
PktString = PktString & Chr$(1)
'packet number complement
PktString = PktString & Chr$(254)

'add data block (128 characters)
PktString = PktString & TXTMSG

'getCheckSum returns a 1 byte checksum integer
PktString = PktString & Chr$(getCheckSum(TXTMSG))
buildPacket = PktString

End Function
0
 
LVL 6

Expert Comment

by:joopv
ID: 1144676
Seems to comply with the spec for the first packet, providing the getCheckSum function only returns 1 byte of information..  Can you check that ?  If is is the sum including carry, AND it with 255.

0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 6

Expert Comment

by:joopv
ID: 1144677
hmm upon reading somewhat better i guess the chr$() function should only return the checksum MOD 255 if it would be greater.
Test the checksum function yourself, by hand.  I would'nt trust any VB function i had'nt written myself :-)
 
0
 
LVL 6

Expert Comment

by:joopv
ID: 1144678
Mcello,

No progress yet ?  If you want i could try to make a serial datatrace from a xmodem transfer session.

For debugging serial data communications i use a dedicated laptop with 2 serial ports and the d'scope program.  It is a very old DOS application.  If you have a spare system i could send you the program.


0
 

Author Comment

by:mcello
ID: 1144679
Sorry it took me awhile to get back. Ive been away for the last
5 days or so.

Im still having some problems. I took a close look at what I was
getting back from the host (compuserve) and they repeatedly
are sending the 'C' character. According to what Ive read
this should only happen once but they seem to insist on using
CRC mode.

So I read up and wrote a CRC checksum routine.

It still doesnt work. I guess my question then has changed from
how to implement a packet using standard checksums to one using CRC.

The only thing I can think of is to post the code which I know
you would have to wade through. So heres the deal

I can
award you 100 points for the effort of putting me on track and
be done with it

or
If you can find the problem in what Im doing I will be more than
happy to award you my entire point bank of around 1000 points.

Let me know if you want to go that way and I can post the code.


0
 
LVL 6

Expert Comment

by:joopv
ID: 1144680
i'd love to dig in to your problem further but i don't have much time left before i go on a long trip.  Besides, i'm not a very experienced VB programmer anyway.

I'll take your first offer and can only offer you some more tips like searching the web for other xmodem source code (although it usually will be C code) and the old source code archives, i'm pretty sure there will be more pascal and maybe even basic xmodem sources just waiting to be downloaded.

a quick search at http://ftpsearch.ntnu.no/ on xmodem already gives 15 hits, including a possible interesting document on
ftp://kyuss.artis.uni-oldenburg.de/pub/infopool/documents/specifications/dfue/XMODEM/xmodem.doc.


0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

This article will step through configuring a SonicWALL appliance to utilize an internal DHCP server for Global VPN Client (GVC) hosts.  There are times when using an external (external to the SonicWALL) DHCP server, such as Windows Servers, isn’t pr…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now