f



TCL/TK Does not have serial port support API in Mac OS X 10.4 Tiger in a mac mini

 Over the last couple of weeks I have been trying to figure out why I
had no communications with a USB > Serial converter and tonight I
discovered that there is no serial port support in the TCL/TK
installed in MAC OS X 10.4 Mac mini. 

% fconfigure stdin
-blocking 1 -buffering line -buffersize 4096 -encoding utf-8 -eofchar
{} -translation auto

I went to the Mac install on the CD-ROMs and found nothing on tcl/tk.
What should I use to remove the old TCL/TK packages and install a
better version? I found the aqua site tcl site and should I just
install that full package binary and make the change or does Mac mini
have more surprises in store for me? 
 

http://tcltkaqua.sourceforge.net/#TclTkAquaBI

0
Keith
12/6/2006 11:19:51 AM
comp.sys.mac.apps 21416 articles. 3 followers. xxx613 (1334) is leader. Post Follow

9 Replies
757 Views

Similar Articles

[PageSpeed] 34

Keith <spam@invalid.invalid> wrote:
#  Over the last couple of weeks I have been trying to figure out why I
# had no communications with a USB > Serial converter and tonight I
# discovered that there is no serial port support in the TCL/TK
# installed in MAC OS X 10.4 Mac mini. 

It's been awhile since I used the serial port adaptor, but
all I had to do was open the appropriate /dev/devicefile
(which changed based on which USB port I plugged in the adaptor).

# % fconfigure stdin
# -blocking 1 -buffering line -buffersize 4096 -encoding utf-8 -eofchar
# {} -translation auto

This isn't serial port configuration but normal input
file configuration.

# I went to the Mac install on the CD-ROMs and found nothing on tcl/tk.
# What should I use to remove the old TCL/TK packages and install a
# better version? I found the aqua site tcl site and should I just
# install that full package binary and make the change or does Mac mini
# have more surprises in store for me? 

I did something like
	set channel [open /dev/cu.KeyUSA28X21.1 r+]
	fconfigure $channel -mode ... ...

(cu is a bsdism for dial out serial ports - don't wait for ring
indicator to open. /dev/tty serial ports wait for ring indicator.)

--
SM Ryan http://www.rawbw.com/~wyrmwif/
Why are we here?
whrp
0
SM
12/6/2006 12:15:46 PM
On Wed, 06 Dec 2006 12:15:46 -0000, SM Ryan
<wyrmwif@tango-sierra-oscar-foxtrot-tango.fake.org> wrote:

>Keith <spam@invalid.invalid> wrote:
>#  Over the last couple of weeks I have been trying to figure out why I
># had no communications with a USB > Serial converter and tonight I
># discovered that there is no serial port support in the TCL/TK
># installed in MAC OS X 10.4 Mac mini. 
>
>It's been awhile since I used the serial port adaptor, but
>all I had to do was open the appropriate /dev/devicefile
>(which changed based on which USB port I plugged in the adaptor).
>
># % fconfigure stdin
># -blocking 1 -buffering line -buffersize 4096 -encoding utf-8 -eofchar
># {} -translation auto
>
>This isn't serial port configuration but normal input
>file configuration.
>
># I went to the Mac install on the CD-ROMs and found nothing on tcl/tk.
># What should I use to remove the old TCL/TK packages and install a
># better version? I found the aqua site tcl site and should I just
># install that full package binary and make the change or does Mac mini
># have more surprises in store for me? 
>
>I did something like
>	set channel [open /dev/cu.KeyUSA28X21.1 r+]
>	fconfigure $channel -mode ... ...
>
>(cu is a bsdism for dial out serial ports - don't wait for ring
>indicator to open. /dev/tty serial ports wait for ring indicator.)

 I have tried the /dev/cu. settings also and it will not work. I have
tried with 5 different serial devices and it will not work. However I
can bring up minicom and communicate with the device with any of the
USB to serial converters.
 
