• Filetransfer Protocols

    From dragonmaster@21:1/149 to All on Mon Nov 11 16:04:52 2019
    Hi All

    i ask myself why there are no modern transfer protocols out there.
    The X/Y/Z-Modem stuff was made long before TCP and IP where used by the
    masses. But today there is no need for these old protocols. Modern terminal-programs work over tcp/ip and in most cases the filetransfer goes wrong. I tryed to integrate a version of zmodem, writen in java, an it's a mess. There is so many error correction stuff in the protocol that i decided
    to create a new protocol for my bbs ;-)

    TCP/IP has all the beautiful corrections and sorting mechanisms that the filetransfer needed. In my case the protocol is written in to linux-shell-scripts. It doesn't ask for filenames, handles batch-downloads and is very simple.

    For the Download, the Communication comes only from the BBS:
    BBS -> CLIENT: $02 (Start of Text)
    BBS -> CLIENT: FILENAME + $0D
    BBS -> CLIENT: FILELENGTH + $0D
    BBS -> CLIENT: DATA (Base64 without Linebreaks) + $0D
    BBS -> CLIENT: $04 (End of Transmission)

    The TCP/IP-Connection handles all Errors ;-)

    For the Upload:
    BBS -> CLIENT: $05 (Enquiry)
    BBS <- CLIENT: FILENAME + $0D
    BBS <- CLIENT: DATA (Base64 without Linebreaks) + $0D
    BBS -> CLIENT: $04 (End of Transmission)

    The Up- and Download-Scripts are very easy an i can post them here if needed.

    With this simple (but surely not the best solution) i can up- and download files to my bbs without any error.

    i'm very happy about this :-)

    Best Regards,
    Dragonmaster

    --- Mystic BBS v1.12 A43 2019/03/03 (Raspberry Pi/32)
    * Origin: XIONUM-BBS (21:1/149)
  • From lemonlime@21:4/162 to dragonmaster on Tue Nov 12 21:07:44 2019
    With this simple (but surely not the best solution) i can up- and
    download files to my bbs without any error.

    i'm very happy about this :-)

    Very cool! I had wondered about this too. Would love to check out your
    scripts. It would be cool if a standard like this could be created and added along side X/Y/Z modem for modern BBS use :)

    --- Mystic BBS v1.12 A43 2019/03/02 (Linux/64)
    * Origin: Stellar Darkness BBS, Toronto, Canada (21:4/162)
  • From dragonmaster@21:1/149 to lemonlime on Wed Nov 13 11:25:18 2019
    Hi.

    Here are the Scripts, the names are "upload" and "download", i was very creative ;-)

    For the Download:
    ------------------
    #!/bin/sh
    # this script is for downloading files from the bbs
    # in mystic set the "Send Command" to ./download %7
    # %7 is the nodenumber

    NODE=$1
    if [ -f temp$NODE/file.lst ]
    then
    for FILE in $(cat temp$NODE/file.lst)
    do
    FILENA=$(basename $FILE)
    DATA=$(base64 -w 0 "$FILE")
    LENGTH=$(echo $DATA | wc -m)

    echo '$02' <- here you have to send the real byte
    echo $FILENA
    echo $LENGTH
    echo $DATA
    echo '$04' <- here you have to send the real byte
    echo "z 0 19200 bps 9600 cps 0 errors 0 1024 $FILENA -1" >> $DSZLOG
    done
    else
    DATA=$(base64 -w 0 "$1")
    LENGTH=$(echo $DATA | wc -m)
    FILENA=$(basename $FILENAME)

    echo '$02' <- here you have to send the real byte
    echo $FILENA
    echo $LENGTH
    echo $DATA
    echo '$04' <- here you have to send the real byte
    echo "z 0 19200 bps 9600 cps 0 errors 0 1024 $FILENA -1" >> $DSZLOG
    fi

    For the Upload:
    ----------------
    #!/bin/sh
    # this script is for uploading a file to the bbs
    # in mystic set the "Recv Command" to /absolute/path/of/upload
    # example: /home/bbs/mystic/upload

    echo '$05' <- here you have to send the real byte
    stty -echo
    read FILENAME
    base64 -d -i > $FILENAME
    stty echo
    echo '$04' <- here you have to send the real byte
    sync
    SIZE=$(wc -c <"$FILENAME")
    if [ $SIZE -eq 0 ]
    then
    echo "ERROR"
    else
    echo "Z $SIZE 19200 bps 9600 cps 0 errors 0 1024 $FILENAME -1" >> $DSZLOG fi ----------------------------------------------------------------------------- To echo the real bytes edit the script with the mcedit.
    Press F9 -> select "format" -> select "insert literal" and press the key for the byte. A=$01, B=$02, C=$03, D=$04 and so on...

    If you have an open-source-terminal you can put the counterpart to the script in it.

    To test the up- and download you can use my bbs
    Telnet: server.xionum.de:2323
    SSH: server.xionum.de:2222

    Best Regards,
    Dragonmaster

    --- Mystic BBS v1.12 A43 2019/03/03 (Raspberry Pi/32)
    * Origin: XIONUM-BBS (21:1/149)
  • From lemonlime@21:4/162 to dragonmaster on Wed Nov 13 13:58:52 2019
    Here are the Scripts, the names are "upload" and "download", i was very creative ;-)

    Very cool! Thanks for sharing :)

    --- Mystic BBS v1.12 A43 2019/03/02 (Linux/64)
    * Origin: Stellar Darkness BBS, Toronto, Canada (21:4/162)