Serial Networking: Connecting To A Linux Computer |
||||
|
Note: The details for setting up the link have been very kindly provided by Jérôme Mathevet, for inclusion on this website. Many thanks, Jérôme. Requirements:
Linux Configuration: (These instructions have been successfully tested on Red Hat and SuSE Linux). NB. If you use a configuration program to carry out some of the following tasks, like YaST on SuSE Linux, you may find that it overwrites files like hosts. So it is advisable to check everything over, once you've finished. 1) Edit or create a file called /etc/hosts using a text editor (You might have to do this as root, depending on the file permissions). It should look something like this: 192.168.1.1 riscpc.my.home riscpc NB. There should be at least one space between the entries on a line. If your PC is a Windows/Linux dual boot machine, like mine, then you can miss out the 192.168.1.3 line, and have novapc as the Linux hostname. 2) Edit or create a file called /etc/ppp/options. This specifies the options to be used when initiating the PPP serial link. It might look something like this: (NB. You can find further details on PPP options in the pppd manual). 115200 (This should be set to the speed of the slowest serial port on the link, for pre A7000/RiscPC computers this will be 19200). lock 3) Edit or create a file called /etc/syslog.conf, and add the following line: daemon.debug /var/log/ppp.log This leaves a log of the messages produced by the PPP module, stored in the file /var/log/ppp.log, which can be very useful when correcting problems with the link. You may wish to remove this line, when you are sure the PPP link works every time. 4) Edit the file /etc/rc.d/rc.local (or /etc/rc.d/rc if rc.local does not exist), by inserting the following line at the end: pppd 115200 /dev/ttyS0 (Replace 115200 with 19200 for older Acorn's) If you have a serial mouse attached to your COM0 port (ttyS0), you may want to use a second serial port if you have it. To do this, replace ttyS0 with ttyS1. 5) You may want to check if there are other processes using the serial port, type in ps aux | grep ttyS. If you see a line other than ps aux | grep ttyS0 or ps aux | grep ttyS1, depending on which serial port you are using, locate the offending tasks and disable them with the linuxconf utility. 6) Assuming you want to do something useful with the link, you will want to install something like a telnet or FTP server, these will be included on the distribution CD. In order to run these server's you will first need to install the inetd daemon. (Most recent distributions will have a configuration program to do this for you). Don't forget to edit the /etc/inetd.conf file to enable the telnet daemon. The result of the instructions is that the Linux will always be looking out for any potential PPP connections, on which ever serial port we decided to use. (Note: You may need to change the default address of the PPP connection to 192.168.1.3. The website author had to do this when configuring SuSE Linux)
1) Ensure that the contents of the RISC OS Hosts file (!Internet.files.Hosts) are identical to the Linux Hosts file. 2) Run the !Internet application. (If you have Internet v5 in the new Boot sequence, then it is run on startup). 3) Open a task window by pressing Shift-Control-F12 all at one. Type the following: *pppconnect 115200 riscpc:linux idle-disconnect 0 (115200 should be replaced with 19200 for older Acorn's). 4) To verify that the link is operational, type in: *ping linux (If you have Internet v5, you will need to press Escape after a couple of seconds, to stop ping) If it reports a 0% packet loss, then the link is operational. 5) If you have installed a telnet server on the linux side and you made the inetd demon listen to the telnet port (by editing /etc/inetd.conf), you can try to use a Telnet client, like FreeTerm (by Tony Howat/Merlin Hughes), to access your linux box. Enter linux.my.home as the host and telnet as the port. Potentially, you could administrate your Linux box from the comfort of your RISC OS desktop! 6) If Sendmail is installed and the inetd demon is listening to the smtp port (check a line with smtp in /etc/inetd.conf), you can try sending yourself an email using FreeTerm ! Enter linux.my.home as the host and smtp as the port. A line with Sendmail should appear and a prompt wait for your commands. Type HELP in the terminal menu to discover what you can do. With some trial and error, you should be able to send an email from your Acorn to your Linux box. 7) If you have installed an FTP server (like wu-ftp server) on the Linux box, then you can use a FTP client (like FTPc) to transfer files to and from your Acorn. It is possible with some applications (like Zap) to save directly to the FTPc window, and therefore to the Linux hard drive. When you want to disconnect the PPP link, just type *pppdisconnect in the task window. |
||||