Hi,
If accessing external modems are so easy as anybody says, why this
piece of code doesn't works?
10 ' an US Robotics 33600 external modem is connected into
20 ' my ASCII or Gradiente RS232 serial
10 _COMINI ' change to whatever you want. it doesn't work anyway
20 OPEN"COM:" FOR OUTPUT AS 1
30 ?#1,"ATZ";CHR$(10); ' CHR$(13)? CHR$(10)? both??
40 CLOSE
50 OPEN"COM:" FOR INPUT AS 1 ' I should read "OK\n"...
60 A$=INPUT$(1,1)
70 IF A$<>"O" THEN CLOSE:?"ERROR! Not 'OK'!":END
80 A$=INPUT$(1,1)
90 IF A$<>"K" THEN CLOSE:?"ERROR! Not 'OK'!":END
100 A$=INPUT$(1,1)
110 IF A$<>CHR$(10) THEN CLOSE:?"ERROR! Not 'OK'!":END
120 CLOSE
130 OPEN"COM:" FOR OUTPUT AS 1:?#1,"ATDT123456789";CHR$(10);:CLOSE
140 OPEN"COM:" FOR INPUT AS 1
150 LINE INPUT#1,A$:? A$ ' should be "CONNECT"
160 ' now I should parse "login:" and "password:"...
Also, using "_COMTERM" and any parameters combination in "_COMINI"
I'm not able to communicate with the modem (not sending nor receiving
data)... :(
Any help?
Thanks,
Adriano Camargo Rodrigues da Cunha ([EMAIL PROTECTED])
Engenharia de Computacao - UNICAMP
http://www.adrpage.cjb.net http://if.you.dont.like.msx.usuck.com
* Sys Admin: the power of God, the intelligence of a squirrel. *
****
Problems? contact [EMAIL PROTECTED] See also http://www.faq.msxnet.org/
****