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,918 of 53,866    |
|    Dropnine to All    |
|    Re: Using tcpser on a Pi for telnet gate    |
|    07 Apr 17 08:20:22    |
      From: dropnine@gmail.com              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 error, etc. quickly--which is always the case in my job. It's       just a good habit and        best practice to get into so that it is much less frustrating.               ** You can hack the rc.local file and enter the tcpser command into that to       make it autoboot -- make sure you include the & at the end of the command or       you'll never get to a login prompt. That is just one issue that may occur       when the system hangs at        boot. That file is read-only for a reason...but you can use it. There will       also be no indication as why the application does not work when it fails and       that is a total misery to work through.              ** Alternatively, you can also move the serialBridge file into the       /etc/init.d/ directory and than issue some commands to enable it; this is more       of a brute force sort of approach and requires some programming to do it       properly.                     So here's the final version and I know this to work as I recreated it last       night. I obtained the raspbian lite image and wrote the image to a 4GB SD       card. I then booted the Pi, setup my max232 and the GPIO as in step 1. I then       installed tcpser as in        the mandetory step from the previous instructions. I then went on to document       the steps below. I then did the whole process again, this time working from       the document below to confirm it was proper.              ----       Here is the edited STEP 2 instructions to create tcpser as a service on LINUX       (make sure the other steps are followed before going forward with this):              Two text files need to be created. One is the executable file that has the       instructions to start tcpser with our default values and another text file       that instructs LINUX how to start the first file as a bootable service.               1. Create a text file (I just put it in the Pi home directory) and make it       executable. If you are using a USB to Serial Adaptor, change the ttyAMA0 to       ttyUSB0 in the following instructions (or the ttyUSB# that represents where       your adaptor is active        using the command: lsusb -t at the bash). Change the 38400 baud rate value in       the tcpser line to whatever suites your setup. The max232 that I have can go       from 300 baud to 115200 baud. There are some that cannot go any lower than       57600, so please make        sure you know your type. USB to serial devices are known to be very bad and       buggy. Use them at your own risk. My advice is to purchase a USB-Serial       device that is more than 10 bucks CDN.              To create the proper text file, at the bash:               type: cd |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca