steptail.com

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

User Tools

Site Tools


guides:virtual_modem:section_5

This is an old revision of the document!


Section 5 - Using Virtual Modem

Getting online

Now you can proceed to check out the system specific guides on how to interface different vintage computers and devices with VModem. Once you are done, return back to this guide!

Make sure vmodem.sh is running on the Raspberry Pi first before attempting connection!

Making Virtual Modem run at startup

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.

  • Edit the /etc/rc.local file. Go to end of the file, and find the last line. It should be exit 0. Now add the following lines ABOVE it.
# Start serial port and simulate a modem
cd /boot/vmodem/
/boot/vmodem/vmodem.sh &

Beware the ampersand “&” at the end of the line. Without it, the boot process may not complete correctly (or at all).

  • Restart Raspberry and test the changes. After rebooting, VModem should automatically start up with system processes and start expecting connections on serial.

Supported Modem Commands

Hayes commands supported:

  • ATDn - Dial number, where n is a phone number
    • ATDTn - Dial number using touch tone
    • ATDPn - Dial number using pulse dialing
  • ATE - Command echo to host
    • ATE0 Commands are not echoed
    • ATE1 Commands are echoed
  • ATQ Result codes
    • ATQ0 Modem returns result codes
    • ATQ1 Quiet mode. Modem gives no result codes.
  • ATV Result codes in numerical or verbose form
    • ATV0 Returns the code in numerical form
    • ATV1 Full-word result codes
  • ATX Extended result codes
    • ATX0 Disable extended result codes (Hayes Smartmodem 300 compatible result codes)
    • ATX1 Add connection speed to basic result codes (e.g. CONNECT 1200)
    • ATX2 Add dial tone detection (preventing blind dial, and sometimes preventing ATO)
    • ATX3 Add busy signal detection
    • ATX4 Add both busy signal and dial tone detection
  • ATZ Reset modem
    • ATZn Restore stored profile n

Extended Modem Commands

  • AT&Cn Carrier-detect
    • AT&C0 Force DCD signal active
    • AT&C1 DCD signal indicates true state of remote carrier signal

Faked Commands (does not perform any action, always returns OK)

  • ATA - Answer
  • ATH Hang up or pick-up.
    • H0 Go on-hook (Hang up)
    • H1 Go off-hook
  • ATM Speaker control
    • M0 Speaker always off
    • M1 Speaker on until carrier detected
    • M2 Speaker always on
    • M3 Speaker on only while answering

Troubleshooting

Cannot communicate on serial terminal with the vmodem script
After running the Virtual Modem script on the Raspberry Pi, and connecting it to your computer via the USB-to-Serial adapter and a null modem cable, you should be able to fire up a simple serial terminal on the computer and issue a few Hayes commands to ensure connectivity. Hayes commands are a common way to communicate with Modems, and by typing AT and pressing enter in the terminal, you should see an “OK” response. The vmodem script also recognizes other commands, such as HELP which should provide a short list of recognized commands). If you receive a garbled response after typing AT or HELP, your serial speed settings may not be the same on both ends. Make sure you have adjusted the communication speed to match. If you receive no response whatsoever, you might have a problem with the USB-to-Serial adapter or you may be using an older UART on your computer (see section 2 for more on this). If you're still unable to communicate with the VModem script, feel free to join our Discord channel (see bottom of page for link) for further support. Simple tutorials can only go so far… :)

After dialing in, system is disconnected immediately
Make sure you are using the latest version of the Virtual Modem script. An early version had an issue where the serial connection would be cut before the network connection was established. Also, be sure to make sure your serial baud settings are correct, and they match the virtual modem script. Finally, try turning off Flow Control from the Modem Settings under Advanced Settings.

After dialing in, system reports connected, but no network is available
Make sure you have updated the network device in vmodem.sh to reflect the correct network interface. By default it is eth0. If you are using Raspberry on WIFI, you may need to change this to wlan0.

Other issues:

  • 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 us at Discord. We have a channel specific for Virtual Modem support (see bottom of page).

Skip to previous sections

Get In Touch With Us!

Get support, share your thoughts and report bugs on Discord.

guides/virtual_modem/section_5.1618427881.txt.gz · Last modified: 2021-04-14 19:18 by omolini