Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[Bug Tcl 8.1.1] Tcl/Tk 8.1.1 cannot handle COM ports higher than 9 in Windows

110 views
Skip to first unread message

azuc...@hotmail.com

unread,
Jul 7, 1999, 3:00:00 AM7/7/99
to

Tcl 8.1.1 Bug: Generated by Scriptics' bug entry form at
http://www.scriptics.com/support/bugForm.html
Responses to this post are encouraged.
------

Submitted by: Andrea Zuccollo
OperatingSystem: Windows NT
OperatingSystemVersion: 4, service pack 3
Extensions: 8.1.1, no extensione
CustomShell: none
Synopsis: Tcl/Tk 8.1.1 cannot handle COM ports higher than 9 in Windows

ReproducibleScript:
Hello,

We are running tcl/tk 8.1.1 under win/nt; we connected a digiboard
multi-serial port, with 16 extra com ports; when trying to open, say,
COM10: we get an error:

couldn't open "COM10:": no such file or directory

for ports from COM1: to COM9: we have no problems at all

to replicate:

dos> tclsh81
% set f [open "com10:" "r"]
couldn't open "com10:": no such file or directory
%

ObservedBehavior:
see above

DesiredBehavior:
we expect tcl/tk to support all the com ports defined on the system;
when opening an 'high' port, say COM11:, with a terminal program, we
have no problems

Comments:
it would be a pity to give up on tcl/tk, as our project was really speed
up by your tool; however, in the short term we'll need to use all of
the 16 ports on the digiboard device, so a fix or patch would really be
appreciated

Scott Redman

unread,
Jul 7, 1999, 3:00:00 AM7/7/99
to azuc...@hotmail.com
Tcl is calling the Win32 function OpenFile(), and it is failing.
Can you try debugging the code in tclWinChan.c? My guess is that
the Win32 API doesn't know how to handle those extra ports, but
that the card includes a DLL that does. Can you pipe output
of a program to COM10: from the DOS command prompt?

-- Scott Redman
-- Scriptics Corp.

Rolf Schroedter

unread,
Jul 12, 1999, 3:00:00 AM7/12/99
to
>
> We are running tcl/tk 8.1.1 under win/nt; we connected a digiboard
> multi-serial port, with 16 extra com ports; when trying to open, say,
> COM10: we get an error:
>
> couldn't open "COM10:": no such file or directory
>
> for ports from COM1: to COM9: we have no problems at all
>
> to replicate:
>
> dos> tclsh81
> % set f [open "com10:" "r"]
> couldn't open "com10:": no such file or directory
> %

I did a search at Deja for
"com-ports com10" in comp.os.ms-windows.programmer.win32
The suggestion there was to use a special notation for a filename
>com9:
set chan [open {\\.\com10} r]
or
set chan [open \\\\.\\com10 r]
should work.

Unfortunately I cannot test this on my system, so please give
a message whether it works.

IMO Tcl should not implement any work around for this Win32 "feature".

Regards,
Rolf.

---------------------------------------------------------------------
German Aerospace Center Rolf Schroedter
Inst. of Planetary Exploration Tel/Fax: +49 (30) 67055-416/384
Rudower Chaussee 5, D-12489 Berlin Internet: Rolf.Sc...@dlr.de

0 new messages