zmanultra
Member level 2
serial communication in tcl
Hi all
this is my serial communication routine for reading or writing HOWEVER i get the following error..please help me i need to get over this stage...i dont know wot to do.
---------CODE---------
set serial [open com1: r+]
fconfigure $serial -mode "9600,n,8,1"
fconfigure $serial -blocking 0 -buffering none
while {1} {
set data [read $serial] ;# read ALL incoming bytes
set size [string length $data] ;# number of received byte, may be 0
if { $size } {
puts "received $size bytes: $data"
} else {
puts ""<no data>"
update ;# Display output, allow to close wish-window
}
error ------> "could not open "com1" " permission denied"
Hi all
this is my serial communication routine for reading or writing HOWEVER i get the following error..please help me i need to get over this stage...i dont know wot to do.
---------CODE---------
set serial [open com1: r+]
fconfigure $serial -mode "9600,n,8,1"
fconfigure $serial -blocking 0 -buffering none
while {1} {
set data [read $serial] ;# read ALL incoming bytes
set size [string length $data] ;# number of received byte, may be 0
if { $size } {
puts "received $size bytes: $data"
} else {
puts ""<no data>"
update ;# Display output, allow to close wish-window
}
error ------> "could not open "com1" " permission denied"