your script worked with port 4444 (telnet port) (copy+paste and swap 6666 with 4444)
On Fri, Jul 1, 2011 at 6:04 PM, Maxim Cournoyer <maxim.courno...@gmail.com> wrote: > Hi all, > > I would like to know the details about controlling openocd via TCP/IP (port > 6666). I have been experimenting with it, and I hope I'm doing something > wrong, because it does not seem to work. > > I can connect to the openocd server, but any "command word" such as "reset" > or "halt", sent has no effect. By studying the loopback network TCP/IP > activity with Wireshark, I was able to see that the openocd server returns > one ACK message after each command sent by the client, but no data > (length=0). > > The openocd version I used was compiled from today's git sources. > > For issuing TCP/IP messages, the following tcl program was used (based on a > snippet posted by Charles Hardin): > > #!/usr/bin/tclsh > # Simple tcl client to test tcl_server > puts "Use empty line to exit" > set fo [socket localhost 6666] > puts -nonewline stdout "> " > flush stdout > while {[gets stdin line] > 0} { > puts "Message \"$line\" sent!" > puts $fo $line > flush $fo > > # #OPENOCD SERVER ONLY RETURNS ACKS (NO DATA), SO THE "GETS" IS BLOCKING > # puts "Waiting for server response" > # if {[eof $fo] || [catch {gets $fo line}]} { > # close $fo > # puts "Connection or server error." > # } else { > # puts "Server returned: $line" > # } > > puts -nonewline stdout "> " > flush stdout > } > close $fo > > I have also attached some Wireshark captured data, in plain text format. > > Thank you! > _______________________________________________ > Openocd-development mailing list > Openocd-development@lists.berlios.de > https://lists.berlios.de/mailman/listinfo/openocd-development > > -- Rodrigo. _______________________________________________ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development