sending AT commands using QBASIC
sending AT commands using QBASIC
(OP)
hey all,
Ive been trying to send some AT commands using qbasic but have had limited success. I downloaded a program from one of the forums thanks to "agual" and the terminal program there was great. HOWEVER :-(
I am sending this commmand,
ATE1N1X4&C0S8=2S9=5
The modem returns OK
I then send ATDT xxxxx-xxxxxx (uk)
The modem dials the number, this is where it gets tricky.
When i send the ATH command the modem disconnects but ALWAYS returns
NO CARRIER
But if it rings it should return RING, if its BUSY it should return BUSY but it does not. It always, always returns NO CARRIER!
Can someone please HELP !
Ive been trying to send some AT commands using qbasic but have had limited success. I downloaded a program from one of the forums thanks to "agual" and the terminal program there was great. HOWEVER :-(
I am sending this commmand,
ATE1N1X4&C0S8=2S9=5
The modem returns OK
I then send ATDT xxxxx-xxxxxx (uk)
The modem dials the number, this is where it gets tricky.
When i send the ATH command the modem disconnects but ALWAYS returns
NO CARRIER
But if it rings it should return RING, if its BUSY it should return BUSY but it does not. It always, always returns NO CARRIER!
Can someone please HELP !
RE: sending AT commands using QBASIC
if you want it to complete the call don't use ath until
you are done.
RE: sending AT commands using QBASIC
If this is hayes compatible you should be able to do a at$ for a command summary.
Ed Fair
Give the wrong symptoms, get the wrong solutions.
RE: sending AT commands using QBASIC
RE: sending AT commands using QBASIC
My ultimate goal is this.
To send an AT command using QB and then when the modem returns a result code i want to be able to capture the response within the program.
However it needs to be done quite quickly for example each call needs to return the correct result code within 5 seconds.
So when the call takes place if there is no answer the modem returns RING, or if its engaged it returns BUSY. But everytime the modem hangs up on its OWN or using ATH command i always receive the message NO CARRIER...
RE: sending AT commands using QBASIC
Use a terminal emulator to connect the way you want QB to connect and see what the responses are.
Ed Fair
Give the wrong symptoms, get the wrong solutions.
RE: sending AT commands using QBASIC
So my next question is... how can i capture response from a modem using QB, for example, I type AT, the repsonse is OK how do i get the "OK" in a variable for which i can use?
RE: sending AT commands using QBASIC
then read/write to/from it.
RE: sending AT commands using QBASIC
ATS0=1 tells the modem to wait for a call connect after first ring
ATDT DIAL OUT
ATHT OR ATZ HANG UP
ETC
you can even set your modem up like a fraggin' caller id if you wanted to. Ok now about sending modem commands to the one machine to the other. First code then I'll explain. I need help so the net help me along the way and I got this code, but bugs where in it. In the end I got a full working chat program sending data to one box to the other.
OPEN "COM2:9600,N,8,1,RB2048,TB2048" FOR RANDOM AS #1
PRINT #1, "ATZ"
CLOSE
OPEN "COM1:9600,N,8,1,TB2048,RB2048" FOR RANDOM AS #1
PRINT #1, "ATDT4940716"
a$ = ""
DO
IF LOC(1) THEN a$ = a$ + INPUT$(1, 1)
LOOP UNTIL INSTR(a$, "CONNECT")
PRINT #1, a$
ok open the come etc
print #1, "MODEM COMMAND" tell to send a command to the modem
no that a$"" loop part waits till a connect is made and will
not go to the next line of code till it reads connect.
RE: sending AT commands using QBASIC