[futurebasic] OPEN "C"

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : August 2001 : Group Archive : Group : All Groups

From: "Terrald J. Smith" <terrald@...>
Date: Mon, 20 Aug 2001 18:51:55 -0500
Guys, the DUMMY is really having problems with the OPEN "C" stuff.  I just
cannot figure out how to use it.  I have a VERY important program which I
need to include the modem stuff to send data.  To see if I am even close to
the right code (I doubt it), I need to be able so see if I am even sending
the data over the phone line with the modem stuff.  I have tried to use the
codes in release 5 (Auto CheckPorts.bas, CheckPorts.bas, and  CTB Demo) just
to see if they are dealing with the modem stuff....if I can confirm, then I
would try to use them modified to see what data I am sending.

However, just an issue, I call the modem number from another phone and run
those programs from the computer.  The computer/program does not even seem
to answer the phone.  My cell phone just keeps ringing (I have also done the
dialing with a real phone).

I have also tried this simple code that tedd left on one site...same issue,
why does the modem not answer the phone to get some data.

LOCAL FN checkPort
  READ #_modemPort,a$;0 'grab one byte
  SELECT a$
    CASE ":" 'start of record
      PRINT ": start of record";
    CASE ELSE
      READ #_modemPort,b$;0 'grab second byte
      d$ = a$ + b$
      LONG IF d$ <> ""
        PRINT d$;" ";
      END IF
      SELECT d$
        CASE "00" 'nothing
        CASE "0D" 'return
        CASE "80" 'text field
        CASE "0A" 'line feed
          PRINT #_modemPort,"#";
          c$ = ""
        CASE "FC" 'ASC(252)
        CASE "FF" 'end of record
          PRINT #_modemPort,"#";
        CASE ELSE
          b$ = "&H" + a$ + b$
          test = VAL(b$)
          c$ = c$ + CHR$(test)
        END SELECT
   END SELECT
END FN

OPEN "C",_modemPort, _ 9600, _noParity, _oneStopBit,_sevenBits,256

DO
  HANDLEEVENTS
  fn checkPort
UNTIL gFinished

This is really an emergency, I have GOT to do the code to send data and I
will need to confirm that I am sending the proper data before I actually
start this send code stuff.

Please, Please help the DUMMY....I will be very frustrated and sad if my
partners make me change everything to PC crap.  I am a MAC and FB addict.

Thanks

Terrald J. Smith