[REBOL] Re: Accessing serial port under Windows
From: geza67:freestart:hu at: 23-Mar-2001 17:14
Hello !
Thank you for the tip, I am getting closer and closer :-
)
Now I can open the port, issue the modem command but I can get no
reasonable result. The code is:
rebol[]
sp: open/mode/with serial://port1/9600/none [write read
string no-wait] "^M"
insert sp "ATI"
wait/all sp
print copy sp
close sp
... and the output is "ATI", not the modem answer
string ! Why echoes and returns the port ONLY the same
command I issued ?
Thankx !
> I am not sure what you mean? Could you how me an example of your
> problem? Here is program I wrote a few months ago after getting
> bombarded by spam. It might help. --Ryan rebol [
> Title: "Dial Away"
> Date: 18-Dec-2000
> File: %dialaway.r
> Purpose: {
> I strictly discourage you to use this program all weekend long
> to continously dial those toll free numbers left by spammers.
> The tolls are much higher during weekdays.
> }
> ]
>
> dial-away: does [
> phone-nums: parse/all phone-numbers-text/text "^/"
> quit-time: now + to-time time-to-run/text
> sp: open/mode/with serial://port1/9600/none [write read string
> no-wait] "^M" until [
> to-call-position: random length? phone-nums
> to-call: rejoin ["atdt " pick phone-nums to-call-position "^/"]
> insert sp to-call wait [30] print copy sp now > quit-time
> ]
> close sp
> ]
> ......
=========================================================
Geza Lakner M.D., B.C.
internist, clinical pharmacologist
[Geza--Lakner--helka--iif--hu]
[h13164lak--ella--hu]