DoIO() on serial
11 messages in this thread
Mike,
I may have steered you in the wrong direction slightly, take a look and
see if the serial port is already opened…you may be getting a baud mis-match
error rather than an invalid baud rate.
Don
Don, it seems like no matter what I do, even if I am SETTING the baud rate, I
get the -3 error from DoIO(), so I don't think it's the baud rate. —Mike
Mike,
Sounds like time for a call to C-A in West Chester again…BTW, you are
using SetParams() (or it's Ass'y equivalent) to set the baud rate aren't you?
The AutoDocs say you _must_ use it to set the parameters.
For some reason or other, you can't directly modify the IoReq block
structure yourself.
Don
Don, I don't have docs yet for 1.2, but 1.1 says you can set parameters by
setting the PARAMS flag (forget exact name) in the request and then calling
DoIO(). In any case I get the same error from DoIO whether I am setting the
params or just using the defaullts. —Mike
Mike,
I don't have the doc in front of me, but it specifically says you
_must_ call SetParms() to set the parameters before a call to DoIO() with 2
exceptions (I forget which 2, but they weren't baud). However, I have no idea
what you have to do if using defaults (probably nothing)…so you might want
to take a look at Jez's term program…as someone else suggested.
Don
Don, I looked at Jez's program, and it works (see my other reply). He _does
not_ use SetParams(), but rather uses SendIO() with the command field set to
SDCMD_SETPARAMS. I'm sure he was using 1.1, but it seems to work with 1.2 as
well! When I get the 1.2 docs, I'll do it "right". —Mike
Mike,
Great…the important thing being it is now working.
Don
Larry, Don, Bela & Patrick:
Thank you very much for your help! What I learned (again) is not to trust
the examples in the Amiga books, rather I should trust only what works! I
copied the technique from ARGO.S in DL10. It works, but I'm not yet sure how.
There is no need (apparently) to call CreateExtIO, and you can set the
parameters (i.e. baud rate) using SendIO().
Jez's code doesn't use DoIO(), which I didn't want to use anyway, but I had
started with it because it looked the easiest. When I get the routine finished
I'll upload it here, it's the least I could do. Thanx again! —Mike
What happens (dare I say it?) if you ignore the -3 error and just proceed as if
everything's cool? >Bela<
Well, nothing! I want the DoIO() to collect four bytes of data from the
serial port, but it doesn't. I can run the program many times without getting
the guru or losing any memory, but the data buffer I set up to receive the
serial data remains unchanged (I do have much shorter programs that do
nothing!)<grin>. Larry says the code to ArgoTerm (Jez's) is in the DL, and
uses asm to open the serial port. I go find out now. —Mike
Larry, Don, Bela & Patrick:
Thank you very much for your help! What I learned (again) is not to trust
the examples in the Amiga books, rather I should trust only what works! I
copied the technique from ARGO.S in DL10. It works, but I'm not yet sure how.
There is no need (apparently) to call CreateExtIO, and you can set the
parameters (i.e. baud rate) using SendIO().
Jez's code doesn't use DoIO(), which I didn't want to use anyway, but I had
started with it because it looked the easiest. When I get the routine finished
I'll upload it here, it's the least I could do. Thanx again! —Mike