home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.sys.cbm      Discussion about Commodore micros      53,866 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 51,990 of 53,866   
   6502enhanced@gmail.com to All   
   Re: Using tcpser on a Pi for telnet gate   
   23 Jun 17 01:55:54   
   
   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   
   „modem“. So the BBS is reachable via telnet.    
      
   I do have a WiFi232 - great tool - I use it to „dial-up“ other BBS with a   
   Apple II+. But I don’t 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 …   
      
   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    
       tcpser -s 2400 -d /dev/ttyUSB0 &    
   ************    
      
   2.)   
   now save and quit the editor by:    
   Press the  key    
   type: :wq    
      
   3.)    
   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 .    
      
   4.)   
   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   
   , then Y and finally your  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.    
      
   ———————   
      
   Where do I have to put the mentioned:   
      
   a little trick to avoid seeing the "grep" line in the output...    
      
     ps -ef | grep [t]cpser    
      
   in?   
      
      
   Thanks!   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca