Sponsored Content
Top Forums Shell Programming and Scripting Help with 56kbit Modem Scripting Post 302999493 by Corona688 on Wednesday 21st of June 2017 11:17:13 AM
Old 06-21-2017
You can do better than cat, and should use printf, which supports escape sequences natively:

Code:
#!/bin/bash
trap "echo 'whoa doggies'" SIGHUP

exec 5<> /dev/cu.usbserial* # BASH required for bidirectional open

printf "ATH\r\n" >&5

SIGHUP is what kills processes when a terminal closes, which a shell can catch and respond to as it pleases.

Also check out man stty for a parade of options related to terminal devices, serial ports, and modems, including such things as cr-lf translation and flow control.
This User Gave Thanks to Corona688 For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Modem on HP-UX 10.20

Hi everyone I am having some real difficulties getting a dial in modem to work on one of my HP boxes. It's a mux modem on port 7 which I have set up at 9600 baud. I can dial in, the handshakes are completed, but then it returns incoherent characters on the emulation screen. I think my dial in... (1 Reply)
Discussion started by: alwayslearningunix
1 Replies

2. UNIX for Advanced & Expert Users

Modem

I've spent enough time trying to put on work Lucent Winmodem in my armada M300 (compaq laptop) I use Mandrake 8.0 but as soon as i get connected and prompmts appears modem shutsdown. Does any one had a similar situation, solved it? cheers (2 Replies)
Discussion started by: alex blanco
2 Replies

3. UNIX for Dummies Questions & Answers

Modem problem: "Sorry, modem is busy"

Hi! I have a little prob with dialing up to the internet... When I try connect, it says "Sorry, modem is busy"... Specs: Laptop 56K modem Slackware 8.0 Kernel 2.4.5 Cheers;) (4 Replies)
Discussion started by: satan404
4 Replies

4. UNIX for Dummies Questions & Answers

Modem Volume

Specs: Dlink DFE-560EL external modem. RedHat 7.1 How do you turn off the modem volume? I am getting annoyed of it beeping everytime I use it but there is no switch on the hardware to tune down the volume. I have tried using minicom and use the following commands: ATL0 ATM0 Next, I... (2 Replies)
Discussion started by: arz
2 Replies

5. UNIX for Dummies Questions & Answers

Modem

Pleaseee... Helpppp.... !!! I am using SCO Open Server 5.05. Recently, i have upgraded the system which means transfer all apps and data to the new system. Everything work well except one thing. On my old system i have an external modem which to dial out. Now that i use the same modem on... (4 Replies)
Discussion started by: jackpotp
4 Replies

6. UNIX for Dummies Questions & Answers

modem

I have got Suse 8.0 by using a modem (US Robotics 56K Faxmodem Ext). During connection i got the error 16. I tried it under RedHat and Mandrake too.....same problem. What can i do ? Thanx...a lot... Logfile: SuSE Meta pppd (smpppd), Version 0.73 on zuhause. wwwoffle not is running ... (1 Reply)
Discussion started by: Pennywize
1 Replies

7. UNIX for Dummies Questions & Answers

Modem - Test /dev/modem

Ok. I tried following the directions from some of the other threads, but I've hit a road block. I have red hat 7.3 and I installed the hcf package: hcfpcimodem-0.99lnxtbeta03042700k2.4.18_3-1rh.i386.rpm It installed ok, no errors, but I still can't get linux to find my modem. I've tried... (2 Replies)
Discussion started by: lawadm1
2 Replies

8. Solaris

Is the cable you are using a null modem cable or a modem cable

Hi all, Is there any difference between a null modem cable or a modem cable ? i assume that a null modem cable is a normal cable that i used from cpu serial ports to a modem for dialup. please correct if i am wrong, thks (2 Replies)
Discussion started by: waterbear
2 Replies

9. SCO

Installing a MODEM on v5.0.2

Hi, my first Sco question so go easy! We have a customer who is on Sco v5.0.2. We are attempting to talk a consultant on site through how to configure the MODEM in scoadmin. Unfortunately the MODEM install instructions that we work from only work for v5.0.4 and assume that scoadmin has an option... (1 Reply)
Discussion started by: Ric.Hemsley
1 Replies

10. Solaris

Modem

hi folks, i am looking for a analog modem to use it with a solaris9 sparc mashine. as far as i know, solaris communicates with the modem using AT-commands. so do i need a special modem for solaris or just a modem? i am open for everything. PCI-modem, seriell modem, usb modem. what are you using? i... (1 Reply)
Discussion started by: pressy
1 Replies
Device::Modem::UsRobotics(3pm)				User Contributed Perl Documentation			    Device::Modem::UsRobotics(3pm)

NAME
Device::Modem::UsRobotics - USR modems extensions to control self-mode SYNOPSIS
use Device::Modem::UsRobotics; my $modem = new Device::Modem::UsRobotics( port => '/dev/ttyS1' ); $modem->connect( baudrate => 9600 ); my %info = $modem->messages_info(); print "There are $info{unreleased_voice_msg} unread voice messages on $info{stored_voice_msg} total "; print "There are $info{unreleased_fax_msg} unread fax messages on $info{stored_fax_msg} total "; # Get details about message n. X my %msg = $modem->message_info(1); index type information attributes status day hour minute callerid page addresshigh addresslow checksum print 'This is a ', ($msg{type} == 2 ? 'voice' : 'fax'), 'message', " "; print 'It came from no. ', $msg{callerid}, " "; # ... # Now clear all messages $modem->clear_memory(); WARNING
This module is not documented yet, and it is a rough work in progress. Until now, it correctly reads voice/fax messages information, but when saving voice messages to disk, sometimes they are incorrectly decoded. So, if you need a working program, check out the good old TkUsr by Ludovic Drolez, unless you want to help develop Device::Modem::UsRobotics. DOCS TO BE COMPLETED FROM NOW..... Yes, I'm a bad boy :-) DESCRIPTION
Bla Bla Bla... METHODS
clear_memory() Used to permanently clear the memory space of the modem. There are separate memory spaces, one for voice/fax messages and one for user set- tings. Examples: $modem->clear_memory('user'); # or $modem->clear_memory(1) $modem->clear_memory('messages'); # or $modem->clear_memory(2) To clear both, you can use: $modem->clear_memory('all'); # or $modem->clear_memory(0); Parameters: $memtype String or integer that selects the type of memory to be cleared, where 0 is for "all", 1 is for "user" memory, 2 is for "messages" mem- ory. SUPPORT
Please feel free to contact me at my e-mail address cosimo@cpan.org for any information, to resolve problems you can encounter with this module or for any kind of commercial support you may need. AUTHOR
Cosimo Streppone, cosimo@cpan.org COPYRIGHT
(C) 2004-2005 Cosimo Streppone, cosimo@cpan.org This library is free software; you can only redistribute it and/or modify it under the same terms as Perl itself. SEE ALSO
Device::Modem, perl perl v5.8.8 2005-04-30 Device::Modem::UsRobotics(3pm)
All times are GMT -4. The time now is 01:45 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy