serial send OK receive not ok

Thomas McGrath III 3mcgrath at adelphia.net
Thu Feb 10 19:07:37 EST 2005


Hello all,

I have been playing with my macbrick again. I have been using Sarah's 
serial test task and can connect via usb to my usb macbrick with serial 
commands.

My problem is I don't know anything about serial commands. I can see 
the device (which has sending and receiving lights) receive the signal 
from the serial test stack but it does not do what I think it should do 
and no receive is confirmed. I tried sending a <V000 which for macbrick 
is a version request string but I can't get or don't get anything back 
confirming it. I don't know what to do????

I think it is a timing thing or else a bad string or because I'm 
clueless......

on mouseUp
   if the hilite of btn "Port open" <> true then
     send mouseUp to btn "Open Serial Port"
   end if
   put word 1 of the selectedText of btn "SendEOL" into eol
   if eol = "CR" then put numToChar(13) into eol
   else if eol = "LF" then put LF into eol
   else put CRLF into eol
   put the label of btn "Port" into thePort
   put fld "sendField" into theData
   if the hilite of btn "OS X" then
     write theData & eol to driver thePort
   else
     write theData & eol to file thePort
   end if
   put "-> " & theData & return after fld "recField"
   read from driver thePort until eof -- EMPTY IN 1 SECONDS
   PUT IT -- my test to see if it has anything in it - it does 
not?????????
   put the result & return after fld "recField"
end mouseUp

Tom


Thomas J. McGrath III
SCS
1000 Killarney Dr.
Pittsburgh, PA 15234
412-885-8541


More information about the use-livecode mailing list