Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

xmodem transfer

Posted on 1998-08-25
8
Medium Priority
?
241 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 500 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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
 
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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you’re like me and you like peace and quiet, saving money, and pretty lights, then this article is for you. For financial reasons, I buy all the Cisco equipment for my home lab second-hand. The first thing to wear out is usually one of the coo…
This article is a how to to configure a UCS Ethernet-uplink portchannel via the console. It is easy to do and can be done quite quickly. In certain versions of the UCS manager the portchannel has issues coming up and this is a workaround. I am…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

783 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