steptail.com

How many light bulbs does it take to change a penguin?

User Tools

Site Tools


guides:virtual_modem:section_4

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
guides:virtual_modem:section_4 [2019-08-22 18:22]
omolini [Name of the serial port]
guides:virtual_modem:section_4 [2020-02-19 02:10] (current)
omolini [Skip to other sections]
Line 1: Line 1:
 ====== Section 4 - Setting up Virtual Modem ====== ====== Section 4 - Setting up Virtual Modem ======
 ==== Required packages ==== ==== Required packages ====
-For the connection script to work properly, your Raspbian installation needs a few prerequisite packages. The most important of these is the PPP daemon **"​pppd"​** and **IP Tables** to route packages.+For the connection script to work properly, your Raspbian installation needs a few prerequisite packages. The most important of these is the PPP daemon **"​pppd"​** and **IP Tables** to route packets.
   * Run the following commands to install pppd and iptables:   * Run the following commands to install pppd and iptables:
 <code bash> <code bash>
Line 24: Line 24:
     * **/​boot/​vmodem/​1.sh**     * **/​boot/​vmodem/​1.sh**
     * **/​boot/​vmodem/​ppp.sh**     * **/​boot/​vmodem/​ppp.sh**
 +
 +  * Make sure they are executable:
 +<code bash>
 +chmod 770 /​boot/​vmodem/​vmodem.sh
 +chmod 770 /​boot/​vmodem/​1.sh
 +chmod 770 /​boot/​vmodem/​ppp.sh
 +</​code>​
  
 ==== Name of the serial port ==== ==== Name of the serial port ====
Line 47: Line 54:
 To test VModem, you should be able to simply run the script. Test it first over SSH to see it's output: To test VModem, you should be able to simply run the script. Test it first over SSH to see it's output:
  
-  * Connect one end of your serial cable to the Raspberry Pi's Serial-USB converter, and the other end to an old computer ​with serial portUse a terminal ​program ​such as PuTTY or HyperTerminal, and make sure you set the appropriate serial speed settings on the terminal program before you connect (by default VModem is set to operate at 57600 bps) +  * Connect one end of your serial cable to the Raspberry Pi, and the other end to a client ​computer ​which has terminal software installedYou can use any terminalsuch as [[https://​www.chiark.greenend.org.uk/​~sgtatham/​putty/​latest.html|PuTTY]] or the built-in ​HyperTerminal ​on Windows 9x.  
-  * PuTTY, Trumpet Winsock (Windows 3.1) or Dial-up networking (Windows 95) to connect ​to the Raspberry Pi.  +  * Make sure you set the appropriate serial speed settings on the terminal program before you connect (by default VModem is set to operate at 57600 bps) 
-  * Over SSH, on the Raspberry, issue the following commands. ​+  * Connect with the terminal program ​to the Raspberry Pi. 
 +  * Open up PuTTY (or your other SSH client of choice) and connect over SSH to the Raspberry ​Pi. Issue the following commands. ​
 <code bash> <code bash>
 cd /​boot/​vmodem cd /​boot/​vmodem
Line 57: Line 65:
   * If you see the READY text on the screen, the script is ready to accept connections.   * If you see the READY text on the screen, the script is ready to accept connections.
   * To exit VModem and return you back to shell, you can press **CTRL + z**   * To exit VModem and return you back to shell, you can press **CTRL + z**
-  * On your serial terminal, issue couple of test commands, ​such as "​AT"​ and then press ENTER. You may need to type AT a couple of times for VModem ​to sync up.+  * The script emulates ​few basic Hayes commands, ​so you should be able to issue the AT command on the terminal. Type "​AT"​ and then press ENTER. You should receive an "​OK"​ response. If you do not, you may need to sync up the connection by pressing ENTER a couple of times. If you still do not receive a response, something may be wrong with the serial settings, or with the connection ​to the Raspberry Pi. Also check to see that the vmodem.sh script is running. If it is, it should echo your input on the serial terminal to the script'​s output.
   * On a serial terminal, this is the output you should be getting:   * On a serial terminal, this is the output you should be getting:
 {{ :​guides:​pics:​vmodem_hyperterm.png?​600 |}} {{ :​guides:​pics:​vmodem_hyperterm.png?​600 |}}
   * Over on the Raspberry Pi, you should be seeing the corresponding output:   * Over on the Raspberry Pi, you should be seeing the corresponding output:
 {{ :​guides:​pics:​vmodem_putty2.png |}} {{ :​guides:​pics:​vmodem_putty2.png |}}
-  * If you get any error messages, take a note of them and look for commonalities in any steps you've taken before this step. Open up the script vmodem.sh for editing to make sure the baud and serial port are properly set. If you're unable to figure it out, feel free to contact me (see bottom of page). 
  
 ===== Getting online ===== ===== Getting online =====
Line 75: Line 82:
  
 ===== Making Virtual Modem run at startup ===== ===== Making Virtual Modem run at startup =====
