steptail.com

Who put the alphabet in alphabetical order?

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-12-11 16:56]
omolini [Making Virtual Modem run at startup]
guides:virtual_modem:section_4 [2020-12-17 04:21]
omolini
Line 11: Line 11:
 In the next chapter we will download and install vmodem onto your Raspberry linux box! In the next chapter we will download and install vmodem onto your Raspberry linux box!
  
-  * If you would like to view the source code and more coding examples, ​[[Guides:​Virtual Modem:​Script|click here]] +  * If you would like to optionally ​[[Guides:​Virtual Modem:​Script|view the source code and a few more coding examples, ​click here]] 
-  * To download and install vmodem, execute the following commands:+  * To just download and install vmodem, execute the following commands:
 <code bash> <code bash>
 sudo mkdir /​boot/​vmodem sudo mkdir /​boot/​vmodem
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>
 +sudo chmod 770 /​boot/​vmodem/​vmodem.sh
 +sudo chmod 770 /​boot/​vmodem/​1.sh
 +sudo chmod 770 /​boot/​vmodem/​ppp.sh
 +</​code>​
  
 ==== Name of the serial port ==== ==== Name of the serial port ====
Line 33: Line 40:
   * Run the command: ''​**ls** /​dev/​tty*'' ​   * Run the command: ''​**ls** /​dev/​tty*'' ​
 {{ :​guides:​pics:​raspberry_serial_port_3.png |}} {{ :​guides:​pics:​raspberry_serial_port_3.png |}}
-    * If you **do not** see ''/​dev/​ttyUSB0''​ listed, you will need to update the script with the correct serial port. Visit [[Guides:​Virtual Modem:​Section 4:Changing the serial port|this page]] to update the script with the correct serial port. +    * If you **do not** see ''/​dev/​ttyUSB0''​ listed, you will need to update the script with the correct serial port. [[Guides:​Virtual Modem:​Section 4:Changing the serial port|Visit this page]] to update the script with the correct serial port. 
     * If you **do** see ''/​dev/​ttyUSB0''​ listed, continue on!     * If you **do** see ''/​dev/​ttyUSB0''​ listed, continue on!
  
Line 43: Line 50:
 ping www.google.com ping www.google.com
 </​code>​ </​code>​
-  * Press Ctrl and Z to stop ping. +  * Press Ctrl Z to stop ping. 
 ==== Initial VModem testing ==== ==== Initial VModem testing ====
 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, and the other end to a client ​computer which has a terminal software installed. You can use any terminal, such as [[https://​www.chiark.greenend.org.uk/​~sgtatham/​putty/​latest.html|PuTTY]] or the built-in HyperTerminal on Windows 9x. +  * If you have not done so already, connect ​one end of your serial cable to the Raspberry Pi's USB-to-serial adapter, and the other end of the serial cable to a computer which has a terminal software installed. You can use any terminal, such as [[https://​www.chiark.greenend.org.uk/​~sgtatham/​putty/​latest.html|PuTTY]] or the built-in HyperTerminal on Windows 9x. 
   * 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).    * 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 with the terminal program to the Raspberry Pi.   * Connect with the terminal program to the Raspberry Pi.
Line 57: Line 64:
  
   * 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 shellyou can press **CTRL + z** +  * Now, go to your SERIAL terminal which should be hooked up to the Raspberry Pi's USB-to-serial adapterand issue a few basic Hayes commands. Type "​AT"​ and then press ENTER. You should receive an "​OK"​ response. ​ 
-  * The script emulates ​a 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.+    * If you do not receive an OK response, 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.  
 +    * Check to see that the vmodem.sh script is running ​and is receiving your keystrokes. If it working, it should echo your input from 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 86: Line 94:
 </​code>​ </​code>​
  
-To automate this process, you can alternatively run the following command on the Raspberry Pi shell which will do the appropriate ​change ​for you:+  * You can alternatively run the following command on the Raspberry Pi shell which will do the appropriate ​changes ​for you:
 <code bash> <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'​ sudo sh -c '​printf "`head -n -1 /​etc/​rc.local`\n\ncd /​boot/​vmodem\n./​vmodem.sh &​\n\nexit 0\n" >/​etc/​rc.local'​
Line 103: Line 111:
   * [[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