0
Keith
12/6/2006 12:55:28 PM
On 2006-12-06, Keith <spam@invalid.invalid> wrote:
> On Wed, 06 Dec 2006 12:15:46 -0000, SM Ryan
><wyrmwif@tango-sierra-oscar-foxtrot-tango.fake.org> wrote:
>
>>Keith <spam@invalid.invalid> wrote:
>>#  Over the last couple of weeks I have been trying to figure out why I
>># had no communications with a USB > Serial converter and tonight I
>># discovered that there is no serial port support in the TCL/TK
>># installed in MAC OS X 10.4 Mac mini. 
>>
>>It's been awhile since I used the serial port adaptor, but
>>all I had to do was open the appropriate /dev/devicefile
>>(which changed based on which USB port I plugged in the adaptor).
>>
>># % fconfigure stdin
>># -blocking 1 -buffering line -buffersize 4096 -encoding utf-8 -eofchar
>># {} -translation auto
>>
>>This isn't serial port configuration but normal input
>>file configuration.
>>
>># I went to the Mac install on the CD-ROMs and found nothing on tcl/tk.
>># What should I use to remove the old TCL/TK packages and install a
>># better version? I found the aqua site tcl site and should I just
>># install that full package binary and make the change or does Mac mini
>># have more surprises in store for me? 
>>
>>I did something like
>>	set channel [open /dev/cu.KeyUSA28X21.1 r+]
>>	fconfigure $channel -mode ... ...
>>
>>(cu is a bsdism for dial out serial ports - don't wait for ring
>>indicator to open. /dev/tty serial ports wait for ring indicator.)
>
>  I have tried the /dev/cu. settings also and it will not work. I have
> tried with 5 different serial devices and it will not work. However I
> can bring up minicom and communicate with the device with any of the
> USB to serial converters.
>  

In Linux you can see the mode line

fconfigure stdin 
-blocking 1 -buffering line -buffersize 4096 -encoding utf-8 -eofchar {} 
-translation auto -mode 38400,n,8,1 -xchar { }


-- 
Best Regards, Keith
0
Keith
12/6/2006 1:05:49 PM
Keith wrote:

>  Over the last couple of weeks I have been trying to figure out why I
> had no communications with a USB > Serial converter and tonight I
> discovered that there is no serial port support in the TCL/TK
> installed in MAC OS X 10.4 Mac mini.
> 

AFAIK there is NO serial support for the MAC in Tcl/Tk. This was certainly
the case a year or so ago when I wrote a serial port based microcontroller
programmer for Linux, Windows and the Mac in Tcl/Tk. PC support was there
but there was none at all for the Mac.

Ian
0
Ian
12/6/2006 5:38:14 PM
On 6 Dec 2006 13:05:49 GMT, Keith <spam@invalid.invalid> wrote:

>On 2006-12-06, Keith <spam@invalid.invalid> wrote:
>> On Wed, 06 Dec 2006 12:15:46 -0000, SM Ryan
>><wyrmwif@tango-sierra-oscar-foxtrot-tango.fake.org> wrote:
>>
>>>Keith <spam@invalid.invalid> wrote:
>>>#  Over the last couple of weeks I have been trying to figure out why I
>>># had no communications with a USB > Serial converter and tonight I
>>># discovered that there is no serial port support in the TCL/TK
>>># installed in MAC OS X 10.4 Mac mini. 
>>>
>>>It's been awhile since I used the serial port adaptor, but
>>>all I had to do was open the appropriate /dev/devicefile
>>>(which changed based on which USB port I plugged in the adaptor).
>>>
>>># % fconfigure stdin
>>># -blocking 1 -buffering line -buffersize 4096 -encoding utf-8 -eofchar
>>># {} -translation auto
>>>
>>>This isn't serial port configuration but normal input
>>>file configuration.
>>>
>>># I went to the Mac install on the CD-ROMs and found nothing on tcl/tk.
>>># What should I use to remove the old TCL/TK packages and install a
>>># better version? I found the aqua site tcl site and should I just
>>># install that full package binary and make the change or does Mac mini
>>># have more surprises in store for me? 
>>>
>>>I did something like
>>>	set channel [open /dev/cu.KeyUSA28X21.1 r+]
>>>	fconfigure $channel -mode ... ...
>>>
>>>(cu is a bsdism for dial out serial ports - don't wait for ring
>>>indicator to open. /dev/tty serial ports wait for ring indicator.)
>>
>>  I have tried the /dev/cu. settings also and it will not work. I have
>> tried with 5 different serial devices and it will not work. However I
>> can bring up minicom and communicate with the device with any of the
>> USB to serial converters.
>>  
>
>In Linux you can see the mode line
>
>fconfigure stdin 
>-blocking 1 -buffering line -buffersize 4096 -encoding utf-8 -eofchar {} 
>-translation auto -mode 38400,n,8,1 -xchar { }