-After you **have verified** that the VModem works properly on the console ​(see previous section), and you are able to connect to the Internet, you can make VModem run automatically as a background process after the Raspberry Pi is powered on.+After you have **verified** that the VModem works properly on the console, and you have tested that you are able to connect to your network, you can make VModem run automatically as a background process after the Raspberry Pi is powered on. It will run as a background process so you won't see it's output, so it's highly recommended to thoroughly test the script first.
  
-There are two ways you can do this: +  ​Edit the /​etc/​rc.local ​file. Make sure your /​etc/​rc.local has the following at the bottom:
- +
-**1)** You can either run the following command which will automatically add VModem to your /​etc/​rc.local+
-<code bash> +
-sudo sh -c '​printf "`head -n -1 /​etc/​rc.local`\n\ncd /​boot/​vmodem\n./​vmodem.sh &​\n\nexit 0\n" >/​etc/​rc.local'​ +
-</​code>​ +
- +
-**2)** Or you can edit your rc.local manually. Make sure your /​etc/​rc.local has the following at the bottom:+
 <code bash> <code bash>
 # Start serial port and simulate a modem # Start serial port and simulate a modem
Line 90: Line 90:
 /​boot/​vmodem/​vmodem.sh & /​boot/​vmodem/​vmodem.sh &
 exit 0 exit 0
 +</​code>​
 +
 +  * You can alternatively run the following command on the Raspberry Pi shell which will do the appropriate changes for you:
 +<code bash>
 +sudo sh -c '​printf "`head -n -1 /​etc/​rc.local`\n\ncd /​boot/​vmodem\n./​vmodem.sh &​\n\nexit 0\n" >/​etc/​rc.local'​
 </​code>​ </​code>​
  
Line 96: Line 101:
   * Restart Raspberry and test the changes. After rebooting, VModem should automatically start up with system processes and start expecting connections on serial.   * Restart Raspberry and test the changes. After rebooting, VModem should automatically start up with system processes and start expecting connections on serial.
  
-==== Skip to other sections ====+==== Further steps ==== 
 +You can now proceed ​to connect your retro machine to the Internet using Virtual modem. 
 + 
 +  * [[Guides:​Connecting Windows 3.1 to the Internet]] 
 +  * [[Guides:​Connecting Windows 9x to the Internet]] 
 +  * [[Guides:​Connecting a Macintosh Classic to the Internet]] | COMING SOON 
 +  * [[Guides:​Connecting a Dumb/Smart Terminal to the Internet]] | COMING SOON 
 + 
 +===== Troubleshooting ===== 
 + 
 +  * Some computers are not capable of operating at fast serial speeds. If you're unable to connect at 57600 or faster, try slower speeds, such as 9600 baud at first. Adjust both the vmodem.sh script and the computer to connect at only 9600 baud. If that works, work your way up to see where the limit for your specific computer is. 
 +  * If you run into any other issues, take a note of them and look for commonalities in any steps you've taken before this step. Open up the script vmodem.sh for editing to make sure the baud and serial port are properly set. If you're unable to figure it out, feel free to contact me (see bottom of page). 
 + 
 +==== Skip to previous ​sections ====
  
   * [[Guides:​Virtual Modem|Section 1 - Introduction]]   * [[Guides:​Virtual Modem|Section 1 - Introduction]]
   * [[Guides:​Virtual Modem:​Section 2|Section 2 - Shopping list]]   * [[Guides:​Virtual Modem:​Section 2|Section 2 - Shopping list]]
   * [[Guides:​Virtual Modem:​Section 3|Section 3 - Setting up Raspbian]]   * [[Guides:​Virtual Modem:​Section 3|Section 3 - Setting up Raspbian]]
-  * [[Guides:​Virtual Modem:​Section 4|Section 4 - Setting up Virtual Modem]] << You are on this page +  * [[Guides:​Virtual Modem:​Section 4|Section 4 - Setting up Virtual Modem]] << You are here 
-  * [[Guides:​Connecting Windows 3.1 to the Internet]] + 
-  * [[Guides:​Connecting Windows 95/98 to the Internet]] +==== Related Topics ====
-  * [[Guides:​Connecting a Digital VT100 compatible terminal to the Internet]]+
   * [[Guides:​Virtual Modem:​Script|Source code and Coding Examples]]   * [[Guides:​Virtual Modem:​Script|Source code and Coding Examples]]
 +  * [[Guides:​List of Compatible Websites]] | List of classic websites that work with pre-2000 legacy web browsers.
 +  * [[Guides:​Virtual Modem:​Script|Virtual Modem Source code and Coding Examples]]
 +  * [[Guides:​Web Archive Proxy|Steptail Wayback Proxy Server]] | Connect your retro computer to a mirrored copy of the Internet as it was in 1996!
  
 ---- ----
guides/virtual_modem/section_4.1566498149.txt.gz · Last modified: 2019-08-22 18:22 by omolini