• Re: Using tcpser on a Pi for telnet gateway to C64?

    From Dropnine@3:770/3 to 6502en...@gmail.com on Wed Jun 21 11:50:38 2017
    On Wednesday, June 21, 2017 at 12:09:36 AM UTC-6, 6502en...@gmail.com wrote:
    Thanks for the help!

    The PI is being powered by a 5V 1A transformer.

    It is connected via a USB to serial adapter to the serial port of a Apple
    IIe.

    The USB to serial are known to be sort of flaky... Saying that, the hardware should be powered fine with that power source you have.

    If you set it up as a service, it should restart automatically if you told it to in the service file.

    To find out if tcpser is still running after it craps out, at the bash type:
    ps -ef | grep tcpser

    If the resulting list displays that it is still running, then kill it by its PID. Don't confuse the "grep tcpser" in the list as the tcpser command, itself.

    If it is not running, then I'd write a quick script that will perform that ps command above and if tcpser does not exist, then start it. Put an entry in your
    CRON to run that script every 5 minutes or quicker.

    Still, the best practice would be to make a tcpser service and tell the service
    to restart on termination.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Andreas Kohlbach@3:770/3 to 6502enhanced@gmail.com on Wed Jun 21 16:40:42 2017
    On Tue, 20 Jun 2017 00:45:02 -0700 (PDT), 6502enhanced@gmail.com wrote:

    Today I had another stop of tcpser. So it ran now for 8 days without
    problems.

    I don't know why it stopped.

    Has anyone an explanation or a hint what I can do?

    Here is a pic of the monitor when tcpser stopped:

    https://s22.postimg.org/ar4ayh2zl/PI_Hayes.jpg

    You might be able to bypass tcpser and most of your setup.

    I just came around info and a video by LGR from YouTube [1] about the
    WIFI232 <http://hackaday.com/2017/06/17/bbsing-with-the-esp8266/>. Which
    at one end has an RS-232 adapter you plug into any of your old hardware
    (C64, Amiga, Apple ][, Macintosh, RadioShack, Atari, many others from
    back of the day. It claims to be a Hayes compatible modem. Then sets up a serial connection and call a terminal program on the computer (I notice
    there is COMMSTAR for many 8bit computers available) and issue AT
    commands. Not only "ATD123456" to dial. Also to connect to your WIFI. I
    think it was something like "ATESSIDmywifi_source". There is a PDF user
    manual in the web some where.

    [1] <https://www.youtube.com/watch?v=fsS0E4G310Y>
    --
    Andreas
    You know you are a redneck if
    you ever lost a loved one to kudzu.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Dropnine@3:770/3 to Dropnine on Wed Jun 21 20:12:34 2017
    On Wednesday, June 21, 2017 at 9:06:24 PM UTC-6, Dropnine wrote:
    ...
    Now, create a file that will be your script. At the bash:
    type: cd
    type: startSerial
    ...

    That should read
    type: cd
    type: vi startSerial
    type: i

    Something happened when I posted that and it added a script I wrote at the beginning of the replay and then omitted the above. Sorry about that random interweb gremlin attack on my post.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Dropnine@3:770/3 to Andreas Kohlbach on Wed Jun 21 20:06:22 2017
    #!/bin/sh

    RESULT=`ps -a | sed -n /tcpser/p`

    if [ "${RESULT:-null}" = null ]; then
    tcpser <yourParameters>


    On Wednesday, June 21, 2017 at 2:40:43 PM UTC-6, Andreas Kohlbach wrote:
    On Tue, 20 Jun 2017 00:45:02 -0700 (PDT), 6502enhanced@gmail.com wrote:

    Today I had another stop of tcpser. So it ran now for 8 days without
    problems.

    I don't know why it stopped.

    Has anyone an explanation or a hint what I can do?

    Here is a pic of the monitor when tcpser stopped:

    https://s22.postimg.org/ar4ayh2zl/PI_Hayes.jpg

    You might be able to bypass tcpser and most of your setup.

    I just came around info and a video by LGR from YouTube [1] about the
    WIFI232 <http://hackaday.com/2017/06/17/bbsing-with-the-esp8266/>. Which
    at one end has an RS-232 adapter you plug into any of your old hardware
    (C64, Amiga, Apple ][, Macintosh, RadioShack, Atari, many others from
    back of the day. It claims to be a Hayes compatible modem. Then sets up a serial connection and call a terminal program on the computer (I notice
    there is COMMSTAR for many 8bit computers available) and issue AT
    commands. Not only "ATD123456" to dial. Also to connect to your WIFI. I
    think it was something like "ATESSIDmywifi_source". There is a PDF user manual in the web some where.

    [1] <https://www.youtube.com/watch?v=fsS0E4G310Y>
    --
    Andreas
    You know you are a redneck if
    you ever lost a loved one to kudzu.

    There's a number of those devices and they rock :) There's a new internal C128
    wifi that someone made, too:

    https://www.reddit.com/r/c128/comments/6gb28v/internal_swiftlink_compatible_wifi_modem/

    If you still want to get your tcpser working and then auto-restart when it stops (for whatever reason) just follow these steps (which is explained in my previous post).

    Here's a step-by-step on how to autostart tcpser on the raspberry pi (or any LINUX):

    log into your raspberry pi.

    Now, create a file that will be your script. At the bash:
    type: cd
    type: startSerial

    copy and paste the text between the *'s:

    ************
    #!/bin/sh

    RESULT=`ps x |grep -v grep |grep -c "tcpser"`

    if [ $RESULT = 0 ]; then
    tcpser -s 38400 -d /dev/ttyUSB0 &
    ************

    Change the tcpser parameters to whatever you normally use (minus the debugging and log parameters). Make sure you keep the & at the end of the command line.

    The variable RESULT stores the number of tcpser commands running. If it's 0, then run tcpser command. If it's not 0 then exit (meaning that tcpser is already running).

    now save and quit the editor by:
    Press the <esc> key
    type: :wq

    you're now at back at the bash. You need to make the file executable. At the bash:

    type: chmod +x startSerial

    and, again, you're at the bash after pressing <Enter>.

    The second part is to make a timer that will run the script every minute. To do that, you edit the CRON Table. Again, it's just another text file and it's just one line. At the bash:

    type: crontab -e

    if it asks you what editor you want, select 2) nano.

    now use the cursor key to scroll all the way down to the last line and enter (or copy/paste the line below):

    */1 * * * * /home/pi/startSerial

    The menu at the bottom your display shows you how to exit the editor. Press <CTRL-X>, then Y and finally your <Enter> key to save the text. The above line
    tells the your pi to run the startSerial script you just wrote every minute. If you want to
    change it to a slower interval, change the 1 to a 5 for a 5 minute interval, 10
    for a 10 minute interval, etc.

    To test it, wait a minute and at the bash:

    type: ps x |grep -v grep |grep -c "tcpser"

    There should be a 1. If it reports a 0, then you need check your typing and make sure you set the startSerial file to execute with chmod +x.

    -----
    There are many ways to get the job done. The @reboot command also has its merits in starting a file at boot.

    works for me :)

    Cheers,
    Carl

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Dropnine@3:770/3 to All on Wed Jun 21 22:10:54 2017
    Instead of piecing together the posts and the corrections because of my adhd, I
    put them here to be easily retrieved as a whole.

    https://drive.google.com/drive/folders/0B7Y4Lsah28nCem54WnBWYkZ5LTQ

    Cheers
    c

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From mark lewis@1:3634/12.73 to Dropnine on Thu Jun 22 15:29:18 2017

    On 2017 Jun 21 11:50:38, you wrote to 6502en...@gmail.com:

    If the resulting list displays that it is still running, then kill it
    by its PID. Don't confuse the "grep tcpser" in the list as the tcpser command, itself.

    a little trick to avoid seeing the "grep" line in the output...

    ps -ef | grep [t]cpser

    ;)

    )\/(ark

    Always Mount a Scratch Monkey
    Do you manage your own servers? If you are not running an IDS/IPS yer doin' it wrong...
    ... "This chicken has no beak," said Tom impeccably.
    ---
    * Origin: (1:3634/12.73)
  • From Andreas Kohlbach@3:770/3 to Dropnine on Thu Jun 22 16:55:52 2017
    On Wed, 21 Jun 2017 20:06:22 -0700 (PDT), Dropnine wrote:

    On Wednesday, June 21, 2017 at 2:40:43 PM UTC-6, Andreas Kohlbach wrote:
    On Tue, 20 Jun 2017 00:45:02 -0700 (PDT), 6502enhanced@gmail.com wrote:

    Today I had another stop of tcpser. So it ran now for 8 days without problems.

    I don't know why it stopped.

    Has anyone an explanation or a hint what I can do?

    Here is a pic of the monitor when tcpser stopped:

    https://s22.postimg.org/ar4ayh2zl/PI_Hayes.jpg

    You might be able to bypass tcpser and most of your setup.

    I just came around info and a video by LGR from YouTube [1] about the
    WIFI232 <http://hackaday.com/2017/06/17/bbsing-with-the-esp8266/>. Which
    at one end has an RS-232 adapter you plug into any of your old hardware
    (C64, Amiga, Apple ][, Macintosh, RadioShack, Atari, many others from
    back of the day. It claims to be a Hayes compatible modem. Then sets up a
    serial connection and call a terminal program on the computer (I notice
    there is COMMSTAR for many 8bit computers available) and issue AT
    commands. Not only "ATD123456" to dial. Also to connect to your WIFI. I
    think it was something like "ATESSIDmywifi_source". There is a PDF user
    manual in the web some where.

    [1] <https://www.youtube.com/watch?v=fsS0E4G310Y>

    There's a number of those devices and they rock :) There's a new internal
    C128 wifi that someone made, too:

    https://www.reddit.com/r/c128/comments/6gb28v/internal_swiftlink_compatible_wifi_modem/

    Thanks.

    But since the C128 also sports an RS-232 and the WIFI-232 is not hardware depended I'd go with the WIFI-232.

    But since I have no real vintage hardware thus emulate it I have to go
    with tcpser. Kind of works for me.

    Not always. [For the British readers here]: Why isn't Ceefax working on
    the BBC Micro I emulate? ;-)
    --
    Andreas

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From 6502enhanced@gmail.com@3:770/3 to All on Fri Jun 23 01:55:54 2017
    Hi,
    Thanks a lot for all your help!

    To explain: I use a Apple IIe for a BBS. Therefor the PI with tcpser acts as a rCRmodemrCL. So the BBS is reachable via telnet.

    I do have a WiFi232 - great tool - I use it to rCRdial-uprCL other BBS with a Apple II+. But I donrCOt want to purchase a second one , because I have the Raspberry PI 2B and want it to make my BBS connectable via telnet. That worked fine so far - only
    the mentioned problem rCa

    As I understood correctly I have to do the following to
    - make a tcpser service
    - That restarts every minute to avoid my problem of tcpser being stopped

    1.)
    Create a file that will be your script. At the bash:
    type: cd
    type: vi startSerial
    type: i

    copy and paste the text between the *'s:

    ************
    #!/bin/sh

    RESULT=`ps x |grep -v grep |grep -c "tcpser"`

    if [ $RESULT = 0 ]; then
    -a -a tcpser -s 2400 -d /dev/ttyUSB0 &
    ************

    2.)
    now save and quit the editor by:
    Press the <esc> key
    type: :wq

    3.)
    you're now at back at the bash. -aYou need to make the file executable. At the bash:

    type: chmod +x startSerial

    and, again, you're at the bash after pressing <Enter>.

    4.)
    The second part is to make a timer that will run the script every minute. -aTo do that, you edit the CRON Table. Again, it's just another text file and it's just one line. -aAt the bash:

    type: crontab -e

    if it asks you what editor you want, select 2) nano.

    now use the cursor key to scroll all the way down to the last line and enter (or copy/paste the line below):

    */1 * * * * /home/pi/startSerial

    The menu at the bottom your display shows you how to exit the editor. Press <CTRL-X>, then Y and finally your <Enter> key to save the text. -aThe above line tells the your pi to run the startSerial script you just wrote every minute. -aIf you want to
    change it to a slower interval, change the 1 to a 5 for a 5 minute interval, 10
    for a 10 minute interval, etc.

    To test it, wait a minute and at the bash:

    type: ps x |grep -v grep |grep -c "tcpser"

    There should be a 1. -aIf it reports a 0, then you need check your typing and make sure you set the startSerial file to execute with chmod +x.

    rCorCorCorCorCorCorCo

    Where do I have to put the mentioned:

    a little trick to avoid seeing the "grep" line in the output...

    -a ps -ef | grep [t]cpser

    in?


    Thanks!

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Janne Johansson@2:221/6 to mark lewis on Fri Jun 23 17:52:36 2017
    On 2017-06-22 21:29, mark lewis : Dropnine wrote:

    On 2017 Jun 21 11:50:38, you wrote to 6502en...@gmail.com:

    If the resulting list displays that it is still running, then kill it
    by its PID. Don't confuse the "grep tcpser" in the list as the tcpser command, itself.

    a little trick to avoid seeing the "grep" line in the output...

    ps -ef | grep [t]cpser


    Or just use "pgrep" which saves you the pipe and the tricks.

    ---
    * Origin: *** nntp://fidonews.mine.nu *** Finland *** (2:221/6.0)
  • From Dropnine@3:770/3 to 6502en...@gmail.com on Fri Jun 23 07:45:48 2017
    On Friday, June 23, 2017 at 2:55:55 AM UTC-6, 6502en...@gmail.com wrote:
    Hi,
    Thanks a lot for all your help!
    ....
    rCorCorCorCorCorCorCo

    Where do I have to put the mentioned:

    a little trick to avoid seeing the "grep" line in the output...

    -a ps -ef | grep [t]cpser

    in?


    Thanks!

    That line is just another way of seeing if tcpser is actually running or not without the clutter. You would use that directly at the bash (command prompt) when ever you want to.

    In saying that, it's easy to say that there are many many many ways to do one thing lol And that, alone, makes things convoluted and starts many opinions boiling over as to what is the best practice.

    So, to start tcpser on boot and to keep it running, you can make it into a server (the proper way I would do it, allowing) *OR* create a timer (just as good as a service, but approached more in the way of an application running on top of the OS rather
    than within it). It depends on how your brain is used to thinking and whether/what you want to know. The timer requires your own maintenance to be set up (which we did with the script to check it) or letting the OS take care of it all (which is what
    the service would do).

    Cutting to the chase and getting it done in the least amount of steps and a first crack at it, I would make a timer and then use the @reboot command. Quick, done, and it works: It will autoboot and keep running when it crashes and its process quits.

    I also agree with keeping the Pi. I'm in the same bought with a bunch of original 2011 pi's that work great for this purpose. I prefer the max232 and GPIO hardware route, but each to there own :) Working with this stuff makes it
    all feel like 1984
    again :)

    Cheers,
    Carl

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Dropnine@3:770/3 to Janne Johansson on Fri Jun 23 08:19:04 2017
    On Friday, June 23, 2017 at 9:05:34 AM UTC-6, Janne Johansson wrote:
    ....
    Or just use "pgrep" which saves you the pipe and the tricks.

    lol. That's another way yup. Again, you'd use that just at the bash as a command in respect to the how-to's provided.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From 6502enhanced@gmail.com@3:770/3 to All on Mon Jun 26 08:32:56 2017
    Thanks for your help!

    Well, I did all 4 steps, but so far I get always the 0 and not the 1 when I type: ps x |grep -v grep |grep -c "tcpser" ... Especially I made sure that I set the startSerial file to execute with chmod +x ...

    I would like to delete the file in script with:
    ***************
    #!/bin/sh

    RESULT=`ps x |grep -v grep |grep -c "tcpser"`

    if [ $RESULT = 0 ]; then
    tcpser -s 2400 -d /dev/ttyUSB0 &
    ***************
    because I have an empty first row above that - maybe here is the mistake?

    With what order can I delete the script?

    ----------------

    Towards the WiFi232 - on the BBS - A 80's Apple II BBS ( Telnet: a80sappleiibbs.ddns.net:6502 ) is a discussion about how to host a BBS with the
    WiFi232 - so far the BBS Software GBBS Pro moves not into answer mode if the Apple II is connected to the
    WiFi232 - with the Raspberry PI this works without any problems ...

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Dropnine@3:770/3 to All on Mon Jun 26 11:50:56 2017
    PS: the script should only contain the following:

    #!/bin/sh

    RESULT=`ps x |grep -v grep |grep -c "tcpser"`

    if [ $RESULT = 0 ]; then
    tcpser -s 2400 -d /dev/ttyUSB0 &


    Nothing more.

    I put the script into a file in the directory. If you need it, you can copy it
    directly to your pi with a wget command.

    CVh

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Dropnine@3:770/3 to 6502en...@gmail.com on Mon Jun 26 11:45:46 2017
    On Monday, June 26, 2017 at 9:32:58 AM UTC-6, 6502en...@gmail.com wrote:
    Thanks for your help!

    Well, I did all 4 steps, but so far I get always the 0 and not the 1 when I
    type: ps x |grep -v grep |grep -c "tcpser" ... Especially I made sure that I set the startSerial file to execute with chmod +x ...

    I would like to delete the file in script with:
    ***************
    #!/bin/sh

    RESULT=`ps x |grep -v grep |grep -c "tcpser"`

    if [ $RESULT = 0 ]; then
    tcpser -s 2400 -d /dev/ttyUSB0 &
    ***************
    because I have an empty first row above that - maybe here is the mistake?

    With what order can I delete the script?

    ----------------


    Hi. I would think that your CRON is not running or there is something up with the timing job that was entered (That's just a guess). *Make sure that your pi
    is updated with sudo apt-get update and then sudo apt-get upgrade.

    There's a couple of ways to get a picture of what's going on, the first thing is to turn on the cron logging and then look at it's log with the command: less
    /var/logs/cron.log and see what it is reporting. And then go to correct the spelling or
    whatever the cause is. Check the doc under "debugging the cron timer" to see how to turn it on.

    Another approach is to see if the script,itself, is working. Manually issue the script command with ./startSerial (if that's the name you called your script). Perhaps you never made the text file executable.

    Finally, if the script is working, bypass it and manually type: tcpser -s 2400 -d /dev/ttyUSB0 &

    at the bash and then issue a "ps -A" the tcpser should be in the list near the bottom. If it is, then issue the ps -x | grep -v grep |grep -c "tcpser" command manually to see the result. That should tell you if the tcpser command
    is working, itself.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From 6502enhanced@gmail.com@3:770/3 to All on Wed Jun 28 06:26:58 2017
    Am Montag, 26. Juni 2017 20:45:48 UTC+2 schrieb Dropnine:

    Finally, if the script is working, bypass it and manually type: tcpser -s
    2400 -d /dev/ttyUSB0 &

    at the bash and then issue a "ps -A" the tcpser should be in the list near
    the bottom. If it is, then issue the ps -x | grep -v grep |grep -c "tcpser" command manually to see the result. That should tell you if the tcpser command
    is working, itself.

    OK, I've done the following:

    - wrote "tcpser -s 2400 -d /dev/ttyUSB0 -p 6502 -ts &"
    - then ps -A
    - and ps -x | grep -v grep |grep -c "tcpser"

    (I needed to enter the port 6502 - otherwise there was no connection to the apple II because I set that port for the telnet address which is: a80sappleiibbs.ddns.net:6502 . Without the -ts there was no connection made - I
    do not know why.)

    I saw tcpser down in the list.
    I got the 1.
    All is running now.

    I don't know if the script is working. I named it startSerial, made everything as you said - but if I type "./startSerial" I get the result "unknown error in line 8" ...?

    Now I will see if tcpser stops again or if it is running well ...

    Thanks a lot for all of your help!

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From mark lewis@1:3634/12.73 to 6502enhanced@gmail.com on Wed Jun 28 11:10:04 2017

    On 2017 Jun 28 06:26:58, you wrote to All:

    I don't know if the script is working. I named it startSerial, made everything as you said - but if I type "./startSerial" I get the result "unknown error in line 8" ...?

    the script cannot work if it is erroring out... we cannot tell what the error is without seeing the script... you know what to do next, right? ;)

    )\/(ark

    Always Mount a Scratch Monkey
    Do you manage your own servers? If you are not running an IDS/IPS yer doin' it wrong...
    ... Timing has an awful lot to do with the outcome of a rain dance.
    ---
    * Origin: (1:3634/12.73)
  • From Dropnine@3:770/3 to 6502en...@gmail.com on Wed Jun 28 07:49:20 2017
    On Wednesday, June 28, 2017 at 7:27:01 AM UTC-6, 6502en...@gmail.com wrote:

    ....
    I saw tcpser down in the list.
    I got the 1.
    All is running now.

    I don't know if the script is working. I named it startSerial, made
    everything as you said - but if I type "./startSerial" I get the result "unknown error in line 8" ...?

    Now I will see if tcpser stops again or if it is running well ...

    Thanks a lot for all of your help!

    Line 8 has an error in it. If the cron job is running, it will never restart the tcpser application because it relies on the script to start it :( Check line 8 and make sure it's proper--there's a mistake of some kind on that line.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From 6502enhanced@gmail.com@3:770/3 to All on Wed Jun 28 09:19:44 2017
    :-) ... I know ... here are the pics:

    The script:

    https://s18.postimg.org/xki8l2byx/Full_Size_Render.jpg

    Screen after ./startSerial:

    (correct translation is: Syntax Error: unexpected end of file

    https://s13.postimg.org/is0zi1yzb/IMG_3763.jpg

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From mark lewis@1:3634/12.73 to 6502enhanced@gmail.com on Wed Jun 28 12:44:14 2017

    On 2017 Jun 28 09:19:44, you wrote to All:

    :-) ... I know ... here are the pics:

    you do realize that pasting the actual text into a message would have been smaller and easier, right? ;)

    (correct translation is: Syntax Error: unexpected end of file

    yeah, "if" statements end with "fi"... you don't have one...


    if [blah blah ] ; then
    do something
    fi



    )\/(ark

    Always Mount a Scratch Monkey
    Do you manage your own servers? If you are not running an IDS/IPS yer doin' it wrong...
    ... I plead not guilty by reason of computer-induced insanity.
    ---
    * Origin: (1:3634/12.73)
  • From 6502enhanced@gmail.com@3:770/3 to All on Wed Jun 28 10:50:52 2017
    Thanks a lot!

    It seems that all is now working!

    I've put the "fi" in and then at the prompt I typed "./startSerial" - and then tcpser started. So I hope that CRON Table is now also working and will start the startSerial script if tcpser stops again.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Dropnine@3:770/3 to 6502en...@gmail.com on Wed Jun 28 14:08:04 2017
    On Wednesday, June 28, 2017 at 11:50:54 AM UTC-6, 6502en...@gmail.com wrote:
    Thanks a lot!

    It seems that all is now working!

    I've put the "fi" in and then at the prompt I typed "./startSerial" - and
    then tcpser started. So I hope that CRON Table is now also working and will start the startSerial script if tcpser stops again.
    ....

    Interesting. The fi on mine is only required when there's an else included with the if/then...

    To check if the cron is working, check the log or kill the tcpser service or just restart the pi and check to see if it loads up.

    Cheers,
    c

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Janne Johansson@2:221/6 to 6502enhanced@gmail.com on Thu Jun 29 10:44:40 2017
    On 2017-06-28 05:26, 6502enhanced@gmail.com : All wrote:
    Am Montag, 26. Juni 2017 20:45:48 UTC+2 schrieb Dropnine:

    OK, I've done the following:

    - wrote "tcpser -s 2400 -d /dev/ttyUSB0 -p 6502 -ts &"
    - then ps -A
    - and ps -x | grep -v grep |grep -c "tcpser"


    I didn't want to turn this into a "my oneliner is better than yours",
    but unix shells makes this rather simple:

    pgrep tcpser || tcpser -s 2400 -d /dev/ttyUSB0 -p 6502 -ts &

    which basically means,

    "if tcpser is not found among the list of running programs, run it again"

    or even more verbose explanation:

    pgrep <name of program>
    will return an "ok" exit code if found, and error code if not.

    the || double-pipe means "if error, run stuff behind ||, else skip"
    which is the opposite of the more common && operator which means
    "run the stuff behind && only if previous command went well" mostly
    used to make sure each step of a long series of commands worked and not continue otherwise.

    So, all in all, pgrep for the program, if not found, pgrep will signal
    that it failed its mission to find tcpser in the process list, and runs
    the command after, which incidentally is the full tcpser command again.

    Since pgrep is rather cheap to execute, you could just run this as often
    as you like, even in a loop like this:

    while sleep 1
    do
    pgrep tcpser || tcpser ...
    done

    If this is in rc.local and you want that script to exit, use shell ()
    feature (called 'subshell') and place that one into the backgroup with a
    single &.

    ( while sleep 1
    do
    pgrep ...|| ..
    done
    ) &

    and you have yourself a daemon style script that checks for tcpser every
    second (every sleep X interval) and restarts it asap if its gone.

    ---
    * Origin: *** nntp://fidonews.mine.nu *** Finland *** (2:221/6.0)
  • From Dropnine@3:770/3 to Janne Johansson on Thu Jun 29 06:19:58 2017
    On Thursday, June 29, 2017 at 2:11:07 AM UTC-6, Janne Johansson wrote:

    pgrep tcpser || tcpser -s 2400 -d /dev/ttyUSB0 -p 6502 -ts &

    which basically means,

    "if tcpser is not found among the list of running programs, run it again"


    That rocks too. "100 ways to skin a cat" as they say. I still personally prefer
    such things to be a service and let OS all takes care of itself without the hacking of the rc. But it's fun hacking around with the stuff, that's for sure.
    There's probably
    another 10 ways out there to do it. If they're centralized here then they're easy to find all in one spot :) If there's other ways, share 'em.

    Cheers,
    c

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From 6502enhanced@gmail.com@3:770/3 to All on Thu Jun 29 10:43:38 2017
    Great! I typed that also in - why not a second door to make tcpser run if it stops.
    Thanks a lot!

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From 6502enhanced@gmail.com@3:770/3 to All on Wed Jul 5 06:51:52 2017
    OK - the problem is not solved so far ...

    Tcpser run now for a few days well.

    Then it stopped again.

    I typed:ps x |grep -v grep |grep -c "tcpser"

    The result was: 0

    Tcpser was also not started by CRON after a few minutes ...

    Then I typed: ./startSerial

    Tcpser started. At the moment it is running, but I don't know why it is not startet by CRON automatically, because the script seems to work good...?

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From mark lewis@1:3634/12.73 to 6502enhanced@gmail.com on Wed Jul 5 10:54:32 2017

    On 2017 Jul 05 06:51:52, you wrote to All:

    Tcpser was also not started by CRON after a few minutes ...

    Then I typed: ./startSerial

    Tcpser started. At the moment it is running, but I don't know why it is
    not
    startet by CRON automatically, because the script seems to work good...?

    where, exactly, is your script?
    what, exactly, is your cron entry?

    )\/(ark

    Always Mount a Scratch Monkey
    Do you manage your own servers? If you are not running an IDS/IPS yer doin' it wrong...
    ... The four seasons: onions, celery, bell pepper, and garlic.
    ---
    * Origin: (1:3634/12.73)
  • From Janne Johansson@2:221/6 to mark lewis on Wed Jul 5 18:15:50 2017
    On 2017-07-05 16:54, mark lewis : 6502enhanced@gmail.com wrote:

    Tcpser was also not started by CRON after a few minutes ...

    Then I typed: ./startSerial

    Tcpser started. At the moment it is running, but I don't know why
    it is not
    startet by CRON automatically, because the script seems to work
    good...?

    where, exactly, is your script?
    what, exactly, is your cron entry?

    A common "problem" is that cron is run with a conservative PATH env.
    variable, so it will not find the same commands as you do when you have
    logged in interactively, so giving full path to stuff in /usr/local or
    placed otherwise in "strange" locations (basically anything except /bin,/sbin,/usr/bin,/usr/sbin) is more or less a must for cron jobs.

    ---
    * Origin: *** nntp://fidonews.mine.nu *** Finland *** (2:221/6.0)
  • From 6502enhanced@gmail.com@3:770/3 to All on Wed Jul 5 10:23:20 2017
    "Where, exactly, is your script?"

    - well, I don't know. How can I find that out?

    "What, exactly, is your cron entry?"

    - At the bash I typed: "crontab -e"
    - then I selected "nano" as editor
    - then I typed into the last line:" */1 * * * * /home/pi/startSerial"
    - then I pressed:"<CTRL-X>"
    - then "Y"
    - then "Return"

    --------------------
    "so giving full path to stuff in /usr/local or
    placed otherwise in "strange" locations (basically anything except /bin,/sbin,/usr/bin,/usr/sbin) is more or less a must for cron jobs."

    You mean it should be saved in /usr/local ? How can I save it there? As described above, nano offers just to save it with "<CTRL-X>".

    Thanks for your help!

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Dropnine@3:770/3 to 6502en...@gmail.com on Wed Jul 5 12:35:44 2017
    On Wednesday, July 5, 2017 at 11:23:22 AM UTC-6, 6502en...@gmail.com wrote:
    "Where, exactly, is your script?"

    - well, I don't know. How can I find that out?

    "What, exactly, is your cron entry?"

    - At the bash I typed: "crontab -e"
    - then I selected "nano" as editor
    - then I typed into the last line:" */1 * * * * /home/pi/startSerial"
    - then I pressed:"<CTRL-X>"
    - then "Y"
    - then "Return"

    --------------------
    "so giving full path to stuff in /usr/local or
    placed otherwise in "strange" locations (basically anything except /bin,/sbin,/usr/bin,/usr/sbin) is more or less a must for cron jobs."

    You mean it should be saved in /usr/local ? How can I save it there? As
    described above, nano offers just to save it with "<CTRL-X>".

    Thanks for your help!

    The /home/pi/startSerial you've entered explicitly tells cron to run the startSerial script in the /home/pi directory. there is nothing else it will try or guess. That script obviously works fine as when you run it manually, it
    works. So your
    attention should be on the CRON job. That line may not be proper and you might
    want to copy the line from the text and then copy it into the editor then save it the file. That is a guess at this point. Ther eis no need to copy that script anywhere
    else.

    CRON does have a log file, but you need to turn it on. the log file is placed in the /var/logs directory under the name cron. you can inspect that file and then you will know what the issue is. The info to turn on the cron log is at the end of the
    document.

    *When running against a timer, it is best to use CRON, always, not an endless loop in a script -- that is very bad practice as scripts are meant to run and then stop and then they are envoked again when needed.

    * I will make an image of my pi's sd and you can just write that to your flash card and just get it done. I am teaching this evenning so I might not be able to get to it until tomorrow if that's OK. It will be located in the shared folder and
    publically avalaible.

    Best of luck :)
    Cheers,
    c

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Andreas Kohlbach@3:770/3 to 6502enhanced@gmail.com on Wed Jul 5 17:29:06 2017
    On Wed, 5 Jul 2017 06:51:53 -0700 (PDT), 6502enhanced@gmail.com wrote:

    OK - the problem is not solved so far ...

    Tcpser run now for a few days well.

    Then it stopped again.

    I typed:ps x |grep -v grep |grep -c "tcpser"

    The result was: 0

    May be it "forked" into something else?

    Tcpser was also not started by CRON after a few minutes ...

    Do other jobs start in this cron table? Might be a typo or wrong
    permission in it?

    Then I typed: ./startSerial

    Tcpser started. At the moment it is running, but I don't know why it
    is not startet by CRON automatically, because the script seems to work good...?

    Doesn't tcpser listen on a port? If it was still running (under a
    different name, why ever that may have happened) the port already in use.

    May be next time it seems to have stopped also test if the port it runs
    on is still used. Something like

    lsof -i :1234 (< replace by actual port)
    --
    Andreas
    You know you are a redneck if
    you own a homemade fur coat.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From 6502enhanced@gmail.com@3:770/3 to All on Thu Jul 6 01:29:46 2017
    "I will make an image of my pi's sd and you can just write that to your flash card and just get it done. I am teaching this evenning so I might not be able to get to it until tomorrow if that's OK. It will be located in the shared folder and publically
    avalaible"

    That would be great! Thanks a lot! (Where is the shared folder?)

    "Do other jobs start in this cron table? Might be a typo or wrong
    permission in it?"

    So far as I see there are no other jobs in that cron table.
    I will compare Dropnine's with mine or write that to my card.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Jimmy Mac@3:770/3 to All on Thu Mar 23 18:00:42 2017
    Hi all,

    I've struggled to find much in the way of solid documentation on how to get tcpser to autostart on the Raspberry Pi. Anyone have a quick easy solution?
    I blame my 30 years of Microsoft on my Linux ignorance but I'm evolving :-)

    Trying to resurrect (rebuild) a C46 BBS. No problems getting tcpser to work from ssh or local terminal, just can't get any of the examples I've read about to work on the Pi.

    TIA!

    Jim..

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Andreas Kohlbach@3:770/3 to Jimmy Mac on Fri Mar 24 14:48:16 2017
    On Thu, 23 Mar 2017 18:00:42 -0700 (PDT), Jimmy Mac wrote:

    I've struggled to find much in the way of solid documentation on how
    to get tcpser to autostart on the Raspberry Pi.

    Why? Does your BBS need this?

    Anyone have a quick easy solution? I blame my 30 years of Microsoft on
    my Linux ignorance but I'm evolving :-)

    I never had any Raspberrys Linuxes but most Linux distributions know
    "service", or when they have systemd also "systemctrl".

    Try something like

    service tcpser enable

    as root. That might take care of having it started on each boot from then
    on.

    The name might be different to tcpser thought. Have a look into
    /etc/init.d/ for possible candidates.

    ls /etc/init.d/
    --
    Andreas
    You know you are a redneck if
    you had to remove a toothpick for wedding pictures.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Drew Klenotic@1:2215/1701 to Jimmy Mac on Fri Mar 24 22:45:48 2017
    On 23 Mar 17 18:00:42 Jimmy Mac wrote...

    Hi all,

    I've struggled to find much in the way of solid documentation on how
    to get tcpser to autostart on the Raspberry Pi. Anyone have a quick
    easy solution? I blame my 30 years of Microsoft on my Linux ignorance
    but I'm evolving :-)

    Trying to resurrect (rebuild) a C46 BBS. No problems getting tcpser
    to work from ssh or local terminal, just can't get any of the
    examples I've read about to work on the Pi.

    TIA!

    Jim..

    --- SoupGate-Win32 v1.05 * Origin: Agency HUB, Dunedin - New Zealand
    | Fido<>Usenet Gateway (3:770/3)

    To which Drew Klenotic replies...

    Why re-invent the wheel? http://www.particles.org/particlesbbs/ is a
    C128 BBS on "the net". This guy is probably one of the best examples of
    a great old school retro BBS. He literally has more activity in a day
    than I have in weeks. He's the guy we're all wishing we were.

    Check in with him. I'm sure he'd be happy to help. If not, I'd be happy
    to help (I'm an Atari guy, but the basic principles are the same).

    Also on Facebook. https://www.facebook.com/particlesbbs/

    --- RATSoft/FIDO v09.14.95 [JetMail 1.01]
    * Origin: STar Fleet HQ - Atari BBS Running RatSoft ST! bbs.sfhqbbs.org:5983 (1:2215/1701.0)
  • From CBMGuy@3:770/3 to CBMGuy on Thu Mar 30 08:36:10 2017
    On Thursday, March 30, 2017 at 9:33:46 AM UTC-6, CBMGuy wrote:
    On Thursday, March 23, 2017 at 7:00:43 PM UTC-6, Jimmy Mac wrote:
    Hi all,

    I've struggled to find much in the way of solid documentation on how to get
    tcpser to autostart on the Raspberry Pi. Anyone have a quick easy solution?


    Hey there. I just did this for an old Atari STe I fixed and wanted to BBS.
    I have an old Raspberry Pi Model B and a MAX232 serial 9pin for the PI (it's about $1.50 for the MAX232 from ebay--I have a number of these already which is
    why I used them
    for the project). I hooked the Pi up to the Pi's GPIO port. The only issue with this setup is that the Pi monitors that port for remote logins and yo need
    to disable that function. You can use raspi-config to change those settings. If you are using a
    USB to serial adaptor, you can skip this and hop down to the automated service in LINUX section below.

    To turn the GPIO header for serial:

    Type at the bash: sudo raspi-config

    Selected option 5 from the menu, then selected Serial from that menu. Choose
    No to the login shell over serial. Then yes to enabling the serial port hardware. exit out of the tool and back to the bash.

    Physical connections from the Max232 to the PI GPIO:

    MAX232 Pi GPOI
    Vcc 3.3V pin 2
    GND GND pin 6
    Tx Rx pin 10
    Rx Tx pin 8

    Setting up to automate tcpser on boot:

    Create a text file (I just put it in the home directory) and make it
    executable. At the bash:

    type: cd <Enter>
    type: vi serialBridge <Enter>
    type: i
    type: #!/bin/sh <Enter>
    type: tcpser -s 19200 -d /dev/ttyAMA0 &
    type <Esc>:wq <Enter>

    you're now out of the editor and back at the bash.

    type: chmod +x serialBridge

    that will make the file executable (like a batch file in DOS). Change the
    19200 baud rate to whatever you need it to be.

    You need to create another text file that instructs LINUX a service is
    available. To do that, we create another text file in a very specific spot and then issue some commands to tell LINUX to use it when it's booting. to do that:

    type: vi /lib/systemd/system/serialBridge.service <Enter>
    type: i

    copy and paste everything between the # marks into the editor:

    ####################
    [Unit]
    Description=Serial to TCP-IP Bridge
    After=Multi-User.target

    [Install]
    WantedBy=Multi-user.target

    [Service]
    ExecStart=/home/pi/serialBridge
    type=forked
    #####################

    You're still in the editor:
    type: <Esc>:wq <Enter>

    You will now be out of the editor and at the bash prompt.

    type: sudo systemctl enable serialBridge.service
    type: sudo systemctl start serialBridge.service
    type: sudo systemctl status serialBridge.service

    The first command will instruct LINUX the service should be enabled at boot
    (level 3). The second command will tell LINUX to start the service right now.
    The third command will just display the status of the service we just started with the previous
    command.

    Run a terminal, turn flow control off, set the baud rate proper and "ATDT
    dnsName:port" in the term and you're good to go. Enjoy :)

    *If you have any problems, please let me know and I'll be glad to help. I
    have the pictures and such on my facebook page blogging the project I just did.


    One thing I'd like to note is that I thought tcpser, by default, used RTS/CTS
    flow control. I had to disable the flow control on the Atari before any data came through... I'm not sure if this is due to the buggy serial port or just something I have
    overlooked.... Just a head's up in case you do not see anything going through.

    Cheers,
    Carl

    I forgot to mention that if you are using an USB to Serial adaptor, Everything is the same in the LINUX setup except the tcpser device would be ttyUSB0. not ttyAMA0. Sorry for missing that info.

    Cheers,
    Carl

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From CBMGuy@3:770/3 to Jimmy Mac on Thu Mar 30 08:33:44 2017
    On Thursday, March 23, 2017 at 7:00:43 PM UTC-6, Jimmy Mac wrote:
    Hi all,

    I've struggled to find much in the way of solid documentation on how to get
    tcpser to autostart on the Raspberry Pi. Anyone have a quick easy solution?


    Hey there. I just did this for an old Atari STe I fixed and wanted to BBS. I have an old Raspberry Pi Model B and a MAX232 serial 9pin for the PI (it's about $1.50 for the MAX232 from ebay--I have a number of these already which is
    why I used them for
    the project). I hooked the Pi up to the Pi's GPIO port. The only issue with this setup is that the Pi monitors that port for remote logins and yo need to disable that function. You can use raspi-config to change those settings. If you are using a USB
    to serial adaptor, you can skip this and hop down to the automated service in LINUX section below.

    To turn the GPIO header for serial:

    Type at the bash: sudo raspi-config

    Selected option 5 from the menu, then selected Serial from that menu. Choose No
    to the login shell over serial. Then yes to enabling the serial port hardware.
    exit out of the tool and back to the bash.

    Physical connections from the Max232 to the PI GPIO:

    MAX232 Pi GPOI
    Vcc 3.3V pin 2
    GND GND pin 6
    Tx Rx pin 10
    Rx Tx pin 8

    Setting up to automate tcpser on boot:

    Create a text file (I just put it in the home directory) and make it executable. At the bash:

    type: cd <Enter>
    type: vi serialBridge <Enter>
    type: i
    type: #!/bin/sh <Enter>
    type: tcpser -s 19200 -d /dev/ttyAMA0 &
    type <Esc>:wq <Enter>

    you're now out of the editor and back at the bash.

    type: chmod +x serialBridge

    that will make the file executable (like a batch file in DOS). Change the 19200
    baud rate to whatever you need it to be.

    You need to create another text file that instructs LINUX a service is available. To do that, we create another text file in a very specific spot and then issue some commands to tell LINUX to use it when it's booting. to do that:

    type: vi /lib/systemd/system/serialBridge.service <Enter>
    type: i

    copy and paste everything between the # marks into the editor:

    ####################
    [Unit]
    Description=Serial to TCP-IP Bridge
    After=Multi-User.target

    [Install]
    WantedBy=Multi-user.target

    [Service]
    ExecStart=/home/pi/serialBridge
    type=forked
    #####################

    You're still in the editor:
    type: <Esc>:wq <Enter>

    You will now be out of the editor and at the bash prompt.

    type: sudo systemctl enable serialBridge.service
    type: sudo systemctl start serialBridge.service
    type: sudo systemctl status serialBridge.service

    The first command will instruct LINUX the service should be enabled at boot (level 3). The second command will tell LINUX to start the service right now.
    The third command will just display the status of the service we just started with the previous
    command.

    Run a terminal, turn flow control off, set the baud rate proper and "ATDT dnsName:port" in the term and you're good to go. Enjoy :)

    *If you have any problems, please let me know and I'll be glad to help. I have
    the pictures and such on my facebook page blogging the project I just did.

    One thing I'd like to note is that I thought tcpser, by default, used RTS/CTS flow control. I had to disable the flow control on the Atari before any data came through... I'm not sure if this is due to the buggy serial port or just something I have
    overlooked.... Just a head's up in case you do not see anything going through.

    Cheers,
    Carl

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From CBMGuy@3:770/3 to CBMGuy on Thu Mar 30 09:50:48 2017
    On Thursday, March 30, 2017 at 9:33:46 AM UTC-6, CBMGuy wrote:
    On Thursday, March 23, 2017 at 7:00:43 PM UTC-6, Jimmy Mac wrote:
    Hi all,

    I've struggled to find much in the way of solid documentation on how to get
    tcpser to autostart on the Raspberry Pi. Anyone have a quick easy solution?


    Hey there. I just did this for an old Atari STe I fixed and wanted to BBS.
    I have an old Raspberry Pi Model B and a MAX232 serial 9pin for the PI (it's about $1.50 for the MAX232 from ebay--I have a number of these already which is
    why I used them
    for the project). I hooked the Pi up to the Pi's GPIO port. The only issue with this setup is that the Pi monitors that port for remote logins and yo need
    to disable that function. You can use raspi-config to change those settings. If you are using a
    USB to serial adaptor, you can skip this and hop down to the automated service in LINUX section below.

    To turn the GPIO header for serial:

    Type at the bash: sudo raspi-config

    Selected option 5 from the menu, then selected Serial from that menu. Choose
    No to the login shell over serial. Then yes to enabling the serial port hardware. exit out of the tool and back to the bash.

    Physical connections from the Max232 to the PI GPIO:

    MAX232 Pi GPOI
    Vcc 3.3V pin 2
    GND GND pin 6
    Tx Rx pin 10
    Rx Tx pin 8

    Setting up to automate tcpser on boot:

    Create a text file (I just put it in the home directory) and make it
    executable. At the bash:

    type: cd <Enter>
    type: vi serialBridge <Enter>
    type: i
    type: #!/bin/sh <Enter>
    type: tcpser -s 19200 -d /dev/ttyAMA0 &
    type <Esc>:wq <Enter>

    you're now out of the editor and back at the bash.

    type: chmod +x serialBridge

    that will make the file executable (like a batch file in DOS). Change the
    19200 baud rate to whatever you need it to be.

    You need to create another text file that instructs LINUX a service is
    available. To do that, we create another text file in a very specific spot and then issue some commands to tell LINUX to use it when it's booting. to do that:

    type: vi /lib/systemd/system/serialBridge.service <Enter>
    type: i

    copy and paste everything between the # marks into the editor:

    ####################
    [Unit]
    Description=Serial to TCP-IP Bridge
    After=Multi-User.target

    [Install]
    WantedBy=Multi-user.target

    [Service]
    ExecStart=/home/pi/serialBridge
    type=forked
    #####################

    You're still in the editor:
    type: <Esc>:wq <Enter>

    You will now be out of the editor and at the bash prompt.

    type: sudo systemctl enable serialBridge.service
    type: sudo systemctl start serialBridge.service
    type: sudo systemctl status serialBridge.service

    The first command will instruct LINUX the service should be enabled at boot
    (level 3). The second command will tell LINUX to start the service right now.
    The third command will just display the status of the service we just started with the previous
    command.

    Run a terminal, turn flow control off, set the baud rate proper and "ATDT
    dnsName:port" in the term and you're good to go. Enjoy :)

    *If you have any problems, please let me know and I'll be glad to help. I
    have the pictures and such on my facebook page blogging the project I just did.


    One thing I'd like to note is that I thought tcpser, by default, used RTS/CTS
    flow control. I had to disable the flow control on the Atari before any data came through... I'm not sure if this is due to the buggy serial port or just something I have
    overlooked.... Just a head's up in case you do not see anything going through.

    Cheers,
    Carl

    SOB. I missed one thing that will bugger you up creating the .service file. you need to be root and I forgot the sudo prefix in the step... Enter sudo vi /lib/systemd/system/serialBridge.service <Enter>

    sorry for the snafu... I'm really buggering this up. My memory seems to be pretty buggy lately. If it means anything, I've taken my break at work to create a proper text file and also included a wireless WIFI setup to make it free of the extra cabling.
    Let me know if you would like that doc.

    Cheers,
    carl

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Jimmy Mac@3:770/3 to Andreas Kohlbach on Thu Mar 30 11:19:40 2017
    On Friday, March 24, 2017 at 11:48:33 AM UTC-7, Andreas Kohlbach wrote:
    On Thu, 23 Mar 2017 18:00:42 -0700 (PDT), Jimmy Mac wrote:

    I've struggled to find much in the way of solid documentation on how
    to get tcpser to autostart on the Raspberry Pi.

    Why? Does your BBS need this?

    Yep. Going old-school with a physical Commodore C64. Thanks for the tips.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Jimmy Mac@3:770/3 to Jimmy Mac on Thu Mar 30 11:17:38 2017
    On Thursday, March 23, 2017 at 6:00:43 PM UTC-7, Jimmy Mac wrote:
    Hi all,

    I've struggled to find much in the way of solid documentation on how to get
    tcpser to autostart on the Raspberry Pi. Anyone have a quick easy solution?
    I blame my 30 years of Microsoft on my Linux ignorance but I'm evolving :-)

    Trying to resurrect (rebuild) a C46 BBS. No problems getting tcpser to work
    from ssh or local terminal, just can't get any of the examples I've read about to work on the Pi.

    TIA!

    Jim..

    Carl! You ROCK! I hadn't even considered the MAX232 method. I've been using a
    serial to USB cable and a Commodore 1011 RS-232 cart. No worries on root. I would have done that anyway. Many thanks!

    I may just have to break down and try this with the Max232 with a new Pi Zero W. Nice small package.

    J..

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From CBMGuy@3:770/3 to Jimmy Mac on Thu Mar 30 11:44:56 2017
    On Thursday, March 30, 2017 at 12:17:40 PM UTC-6, Jimmy Mac wrote:
    On Thursday, March 23, 2017 at 6:00:43 PM UTC-7, Jimmy Mac wrote:
    Hi all,

    I've struggled to find much in the way of solid documentation on how to get
    tcpser to autostart on the Raspberry Pi. Anyone have a quick easy solution?
    I blame my 30 years of Microsoft on my Linux ignorance but I'm evolving :-)

    Trying to resurrect (rebuild) a C46 BBS. No problems getting tcpser to work
    from ssh or local terminal, just can't get any of the examples I've read about to work on the Pi.

    TIA!

    Jim..

    Carl! You ROCK! I hadn't even considered the MAX232 method. I've been using
    a serial to USB cable and a Commodore 1011 RS-232 cart. No worries on root. I would have done that anyway. Many thanks!

    I may just have to break down and try this with the Max232 with a new Pi Zero
    W. Nice small package.

    J..

    If you use the Zero with a headless Raspbian, than it will work perfectly; fast, responsive, and boot quickly. I used an older 2011 Model B (which is practically the same as the Zero) with the above project and it works great.

    If you would rather have the more thought out text file I wrote, then let me know and I'll post it or send it or whatever... It's bothering me so I probably will just repost the complete and corrected instructions here... It make much more sense than
    the semi-babble-blog instructions above.

    Worth noting, the MAX232 will work every time. The USB to Serial adapters are not all the same and many work while many other adapters will not... It's worth spending the $1.50 on a MAX232 and just get it done without the headaches.

    Cheers,
    Carl

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Jimmy Mac@3:770/3 to Drew Klenotic on Thu Mar 30 11:21:50 2017
    On Saturday, March 25, 2017 at 2:23:05 AM UTC-7, Drew Klenotic wrote:


    Why re-invent the wheel? http://www.particles.org/particlesbbs/ is a
    C128 BBS on "the net". This guy is probably one of the best examples of
    a great old school retro BBS. He literally has more activity in a day
    than I have in weeks. He's the guy we're all wishing we were.

    Check in with him. I'm sure he'd be happy to help. If not, I'd be happy
    to help (I'm an Atari guy, but the basic principles are the same).

    Also on Facebook. https://www.facebook.com/particlesbbs/

    Not really trying to re-invent, more like adding a Buggy hub & spoke wheel on a
    VW :-)

    I haven't called Particles yet but will certainly do so in the future.
    J..

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From CBMGuy@1:154/30 to All on Thu Mar 30 11:48:32 2017
    Ya, the previous post is bugging the hecj out of me and I really don't want ppl
    to be frustrated if they follow it. Here's a more easy to follow procedure without the missing parts. It also includes a wifi part that will help in making a wifi Pi easier
    to setup, as well.

    Sorry for the double posting and such... Such an 80's thing to do!




    Emulating a serial modem on a Raspberry Pi
    C. Reilly 30MARCH2017

    This quick little project will provide a serial to tcp/ip bridge for a Raspberry Pi LINUX using tcpser and a MAX232 (or a USB to Serial adaptor). TCPSER will emulate the important Hayes commands needed to connect to telnet BBSs.

    It's a great way to BBS again. Can be used from the UserPort or a swiftlink/turbo 232 and even stand up a Q-Link server and connect to it with real hardware.

    TOC
    ---
    Manditory Step - Setting up the environment properly
    Step 1 - Connecting the MAX232 (if you are using a USB to Serial adaptor, skip this step)
    Step 2 - Automating tcpser to start when booting the Pi
    Step 3 - Setting up a wireless Pi connection without a GUI
    ---


    Manditory Step - Setting up the environment
    ---
    First, install Raspbian onto your Pi. I use a headless version of raspbian LINUX making it pretty light weight, fast booting and responsive. Connect an active ethernet cable and make sure you have a network connection.

    Default Username: pi
    Default password: raspberry



    Second, note the IP address of your Pi. This is used to access the Pi for programming and maintenance. I use my router to provide the IP address and from there, I use PuTTY to telnet into the Pi to perform the rest of these instructions.

    If you cannot find the IP address, connect a keyboard and a monitor to the Pi and once it's booted, logon using the default username and password to get to a bash.

    Type: if
  • From Dropnine@3:770/3 to All on Thu Apr 6 17:43:34 2017
    On Thursday, March 30, 2017 at 12:48:34 PM UTC-6, Dropnine wrote:

    I was asked to correct a part that will stop you from automating tcpser on boot. The error is in the type portion of the serialBridge.service text file.

    It should be Type=forking. If it's anything else, LINUX will end the thread because it considers the script to have run and maintain its own PID.

    Sorry for the error. The serialBridge.service file should look like below.

    Edit your original or just type "rm /lib/systemd/systemserialBridge.service" to
    remove the old file and remake it by doing the following:

    type: sudo vi /lib/systemd/system/serialBridge.service <Enter>
    type: i

    Copy and paste everything between the # mark lines into the editor (or type it in if you are a better typer than myself):

    ####################
    [Unit]
    Description=Serial to TCP-IP Bridge
    After=Multi-User.target

    [Install]
    WantedBy=Multi-user.target

    [Service]
    ExecStart=/home/pi/serialBridge
    Type=forking
    #####################


    .... Cheers

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Dropnine@3:770/3 to Dropnine on Thu Apr 6 18:31:32 2017
    On Thursday, April 6, 2017 at 6:43:36 PM UTC-6, Dropnine wrote:
    On Thursday, March 30, 2017 at 12:48:34 PM UTC-6, Dropnine wrote:

    I was asked to correct a part that will stop you from automating tcpser on
    boot. The error is in the type portion of the serialBridge.service text file.

    It should be Type=forking. If it's anything else, LINUX will end the thread
    because it considers the script to have run and maintain its own PID.

    Sorry for the error. The serialBridge.service file should look like below.

    Edit your original or just type "rm /lib/systemd/systemserialBridge.service"
    to remove the old file and remake it by doing the following:

    type: sudo vi /lib/systemd/system/serialBridge.service <Enter>
    type: i

    Copy and paste everything between the # mark lines into the editor (or type
    it in if you are a better typer than myself):

    ####################
    [Unit]
    Description=Serial to TCP-IP Bridge
    After=Multi-User.target

    [Install]
    WantedBy=Multi-user.target

    [Service]
    ExecStart=/home/pi/serialBridge
    Type=forking
    #####################


    .... Cheers

    And... if you're still having an issue, add: Restart=on-abort
    after the Type=forking entry.

    If you are using a stand-alone lite raspian on your pi, editing the /etc/rc.local file and putting the the tcpser command before the "exit 0" line will also accomplish the autostart on boot. The rc.local file is read-only so you'll need to change the
    permissions.

    Seems to be a few flavours of raspian out there or something is going bonkers... Many ways to do an autoboot, as you can see.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Dropnine@1:154/30 to All on Fri Apr 7 08:20:22 2017
    Step 2 - Making TCPSer a service that boots with the Pi
    ---
    (Edit 5APR2017:
    - corrected the .service file contents
    - added file permissions to allow tcpser to execute and stay resident at boot )

    So I had a number of pm's stating that their Pi's were not working with the instructions. the service would start manually, but not autostart. This worked fine with my old version of noobs, however I did notice that the latest raspian lite img was,
    indeed breaking with the previous instructions. The target I set out from in the beginning is to have tcpser run as a *service*. This gives the OS much more flexibility and is not a hack.

    I was asked to explain, why make it into a service. There are a number of reasons, but in short, a service is meant to continue on in the event of an error and not stop. The error is directed to a log and you can inspect the status at a level which is
    approachable. We can check the status of the service with a -l command and it will give us direct info of the error that accurred and we can investigate and correct the err
  • From Jimmy Mac@3:770/3 to Dropnine on Wed Apr 12 13:35:12 2017
    On Friday, April 7, 2017 at 8:20:23 AM UTC-7, Dropnine wrote:
    Step 2 - Making TCPSer a service that boots with the Pi

    Thank you!!

    I really appreciate the detailed steps.

    Jim..

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From 6502enhanced@gmail.com@3:770/3 to All on Sat Jun 10 23:13:16 2017
    Hi,

    I do have a similar problem with tcpser and the Raspberry PI.

    Excuse - it is about a connection between the PI and an Apple II :-) ... hope that's also ok here.

    The problem is that tcpser works, but after about 10-20 hours it shuts down. The Terminal Window is still open and I can start it again. Then it is working all right but the same shutdown again after the same time?

    My setup:

    Raspberry PI 2 Model B
    Debian
    Raspberry WiFi Stick
    USB to serial adapter (USB0)
    tcpser
    Apple II connected to serial adapter

    I installed tcpser with:

    sudo apt-get install tcpser

    Started tcpser with:

    tcpser -s 2400 -d /dev/ttyUSB0 -p 6502 -ts -B /scripts/busy.txt -N /scripts/offline.txt

    As said, tcpser is running well, I can telnet to my Apple II - everything works
    fine. But after a few hours the connection in the Terminal Window is shut down.
    I start it again - working fine - after a few hours the same?

    Thanks for any help!

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Andreas Kohlbach@3:770/3 to 6502enhanced@gmail.com on Sun Jun 11 15:40:46 2017
    On Sat, 10 Jun 2017 23:13:16 -0700 (PDT), 6502enhanced@gmail.com wrote:

    I do have a similar problem with tcpser and the Raspberry PI.

    Excuse - it is about a connection between the PI and an Apple II :-) ... hope
    that's also ok here.

    The problem is that tcpser works, but after about 10-20 hours it shuts
    down. The Terminal Window is still open and I can start it again. Then
    it is working all right but the same shutdown again after the same
    time?

    My setup:

    Raspberry PI 2 Model B
    Debian
    Raspberry WiFi Stick
    USB to serial adapter (USB0)
    tcpser
    Apple II connected to serial adapter

    I installed tcpser with:

    sudo apt-get install tcpser

    Started tcpser with:

    tcpser -s 2400 -d /dev/ttyUSB0 -p 6502 -ts -B /scripts/busy.txt -N
    /scripts/offline.txt

    As said, tcpser is running well, I can telnet to my Apple II -
    everything works fine. But after a few hours the connection in the
    Terminal Window is shut down. I start it again - working fine - after
    a few hours the same?

    Is there a (error) message in the terminal?

    If not you could also add "-l 7" which puts out maximal logging messages.
    --
    Andreas
    You know you are a redneck if
    there are more fish on your wall than pictures.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From 6502enhanced@gmail.com@3:770/3 to All on Sun Jun 11 23:15:10 2017
    Thanks for your help!

    No, I get no error message.

    I tried to put in -I 7 (tcpser -s 2400 -d /dev/ttyUSB0 -p 6359 -ts -I 7 -B /scripts/busy.txt -N /scripts/offline.txt) - but this leads to another problem:
    if I try to connect with telnet, the connection to the Apple II is made but closed immediately ...

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From mark lewis@1:3634/12.73 to 6502enhanced@gmail.com on Mon Jun 12 04:16:26 2017

    On 2017 Jun 11 23:15:10, you wrote to All:

    I tried to put in -I 7

    ummm... that should be a lowercase ell... ell for logging ;)

    )\/(ark

    Always Mount a Scratch Monkey
    Do you manage your own servers? If you are not running an IDS/IPS yer doin' it wrong...
    ... We are ready for an unforeseen event that may or may not occur.
    ---
    * Origin: (1:3634/12.73)
  • From 6502enhanced@gmail.com@3:770/3 to All on Mon Jun 12 01:45:02 2017
    Ohh, thanks!

    OK that started working good - let's see how long it will last ...

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Andreas Kohlbach@3:770/3 to 6502enhanced@gmail.com on Mon Jun 12 18:17:00 2017
    On Mon, 12 Jun 2017 01:45:03 -0700 (PDT), 6502enhanced@gmail.com wrote:

    Ohh, thanks!

    OK that started working good - let's see how long it will last ...

    The "l" (ell) doesn't remove the problem. It will just creates some huge
    debug messages, probably telling you why it terminated.
    --
    Andreas
    You know you are a redneck if
    the fifth grade is referred to as "your senior year."

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From 6502enhanced@gmail.com@3:770/3 to All on Tue Jun 20 00:45:02 2017
    Today I had another stop of tcpser. So it ran now for 8 days without problems.

    I don't know why it stopped.

    Has anyone an explanation or a hint what I can do?

    Here is a pic of the monitor when tcpser stopped:

    https://s22.postimg.org/ar4ayh2zl/PI_Hayes.jpg

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Dropnine@3:770/3 to 6502en...@gmail.com on Tue Jun 20 12:52:32 2017
    On Tuesday, June 20, 2017 at 1:45:03 AM UTC-6, 6502en...@gmail.com wrote:
    Today I had another stop of tcpser. So it ran now for 8 days without
    problems.

    I don't know why it stopped.

    Has anyone an explanation or a hint what I can do?

    Here is a pic of the monitor when tcpser stopped:

    https://s22.postimg.org/ar4ayh2zl/PI_Hayes.jpg

    Just looked at the pic (making that other reply probably repetitive lol sorry) Looks like the socket disappeared. Perhaps there's another service running that
    is stealing the device or perhaps tcpser is just a little buggy... My two cents.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Dropnine@3:770/3 to 6502en...@gmail.com on Tue Jun 20 12:56:30 2017
    On Tuesday, June 20, 2017 at 1:45:03 AM UTC-6, 6502en...@gmail.com wrote:
    Today I had another stop of tcpser. So it ran now for 8 days without
    problems.

    I don't know why it stopped.

    Has anyone an explanation or a hint what I can do?

    Here is a pic of the monitor when tcpser stopped:

    https://s22.postimg.org/ar4ayh2zl/PI_Hayes.jpg

    As a hardware solution, how is the pi being powered? From a USB port or from a walled 5V 1A transformer? What is the serial device being used, GPIO or USB to
    serial?

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Dropnine@3:770/3 to All on Tue Jun 20 12:47:38 2017
    On a linux flavour of tcpser:

    What log level do you tcpser running at? And is it tracing? Turning logging to
    verbose/debug (-l 7) and trace some things with the -tis. Force tcpser to dump
    its output to a file with > output.txt

    ie:
    tcpser -d /dev/ttyS0 -s 38400 -l 7 -tsSiI > output.txt

    You might need to add &1>2 to the end of out output.txt (not too sure since I don't have access to my stuff atm).

    Let it run and when it fails, check the output.txt for what happened.

    You can also tail the tcpser and see the info as tcpser is running in realtime.

    Cheers,
    c

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From 6502enhanced@gmail.com@3:770/3 to All on Tue Jun 20 23:09:34 2017
    Thanks for the help!

    The PI is being powered by a 5V 1A transformer.

    It is connected via a USB to serial adapter to the serial port of a Apple IIe.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Dropnine@3:770/3 to All on Sun Jul 9 19:19:28 2017
    Sorry for the wait, building a garage and teaching is taking quite a slice of my time.

    I've included an image for the Pi that will start it on boot and monitor tcpser; in case of a crash it will restart the tcpser application.

    You can retrieve the image and documentation here:

    https://drive.google.com/drive/folders/0B7Y4Lsah28nCem54WnBWYkZ5LTQ

    I've tested the image and it works fine. I took it from my B+ 2011 Pi.

    Cheers,
    c

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From 6502enhanced@gmail.com@3:770/3 to All on Mon Jul 10 03:38:00 2017
    Thanks a lot! I'll try that.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Dropnine@3:770/3 to 6502en...@gmail.com on Fri Jul 14 21:10:12 2017
    On Monday, 10 July 2017 04:38:02 UTC-6, 6502en...@gmail.com wrote:
    Thanks a lot! I'll try that.

    A new image is available. It contains commands to set the serial and a possible
    wifi connection, as well. setSerial will define the tcp to serial bridge and restart tcpser with the new values. setWifi will setup a WPA encrypted connection if you happen
    to have a wifi or a USB Wifi on your Pi. If the commands are issued without parameters, they will display a how to use.

    It's still not completely fool proof, but it will help those who do not want to
    edit or possibly messing up their image.

    Cheers,
    c

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)