Workaround to the workaround (US Robotics is a piece of s*)

"Luca Olivetti" (luca@olivetti.dhis.org)
Tue, 13 Jul 1999 01:56:11 +0200


--==_Exmh_-142805000P
Content-Type: multipart/mixed ;
	boundary="==_Exmh_-1429802300"
Content-Transfer-Encoding: 7bit

This is a multipart MIME message.

--==_Exmh_-1429802300
Content-Type: text/plain; charset=us-ascii

A long time ago I introduced a workaround in US_Robotics.c to a problem: if 
you sent a beep command the modem wouldn't recognize dtmf codes afterwards.
The workaround was to send the "answer phone" code (AT#VLS=4A).
Now I realized that this wouldn't work if the internal or the external speaker 
is in use, because after the AT#VLS=4A the modem will go off hook, effectively 
changing the device from internal/external speaker to the phone line.
Attached is a patch to enable the workaround only if the selected device is 
*not* the internal/external speaker (the modem doesn't beep with the internal 
speaker anyway but at least it won't go off hook -- it beeps with the 
*external* speaker though).
I also added the "EXTERNAL_SPEAKER" option missing from voice.c
(both US_Robotics.c and shell.c came from the latest patch on alphanet -- 
dated 27061999).

Bye



--==_Exmh_-1429802300
Content-Type: text/plain ; name="patch2.txt"; charset=us-ascii
Content-Description: patch2.txt
Content-Disposition: attachment; filename="patch2.txt"

--- shell.c.orig	Mon Jul 12 22:41:38 1999
+++ shell.c	Tue Jul 13 00:41:28 1999
@@ -299,6 +299,8 @@
                          voice_set_device(EXTERNAL_MICROPHONE);
                     else if (strcmp(device, "INTERNAL_SPEAKER") == 0)
                          voice_set_device(INTERNAL_SPEAKER);
+                    else if (strcmp(device, "EXTERNAL_SPEAKER") == 0)
+                         voice_set_device(EXTERNAL_SPEAKER);
                     else if (strcmp(device, "LOCAL_HANDSET") == 0)
                          voice_set_device(LOCAL_HANDSET);
                     else if (voice_write_shell("ERROR") != OK)

--==_Exmh_-1429802300
Content-Type: text/plain; name="patch1.txt"; charset=us-ascii
Content-Description: patch1.txt
Content-Disposition: attachment; filename="patch1.txt"

--- US_Robotics.c.orig	Tue Jul 13 00:33:11 1999
+++ US_Robotics.c	Tue Jul 13 01:41:04 1999
@@ -60,6 +60,8 @@
       
      if (IS_101_beep(frequency, length) != OK)
           return(FAIL);
+     
+     if (internal_speaker_used) return(OK);
           
      if (IS_101_answer_phone() != VMA_OK)
           return(FAIL);
@@ -268,6 +270,7 @@
                voice_command("AT#VLS=4","OK|VCON");
                return(OK);
           case EXTERNAL_SPEAKER:
+               internal_speaker_used = TRUE;
                voice_command("AT#VLS=2","OK|VCON");
                return(OK);
           case INTERNAL_MICROPHONE:

--==_Exmh_-1429802300
Content-Type: text/plain; charset=iso-8859-1

Luca Olivetti  http://olivetti.cjb.net
Telefonica, PP y CiU son un freno para el desarrollo del país
Telefonica, PP and CiU are a restrain on the development of the country

--==_Exmh_-1429802300--



--==_Exmh_-142805000P
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v0.9.8 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE3ioCYCQPXTRx9NmQRAtcdAKCDDeHv2UkgmURNNoOimfkTf10sagCgwDGO
qDPohSmeTLZOybEoNBS4p4w=
=7Zfc
-----END PGP SIGNATURE-----

--==_Exmh_-142805000P--