Here is what I did to get serial port communication to work:
Installed Activestate tcl 
ActiveTcl8.4.14.0.272572-macosx-universal-threaded.dmg
rebooted
Still no serial port working
uninstalled active TCL 
( I did this twice.) 

Plugged in my serial device 
installed  activestate 
Now when I use TCLSH i get

fconfigure stdin
-blocking 1 -buffering line -buffersize 4096 -encoding utf-8 -eofchar
{} -translation auto -mode 9600,n,8,1 -xchar { }

and I now have communication with serial devices. Remember I have a
Mac mini so this may just be a problem with mac mini's or maybe there
was an installation problem from Apple Plant. Hopefully if someone has
this problem again this thread will help them solve it. 

 It was very frustating to go through this technical glitch and thanks
to the freenode ##mac IRC guys with helping me narrow down this
problem.  

0
Keith
12/6/2006 6:05:03 PM
Ian Bell wrote:
> Keith wrote:
>
> >  Over the last couple of weeks I have been trying to figure out why I
> > had no communications with a USB > Serial converter and tonight I
> > discovered that there is no serial port support in the TCL/TK
> > installed in MAC OS X 10.4 Mac mini.
> >
>
> AFAIK there is NO serial support for the MAC in Tcl/Tk. This was certainly
> the case a year or so ago when I wrote a serial port based microcontroller
> programmer for Linux, Windows and the Mac in Tcl/Tk. PC support was there
> but there was none at all for the Mac.

Tcl serial support on the Mac was certainly around a year ago when you
wrote that program. But not MacOS Classic. Tcl on MacOS X have always
(in my experience, I may be wrong) supported serial ports barring the
funky problems with Keyspan USB dongles.

BTW, I remember using an extension on Mac Classic which allowed Tcl to
access the RS422 based printer and modem ports. But Googling just now
turned up nothing.

0
slebetman (894)
12/7/2006 8:02:46 AM
On Wed, 06 Dec 2006 10:05:03 -0800, Keith <spam@invalid.invalid>
wrote:

