home *** CD-ROM | disk | FTP | other *** search
/ RISC DISC 2 / RISC_DISC_2.iso / pd_share / comms / hamradio / blt / data / Extra / YAPP_INF < prev   
Encoding:
Text File  |  1994-03-10  |  3.1 KB  |  81 lines

  1.  
  2.  
  3. From        : G0GOU 
  4. Date/time   : 14-Aug 07:28
  5. Title       : Explanation Of YAPP Protocol
  6.  
  7. YAPP FILE TRANSFER PROTOCOL EXPLANATION
  8. ---------------------------------------
  9.  
  10. I have written this text to help anyone who wishes to write software to 
  11. deal with YAPP file transfers. It explains step by step , how the protocol
  12. works.
  13.  
  14. Let's assume you were downloading a file from a BBS. I will explain each
  15. step as it occurs.
  16.  
  17. After you have selected the file you wish to download, the BBS will send
  18. two characters to indicate it is ready to start. These characters are:-
  19. CHR(5) AND CHR(1). You then reply to this prompt by sending to the BBS
  20. these two characters:-  CHR(6) AND CHR(1). After this, the BBS will send
  21. a file header. This header contains the filename, length and in some
  22. cases a path. Let's say the file you selected was called YAPP.TXT and 
  23. it was 3853 bytes long.
  24.  
  25. To indicate the start of the header, the BBS sends a CHR(1), then it sends
  26. a byte containing the amount of characters in the header. It then sends the 
  27. filename followed by a CHR(0). After this, it will send the filelength
  28. (in decimal) again followed by a CHR(0).
  29.  
  30. So our header would take this form. Any number in the {} brackets indicates
  31. an ASCII value and NOT the ACTUAL character.
  32.  
  33.      {1}{14}YAPP.TXT{0}3853{0}
  34.  
  35. Some yapp systems add spaces at certain points.
  36.  
  37.      {1}{16}YAPP.TXT{0}  3853{0}
  38.          |             ^^
  39. or       |
  40.          |
  41.      {1}{16}YAPP.TXT  {0}3853{0}
  42.          |          ^^
  43.          --------
  44.                 |
  45. Note that the LENGTH changes to accomodate extra spaces. Also note that
  46. the LENGTH also includes the CHR(0)'s as well.
  47.  
  48. Other systems may also add a path.
  49.  
  50.      {1}{30}FILES\YAPP\TEXT\YAPP.TXT{0}3853{0}
  51.  
  52. Your program should be able to seperate the path from the filename, and
  53. also ignore any spaces that occur.
  54.  
  55. Right! Once you have managed to pull the information you need out of the 
  56. header, you then send two characters:- CHR(6) & CHR(2). Once the BBS 
  57. recieves these characters, it starts to send the file.
  58.  
  59. The file is divided into blocks. Each block can be a maximum of 256 bytes.
  60. Each block starts with a CHR(2), and is followed by another byte indicating
  61. how long the block is. A CHR(0) means that the block is 256 bytes long.
  62. Each block is sent in a RAW state. That means that all the ASCII codes from
  63. 0-255 are used. No translation is neccesary, all you have to do is put all
  64. the blocks together to end up with the original file. 
  65.  
  66. Once the file has been completely transferred the BBS sends two characters
  67. to indicate the end of the file. CHR(3) and CHR(1). You respond with a 
  68. CHR(6) and CHR(3). The BBS responds to that with an CHR(4) and CHR(1).
  69. You then end the transfer with an CHR(6) and CHR(4).
  70.  
  71. This end process seems a bit silly. i.e. Having to keep swapping codes
  72. to end the transfer. Sorry about that! But I didn't write the protocol
  73. you know.
  74.  
  75. Due to the nature of YAPP using all the available ASCII codes, (0-255) it
  76. becomes nessesary to operate the file transfer in transparent mode,
  77. 8 bit conversion and RTS/CTS handshaking. If you don't follow these 3
  78. steps you will NOT succeed in transfering anything at all.
  79.  
  80. 73 de Len G0GOU @ GB7BAD.#23.GBR.EU
  81.