steptail.com

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

User Tools

Site Tools


guides:virtual_modem:script

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:script [2020-02-27 22:46]
omolini [2.sh]
guides:virtual_modem:script [2020-03-04 04:46]
omolini
Line 18: Line 18:
 # -------------------------------- # --------------------------------
 # Oliver Molini 2019 # Oliver Molini 2019
 +#
 +# Billy Stoughton II for bug fixes and contributions
 # #
 # Licensed under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License # Licensed under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License
 # https://​creativecommons.org/​licenses/​by-nc-sa/​4.0/​ # https://​creativecommons.org/​licenses/​by-nc-sa/​4.0/​
-#+
 # Tested working out of box with the following host configurations:​ # Tested working out of box with the following host configurations:​
 # #
Line 53: Line 55:
 # Variable: serport # Variable: serport
 # serport specifies which local serial device to use. # serport specifies which local serial device to use.
-# For example, ​using "ttyAMA0" will tell the script +# For example, "ttyUSB0" will tell the script ​to use 
-# to use /dev/ttyAMA0 ​for communication.+# to use /dev/ttyUSB0 ​for communication. 
 +# Common values: ttyUSB0 or ttyAMA0
 # #
-# Default: +serport=ttyUSB0
-serport=ttyAMA0 +
-+
-serport=ttyAMA0+
  
 # Variable: baud # Variable: baud
Line 88: Line 88:
 # Default is 1. # Default is 1.
 resultverbose=1 resultverbose=1
 +
 +# Variable: TERM
 +# Tells the script and environment which type of terminal to emulate.
 +# It is only useful to change this, if you're using a serial ​
 +# terminal to connect to this script. If you're connecting form a ANSI 
 +# cabable machine such as DOS, you may want to use TERM="​ansi"​
 +#
 +TERM="​vt100"​
  
 # EXPORT SHELL VARS # EXPORT SHELL VARS
Line 93: Line 101:
 export serport export serport
 export baud export baud
 +export TERM
  
 # FUNCTIONS # FUNCTIONS
Line 223: Line 232:
             exec 99>&​-             exec 99>&​-
             # Execute dialed script             # Execute dialed script
-            /sbin/getty -8 -L $serport $baud vt100 -n -l "​./​$number.sh"​+            /sbin/getty -8 -L $serport $baud $TERM -n -l "​./​$number.sh"​
             # Reset serial settings             # Reset serial settings
             ttyinit             ttyinit
Line 404: Line 413:
 #!/bin/bash #!/bin/bash
 # #
-export TERM=vt100 
 echo "​Terminal type set to $TERM. Running Lynx ..." echo "​Terminal type set to $TERM. Running Lynx ..."
 lynx lynx
 </​code>​ </​code>​
  
guides/virtual_modem/script.txt · Last modified: 2022-12-28 03:32 by omolini