>On 6 Dec 2006 13:05:49 GMT, Keith <spam@invalid.invalid> wrote:
>
>>On 2006-12-06, Keith <spam@invalid.invalid> wrote:
>>> On Wed, 06 Dec 2006 12:15:46 -0000, SM Ryan
>>><wyrmwif@tango-sierra-oscar-foxtrot-tango.fake.org> wrote:
>>>
>>>>Keith <spam@invalid.invalid> wrote:
>>>>#  Over the last couple of weeks I have been trying to figure out why I
>>>># had no communications with a USB > Serial converter and tonight I
>>>># discovered that there is no serial port support in the TCL/TK
>>>># installed in MAC OS X 10.4 Mac mini. 
>>>>
>>>>It's been awhile since I used the serial port adaptor, but
>>>>all I had to do was open the appropriate /dev/devicefile
>>>>(which changed based on which USB port I plugged in the adaptor).
>>>>
>>>># % fconfigure stdin
>>>># -blocking 1 -buffering line -buffersize 4096 -encoding utf-8 -eofchar
>>>># {} -translation auto
>>>>
>>>>This isn't serial port configuration but normal input
>>>>file configuration.
>>>>
>>>># I went to the Mac install on the CD-ROMs and found nothing on tcl/tk.
>>>># What should I use to remove the old TCL/TK packages and install a
>>>># better version? I found the aqua site tcl site and should I just
>>>># install that full package binary and make the change or does Mac mini
>>>># have more surprises in store for me? 
>>>>
>>>>I did something like
>>>>	set channel [open /dev/cu.KeyUSA28X21.1 r+]
>>>>	fconfigure $channel -mode ... ...
>>>>
>>>>(cu is a bsdism for dial out serial ports - don't wait for ring
>>>>indicator to open. /dev/tty serial ports wait for ring indicator.)
>>>
>>>  I have tried the /dev/cu. settings also and it will not work. I have
>>> tried with 5 different serial devices and it will not work. However I
>>> can bring up minicom and communicate with the device with any of the
>>> USB to serial converters.
>>>  
>>
>>In Linux you can see the mode line
>>
>>fconfigure stdin 
>>-blocking 1 -buffering line -buffersize 4096 -encoding utf-8 -eofchar {} 
>>-translation auto -mode 38400,n,8,1 -xchar { }
>
>Here is what I did to get serial port communication to work:
>Installed Activestate tcl 
>ActiveTcl8.4.14.0.272572-macosx-universal-threaded.dmg
>rebooted
>Still no serial port working
>uninstalled active TCL 
>( I did this twice.) 
>
>Plugged in my serial device 
>installed  activestate 
>Now when I use TCLSH i get
>
>fconfigure stdin
>-blocking 1 -buffering line -buffersize 4096 -encoding utf-8 -eofchar
>{} -translation auto -mode 9600,n,8,1 -xchar { }
>
>and I now have communication with serial devices. Remember I have a
>Mac mini so this may just be a problem with mac mini's or maybe there
>was an installation problem from Apple Plant. Hopefully if someone has
>this problem again this thread will help them solve it. 
>
> It was very frustating to go through this technical glitch and thanks
>to the freenode ##mac IRC guys with helping me narrow down this
>problem.  


 Please see
http://aspn.activestate.com/ASPN/docs/ActiveTcl/8.4/at.install.html
for help installing TCL/TK with from active state.
0
Keith
12/7/2006 9:25:06 AM
slebetman@yahoo.com wrote:

> Ian Bell wrote:
>> Keith wrote:
>>
>> >  Over the last couple of weeks I have been trying to figure out why I
>> > had no communications with a USB > Serial converter and tonight I
>> > discovered that there is no serial port support in the TCL/TK
>> > installed in MAC OS X 10.4 Mac mini.
>> >
>>
>> AFAIK there is NO serial support for the MAC in Tcl/Tk. This was
>> certainly the case a year or so ago when I wrote a serial port based
>> microcontroller programmer for Linux, Windows and the Mac in Tcl/Tk. PC
>> support was there but there was none at all for the Mac.
> 
> Tcl serial support on the Mac was certainly around a year ago when you
> wrote that program. But not MacOS Classic. Tcl on MacOS X have always
> (in my experience, I may be wrong) supported serial ports barring the
> funky problems with Keyspan USB dongles.
> 
> BTW, I remember using an extension on Mac Classic which allowed Tcl to
> access the RS422 based printer and modem ports. But Googling just now
> turned up nothing.

Then someone needs to update man open which states "Opening a serial port is
not currently implemented under Macintosh"

Ian
0
ruffrecords (178)
12/7/2006 4:58:43 PM
Ian Bell wrote:
> slebetman@yahoo.com wrote:
> > Tcl serial support on the Mac was certainly around a year ago when you
> > wrote that program. But not MacOS Classic. Tcl on MacOS X have always
> > (in my experience, I may be wrong) supported serial ports barring the
> > funky problems with Keyspan USB dongles.
> >
> > BTW, I remember using an extension on Mac Classic which allowed Tcl to
> > access the RS422 based printer and modem ports. But Googling just now
> > turned up nothing.
>
> Then someone needs to update man open which states "Opening a serial port is
> not currently implemented under Macintosh"
>
> Ian

Modern MacOS falls under Unix. Macintosh in the documentation refers to
MacClassic. Almost everything that refers Unix in the documentation is
applicable to MacOS X*. Unfortunately the documentation itself doesn't
state this.

* Note: even Tcl itself will recognise MacOS X as unix, not macintosh
when you look at $tcl_platform.

0
slebetman (894)
12/8/2006 1:26:22 AM
Reply: