| |||||||||||
serial input - with MS windows Posted by TimT (TimT), 24 January 2005 I am trying to setup the serial port for use with windowsThe port is via the USB and looking at the settings it is com5 In Linux I have defined it using the code: set fp [open /dev/ttyUSB0] fconfigure $fp -blocking 1 -buffering none In Windows I have deflined it as: set fp [open com5] fconfigure $fp -blocking 1 -buffering none It comes back with the error: couldn't open "COM5": permission denied while executing "open COM5" What do I have to do to get permission? [I am using win98 if that makes any difference, it will be used on an old 98 machine] thanks Posted by TimT (TimT), 23 February 2005 To set up the serial port for windows use:set rsport [open com1: r+] fconfigure $rsport -mode "9600,n,8,1" -blocking 0 -buffering none tim Posted by Dimon (Dimon), 1 February 2006 on 02/23/05 at 17:07:03, TimT wrote:
- Yes, it's true. And I have a question about opening virtual COM ports with names over then COM10. As known, Tcl has a predefined names for serial ports starting from COM1 and endind with COM10. Is it possible to open and work with serial ports like COM11, COM12 etc? - I can run command set rsport [open COM11 r+] and get file ID but cannot operate with that file descriptor like with port. For example, when I try to run fconfigure $rsport -mode - I recieve an error: bad option "-mode": ........ And the 2-nd question: is it possible to open and work with USB devices with Tcl? Any ideas? Posted by admin (Graham Ellis), 1 February 2006 on 02/01/06 at 10:32:12, Dimon wrote:
You always ask really difficult questions! I'm sure it could be done by extending Tcl using some C, but as for doing it directly from Tcl ... it's probably do-able with the Active State version but I wouldn't know how; I'm not enough of a Windows expert, I'm afraid This page is a thread posted to the opentalk forum
at www.opentalk.org.uk and
archived here for reference. To jump to the archive index please
follow this link.
|
| ||||||||||
PH: 01144 1225 708225 • FAX: 01144 1225 793803 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho |