[REBOL] Re: serial port observation ... the last call ...
From: petr:krenzelok:trz:cz at: 1-Jul-2002 23:49
>Gordon and Petr,
>Here is a function I wrote that does the trick for me. I hope it helps you
>(beware of line-wrapping):
>connect-mpps: has [err ports tmp][
> err: true
> foreach port ports: [port1 port2 port3 port4 port5 port6][
> if not error? try [
> mpps: open/direct/no-wait rejoin [serial:// port "/19200/8/none/1"]
> ][err: false break]
> if err [
> view/new tmp: layout [
> text "Unable to open any serial connections"
> button "OK" [quit]
> wait 30
> unview/only tmp
> return false
> mpps/rts-cts: off
> update mpps
>I had the same behavior as Petr with REBOL not returning until I defined the
>ports for each machine individually using system/ports/serial. I normally
>put this in the user.r file.
>I suppose you could access the system via libraries (if you are using View/Pro)
>to determine which COM ports are installed on the system.
>An idea if you need the hardware handshaking: Perhaps you could scan with
>handshaking off and once you find your device, turn handshaking back on.
Thanks a lot ... that's what I will do (handshaking). Rebol serial
communication is not correct imo. I looked at PortMon output and found
out, why our device accepted all those strange chars. I used direct
no-wait mode and inserted some help.txt file into serial port. Once I
did so using HyperTerminal, I could see HyperTerminal taking my help
file, and inserting each char of the file separately, while insert read
%help.txt produced unexpected results and port monitor showed all chars
being put into port at once. I called my Linux friend and he told me,
that normally, if serial port is not able to be on pair with the speed
you sent your data in, it will generate some kind of error. But Rebol
doesn't seem to return any such kind of info. If it is so, it is a bug -
Rebol should too, put text file into serial port char by char ...
Has anyone any other experience here? Should I submit it ot feedback as
a bug report?