Re: serial communication with tcl



On 28 Feb, 15:12, grp62 <gr...@xxxxxxxx> wrote:
Hello,
I'd like to program with tcl language the serial ports of my arm
target (sam9260).
I built a rootfilesystem including the tcl package (tcl-8.4.9) with
buildroot.
On my target (kernel-2.6.23) when i tried to execute the following
commands

set serial [open /dev/ttyS0 RDWR]
fconfigure $serial -mode "115200,n,8,1"

here's the message i get:

bad option "-mode": should be one of -blocking, -buffering, -
buffersize, -encoding, -eofchar, or -
translation
while
executing
"fconfigure $serial -mode "115200,n,8,1" "

Any ideas ?
regards
Hi

Seems to work for me on Ubuntu 7.10
TkCon screen dump

loading history file ... 48 events added
buffer line limit: 512 max line length: unlimited
Main console display active (Tcl8.4.15 / Tk8.4.15)
(dp01) 49 % set fd [ open /dev/ttyS0 r+]
file6
(dp01) 50 % fconfigure $fd -mode "9600,n,8,1"
(dp01) 51 % close $fd
(dp01) 52 % set fd [ open /dev/ttyS0 RDWR]
file6
(dp01) 53 % fconfigure $fd -mode "9600,n,8,1"
(dp01) 54 % close $fd
(dp01) 57 % set fd [ open /dev/ttyS0 RDWR]
file6
(dp01) 58 % fconfigure $fd -mode "115200,n,8,1"
(dp01) 59 %
.



Relevant Pages

  • serial communication with tcl
    ... I'd like to program with tcl language the serial ports of my arm ... On my target when i tried to execute the following ...
    (comp.lang.tcl)
  • Re: Problems with Serial Downloader for PXA255
    ... >> Our target has two serial ports, so I am using one as a debug output ... >> When I attempt a download, the PC and the target exchange data packets ... >> I then modified the debug output to report the content of the packets ...
    (microsoft.public.windowsce.platbuilder)