Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 7784501c2bf452765e80e087dd97be0c746ebf03
Ticket: 714d37c3aa71d087cc35afcc59edd5667d4048db
Cannot access COM10: and above in Windows
User & Date: twylite on 2014-09-09 14:01:27
Changes

  1. icomment:
    <p>"COM10:" is not a valid device name in Windows.  As explained in the <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/aa363858(v=vs.85).aspx">MSDN entry for CreateFile</a>: "To specify a COM port number greater than 9, use the following syntax: "\\.\COM10". This syntax works for all port numbers and hardware that allows COM port numbers to be specified."</p>
    
    <p>In Tcl you have to escape those backslashes, so you would use [open "\\\\.\\$comport" r+].</p>
    
    <p>The Tcl docs are misleading in this regard; they say "An attempt to open a serial port that does not exist or has a number greater than 9 will fail. An alternate form of opening serial ports is to use the filename \\.\comX, where X is any number that corresponds to a serial port...".  You can in fact open a serial port greater than 9 using the alternate form (only).</p>
    
  2. login: "twylite"
  3. mimetype: "text/html"
  4. username: "Twylite"