steptail.com

Does expecting the unexpected make the unexpected the expected?

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
Next revision Both sides next revision
guides:virtual_modem:section_4 [2019-11-18 23:51]
omolini [Required packages]
guides:virtual_modem:section_4 [2020-02-19 02:10]
omolini [Skip to other sections]
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 104: Line 109:
   * [[Guides:​Connecting a Dumb/Smart Terminal to the Internet]] | COMING SOON   * [[Guides:​Connecting a Dumb/Smart Terminal to the Internet]] | COMING SOON
  
-==== Skip to other sections ====+===== 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_4.txt · Last modified: 2023-11-24 23:16 by omolini