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-11-18 23:51]
omolini [Required packages]
guides:virtual_modem:section_4 [2019-12-11 16:58] (current)
omolini [Making Virtual Modem run at startup]
Line 47: Line 47:
 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 58:
   * 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 |}}
Line 75: Line 76:
  
 ===== 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 84:
 /​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>​
  
guides/virtual_modem/section_4.1574121101.txt.gz · Last modified: 2019-11-18 23:51 by omolini