• Adding kermit as a protocol option

    From Christian Sacks@2:250/5 to g00r00 on Tue Aug 8 11:25:36 2023
    Hey g00r00,

    I've installed `gkermit` on my linux host, and in protocol editor have made a new "kermit" protocol, and the send/recv commands are like this;

    Send Command │ /usr/bin/gkermit -d /tmp/kermit-send.log -Ts %3
    Recv Command │ /usr/bin/gkermit -d /tmp/kermit-recv.log -Tr %3

    With %3 as the filename(s), it seems to generate a file.lst on the client end, and inside the file that it downloads just has a line for each file with it's full filepath on the bbs, and doesn't download the actual file...

    I looked at the default sexyz config which uses @%3 which I thought might be required instead, but adding the @%3 instead just errors immediately with the filename not being found according to the client.

    Do you have any information about what %3 is exactly and anything else useful for the protocol editor? the wiki pages are empty for protocol editor and would love to get this working.


    Cheers for your help =)

    ... Light year: 1/3 less calories than your regular year

    --- Mystic BBS v1.12 A48 2022/07/15 (Linux/64)
    * Origin: thE qUAntUm wOrmhOlE, rAmsgAtE, uK. bbs.erb.pw (2:250/5)
  • From Alexander Grotewohl@1:120/616 to Christian Sacks on Tue Aug 8 14:09:00 2023
    On 08 Aug 2023, Christian Sacks said the following...

    I've installed `gkermit` on my linux host, and in protocol editor have made a new "kermit" protocol, and the send/recv commands are like this;

    Send Command │ /usr/bin/gkermit -d /tmp/kermit-send.log -Ts %3
    Recv Command │ /usr/bin/gkermit -d /tmp/kermit-recv.log -Tr %3

    With %3 as the filename(s), it seems to generate a file.lst on the
    client end, and inside the file that it downloads just has a line for
    each file with it's full filepath on the bbs, and doesn't download the actual file...

    having searched around the docs a bit it looks like kermit does batch xfers differently than most bbs software would expect. you would likely just have to turn 'batch' off in the protocol config and have it work one file at a time. (batch toggles whether %3 is just one file by itself, or a file list file)

    I looked at the default sexyz config which uses @%3 which I thought
    might be required instead, but adding the @%3 instead just errors immediately with the filename not being found according to the client.

    @ is a sexyz parameter not a mystic one. if it finds that @ at the beginning of the filename it will read that file line by line and send each of the files listed. kermit doesn't support this so that's the problem.

    if you're comfortable doing a little programming you could probably make a script to read the lines in file.lst then run gkermit like it wants:

    /usr/bin/gkermit -d /tmp/kermit-send.log -Ts file1 file2 file3

    (or maybe it needs -Ts in front of every file.. don't use it so i can't test it..)

    then for the mystic protocol you'd just have

    /wherever/yourprogram %3

    and batch turned on.

    --- Mystic BBS v1.12 A47 2021/12/25 (Windows/32)
    * Origin: cold fusion - cfbbs.net - grand rapids, mi (1:120/616)
  • From Björn Wiberg@2:201/137 to Christian Sacks on Wed Aug 9 10:54:45 2023
    Hello Christian!

    On 08 Aug 2023, Christian Sacks said the following...

    I looked at the default sexyz config which uses @%3 which I thought
    might be required instead, but adding the @%3 instead just errors immediately with the filename not being found according to the client.

    I believe @ is SEXYZ syntax for reading a file containing a list of the files to be sent (http://wiki.synchro.net/util:sexyz).

    %3 in Mystic will be the full path to such a file when the protocol is flagged as Batch: Yes in the Protocol Editor. That's probably why you got a "file.lst" on the receiving end. With Batch: No, %3 will instead be the full path to the (single) file to be sent.

    As gkermit doesn't appear to support reading such a file list when sending files -- and Mystic doesn't appear to allow for specifying a "base directory" when batch-receiving files using external protocols (and automatically "finding" all files there after the batch transfer has completed) -- your best bet would be to select Batch: No and hence allow Kermit for transfers of single files only.

    This then makes it impossible to "tag" files in the file listings (as soon as you do, it will consider this a batch even if the batch only contains one file), not displaying/offering Kermit (non-batch) as an available file transfer protocol when choosing to (D)ownload files from the files menu. Instead you have to (D)ownload from the file menu and (remember and specify) the filename manually.

    Anyway, you might want to try this:

    █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ Protocol Editor: Kermit ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄
    █ █
    █ Active │ Yes █
    ▄▄ █ OS │ Linux █▓gj! ▐█▄▄█ Batch │ No ██▄▄
    ░████ Hot Key │ K ███▒■ ▀ ▓███ Description │ Kermit ███▌▐ ▓ ▒▓▓█ Send Command │ gkermit -i -P -q -X -s "%3" █▓░▓ ▀ █░░█ Recv Command │ gkermit -i -P -q -X -r -a "%3" ██░▓ ░░▓███ █▄▄█ ▄▄■ ▀▀▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█▌░░

    Please let me know if this works (for single files).

    (It might actually be possible to create a separate protocol for Kermit batch downloads only, with some bash trickery that will enumerate the files, but I haven't looked into this yet...)

    Best regards
    Björn

    --- Mystic BBS v1.12 A49 2023/04/30 (Linux/64)
    * Origin: Star Collision BBS, Uppsala, Sweden (2:201/137)
  • From Christian Sacks@2:250/5 to Alexander Grotewohl on Wed Aug 9 11:25:20 2023
    On 08 Aug 2023, Alexander Grotewohl said the following...

    if you're comfortable doing a little programming you could probably make
    a script to read the lines in file.lst then run gkermit like it wants:

    /usr/bin/gkermit -d /tmp/kermit-send.log -Ts file1 file2 file3

    (or maybe it needs -Ts in front of every file.. don't use it so i can't test it..)

    I am grateful for your thoughts, with them I have made this script;

    #!/usr/bin/env bash
    FILELIST="$1"
    FILES=$(cat $FILELIST|tr '\n' ' ')
    for FILE in $FILES; do
    echo "/usr/bin/gkermit -d /tmp/kermit-send.log -XTs $FILE"
    /usr/bin/gkermit -d /tmp/kermit-send.log -XTs $FILE
    done

    ... and then in the protocol editor I use this;

    Active │ Yes
    OS │ All
    Batch │ Yes
    Hot Key │ K
    Description │ Kermit (testing)
    Send Command │ /mystic/kermit_batch.sh %3
    Recv Command │ /usr/bin/gkermit -d /tmp/kermit-recv.log -XTr %3

    I've tested using "qodem" terminal, and with a single and multiple files in a batch it works perfectly (to download from the BBS to the client).

    I shall next attempt to test the uploads, but I assume this will just be ok as it is.

    I shall let y'all know how it goes.
    FWIW kermit seems to be much quicker than zmodem =)

    ... That's not a bug, it's an undocumented feature

    --- Mystic BBS v1.12 A48 2022/07/15 (Linux/64)
    * Origin: thE qUAntUm wOrmhOlE, rAmsgAtE, uK. bbs.erb.pw (2:250/5)
  • From Christian Sacks@2:250/5 to All on Wed Aug 9 11:48:57 2023
    On 09 Aug 2023, Christian Sacks said the following...

    On 08 Aug 2023, Alexander Grotewohl said the following...

    if you're comfortable doing a little programming you could probably m a script to read the lines in file.lst then run gkermit like it wants

    /usr/bin/gkermit -d /tmp/kermit-send.log -Ts file1 file2 file3

    (or maybe it needs -Ts in front of every file.. don't use it so i can test it..)

    I am grateful for your thoughts, with them I have made this script;

    #!/usr/bin/env bash
    FILELIST="$1"
    FILES=$(cat $FILELIST|tr '\n' ' ')
    for FILE in $FILES; do
    echo "/usr/bin/gkermit -d /tmp/kermit-send.log -XTs $FILE"
    /usr/bin/gkermit -d /tmp/kermit-send.log -XTs $FILE
    done

    ... and then in the protocol editor I use this;

    Active │ Yes
    OS │ All
    Batch │ Yes
    Hot Key │ K
    Description │ Kermit (testing)
    Send Command │ /mystic/kermit_batch.sh %3
    Recv Command │ /usr/bin/gkermit -d /tmp/kermit-recv.log -XTr %3

    I've tested using "qodem" terminal, and with a single and multiple files in a batch it works perfectly (to download from the BBS to the client).

    I shall next attempt to test the uploads, but I assume this will just be ok as it is.

    I shall let y'all know how it goes.
    FWIW kermit seems to be much quicker than zmodem =)

    ... That's not a bug, it's an undocumented feature

    --- Mystic BBS v1.12 A48 2022/07/15 (Linux/64)
    * Origin: thE qUAntUm wOrmhOlE, rAmsgAtE, uK. bbs.erb.pw (2:250/5)

    After testing the files downloaded with this script, I realised the files themselves were corrupted, so updated my wrapper script to use this syntax for the actual downloading;

    /usr/bin/gkermit -d /tmp/kermit-send.log -Xis $FILE

    -X means eXternal - seemed appropriate
    i means Binary mode transfer (default) but wanted to force it to make sure
    s means Send with the filename as the argument

    Reckon this is good to go now =)

    ... Help! I can't find the "ANY" key.

    --- Mystic BBS v1.12 A48 2022/07/15 (Linux/64)
    * Origin: thE qUAntUm wOrmhOlE, rAmsgAtE, uK. bbs.erb.pw (2:250/5)
  • From Christian Sacks@2:250/5 to All on Wed Aug 9 14:27:07 2023
    On 09 Aug 2023, Christian Sacks said the following...

    After testing the files downloaded with this script, I realised the files themselves were corrupted, so updated my wrapper script to use this
    syntax for the actual downloading;

    /usr/bin/gkermit -d /tmp/kermit-send.log -Xis $FILE

    -X means eXternal - seemed appropriate
    i means Binary mode transfer (default) but wanted to force it to make sure s means Send with the filename as the argument

    Reckon this is good to go now =)

    Another update, this time it also allows messages in message bases to be saved by kermit too;

    #!/usr/bin/env bash
    FILELIST="$1"
    FILES=$(cat $FILELIST|tr '\n' ' ')
    if [[ "$(basename $FILELIST)" == "file.lst" ]]; then
    for FILE in $FILES; do
    echo "Sending file: $FILE"
    /usr/bin/gkermit -d /tmp/kermit-send.log -Xis $FILE
    done
    else
    echo "Sending file: $FILELIST"
    /usr/bin/gkermit -d /tmp/kermit-send.log -XTs $FILELIST
    fi
    rm $FILELIST

    Still haven't tested uploads yet, but that is next =)

    ... My reality check just bounced

    --- Mystic BBS v1.12 A48 2022/07/15 (Linux/64)
    * Origin: thE qUAntUm wOrmhOlE, rAmsgAtE, uK. bbs.erb.pw (2:250/5)
  • From Alexander Grotewohl@1:120/616 to Christian Sacks on Wed Aug 9 13:58:53 2023
    On 09 Aug 2023, Christian Sacks said the following...

    I've tested using "qodem" terminal, and with a single and multiple files in a batch it works perfectly (to download from the BBS to the client).

    that's awesome, glad it worked out!

    FWIW kermit seems to be much quicker than zmodem =)

    yeah.. i'm not sure how much the protocol itself has changed, but iirc it was an official university-sponsored project until recently. few decades worth of tweaks here and there.

    --- Mystic BBS v1.12 A47 2021/12/25 (Windows/32)
    * Origin: cold fusion - cfbbs.net - grand rapids, mi (1:120/616)
  • From Rob Swindell to Björn Wiberg on Wed Aug 9 11:27:45 2023
    Re: Re: Adding kermit as a protocol option
    By: Björn Wiberg to Christian Sacks on Wed Aug 09 2023 10:54 am

    I believe @ is SEXYZ syntax for reading a file containing a list of the files to be sent (http://wiki.synchro.net/util:sexyz).

    And that scheme (the '@' character in the filename being "special") was originally copied from Chuck's DSZ.

    SEXYZ actually supports '+listfile' as well, if @ is a problem.
    --
    digital man (rob)

    Breaking Bad quote #11:
    My apologies to the HR department: Grow tumescent with anticipation. - Hank Norco, CA WX: 79.3°F, 62.0% humidity, 0 mph E wind, 0.00 inches rain/24hrs