slodahl
Technical User
- May 13, 2009
- 1
I've got a Tcl script that does some tests on hardware, and it works okay but I'd like to add a GUI and am having issues. The Tcl script interacts with a UART by spawning, then sending a command (using send), and then expecting a response from the hardware (using expect). As soon as I require the Tk package, the send command no longer allows me to send packets commands to the UART, since a new send process is loaded for Tk.
The code in question:
...
spawn -noech $uart "host=$host" "port=$port"
set $pid $spawn_id
send -i $pid "$cmd\r"
expect {
-i $pid
{...
The error code when package Tk is loaded:
bad option "-i": must be -async, -displayof, or --
Please let me know if you know of a workaround here.
The code in question:
...
spawn -noech $uart "host=$host" "port=$port"
set $pid $spawn_id
send -i $pid "$cmd\r"
expect {
-i $pid
{...
The error code when package Tk is loaded:
bad option "-i": must be -async, -displayof, or --
Please let me know if you know of a workaround here.