Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Modems
Message
De
15/09/2000 18:01:58
Bill Drew
Independent Consultant
Chicago, Illinois, États-Unis
 
 
À
13/07/2000 18:32:51
Liam O'Hagan
O'Hagan Programming Ltd
Irlande
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Re: Modems
Divers
Thread ID:
00392011
Message ID:
00417212
Vues:
24
>Hi Paul,
>
>Use the MSComm ActiveX control. Specify the COM port and its settings. Send the command "ATZ" + chr(13). You should wait up to 2 seconds for a response (which should be "OK")
>
>You can use this control to poll a number of COM ports to find out which, if any, have a modem attached (and switched on).
>
>HTH
>
>Liam
>
>
>
>
>>Hi,
>>
>>Has anyone got any idea how I can test if a modem is plugged into a COM port and is turned on?
>>
>>Regards
>>
>>Paul Robinshaw
I don't understand how to detect the "OK" returning from the modem. I have a USB modem and issue the following code through the MSCOMM32 control:

thisform.olecontrol1.commport = 5
thisform.olecontrol1.portopen = .t.
thisform.olecontrol1.output = "ATZ"+CHR(13)
x = thisform.olecontrol1.input
thisform.olecontrol1.portopen = .f.
=messageb(x)


Is "input" the correct way to grab this response value? How would I "wait 2 seconds"?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform