>Hi Ed,
>
>I tried turning it off with the "ATM0" command (L0 doesn't exist in the documentation, it's M0 that turn the speaker off). It work (the speaker doesn't make any sound thereafter), but the modem won't execute the next line (connect) until I remove the ATM0 line.
>
>Here is the lines of code:
>THIS.ModemComm.Output = "ATM0" + CHR(13) && Turn off the speaker
>THIS.ModemComm.Output = "ATDT" + ALLTRIM(THIS.PhoneNb) + CHR(13) && Dial
>
>In the Control Panel|Modem, I have set my modem as silent. When I dial in to the internet, it doesn't make a sound, but when I use the MSComm object, it ignore completly the configuration in the Control Panel and use the speaker.
>
>So, I'm searching for a way to:
>- Make MSComm respect the configuration of the modem in the Control Panel, or
MSComm is an I/O port level control; it doesn't know about the Control Panel settings. You might want to look at using a TAPI control that uses the setup for the modem from the Control Panel applet to access the modem.
>- Find a way to turn off the speaker that work reliably on any modem
AFAIK, it's not universal - different modems have different AT family commands to do this (if that weren't the case, we'd not need all the various modem drivers!)
As I mentioned, I think that the ATL0 is pretty common in the Hayes-compatible environemnt (the USR modems are Hayes-compatible; the problem is, the elementary levels of Hayes modem compatibility don't include soft setting the speaker, and I can think of a half-dozen non-Hayes-compatibles.
The last reference card I have lying around here, says that the following are the basic Hayes modem modes supported at ATX3 or higher levels; the USR SPortsters are either X3 or X4 level compliant:
ATL - speaker volume, range is 0-3, 0 is lowest.
ATM - speaker on-off 0 = off entirely, 1 = on handshaking, 2 = always on, 3 = only on when answering
AT&W0 - save the current configuration in the NVRAM as default profile 0
ATZ0 - Restore profile 0 on warm reset. Warm reset can be forced by three consecutive "+" issued followed by ATZ0 and a CHR(13) - I don't include the three "+" characters in a web page or email ,since the results for some modems may be to force a modem into command mode or disconnect, which can be confusing to say the least.) The following should do it though -
THIS.ModemComm.Output = "+" + "+" + "+" +"ATZ0" + CHR(13)
>
>TIA
>
>>You might try turning off the modem speaker in the default reset for the modem (I don't know the specific sequence for the USR, but USR is pretty good about documenting this.) It's going to vary from modem to modem, so any solution that you find is probably going to break when youy go to a different mfr/model...
>>
>>As I remmeber, you use ATL0 to turn the speaker off, or to minimum volume, on the USR modems.