SerialPort

Gerardo Richarte core.lists.squeak at core-sdi.com
Mon Nov 15 16:23:16 UTC 1999


following
(in Windows)

        s _ SerialPort new.
        s openPort: 4.  (where my modem is).
        s nextPutAll: 'ATZ',Character cr asString.
        s readString. [Cmd-P] ==> 'ATZ
'
        s readString. [Cmd-P] ==> ''  "I was suppose to get an 'OK'
right? this
is what is not working..."

        s nextPutAll: 'ATX1DT12341234', Character cr asString.  "I here
the
modem dialing, so it's working"
        s readString. [Cmd-P] ==> 'ATX1DT12341234
'

        Then I tryed something like:

        w _ Wait forSeconds: 1.
        [ (a _ s readString) = '' ifFalse: [Transcript nextPutAll: a. b
wait.
true] whileTrue] fork.

        And it didn't work. I called my phone number, but saw no 'RING'
in the
transcript.
        The first idea I had is that the primitives are failing, but I'm
not
sure...

        Anyway, if all this works... what's the correct way to wait for
a new
event from the modem? or I just have to keep polling?


        Failed Bye!
        Richie++

-- 
A390 1BBA 2C58 D679 5A71 - 86F9 404F 4B53 3944 C2D0
Investigacion y Desarrollo - CoreLabs - Core SDI
http://www.core-sdi.com

--- For a personal reply use gera at core-sdi.com





More information about the Squeak-dev mailing list