i used a made a nasty pgm that connect through tcp to the openocd tcl interface (port 4444), and to get openocd to do stuff i have send a \n for example, "reset" will not do anything, but "reset\n" does what it's supposed to do. haven't tried the gdb port.
salú! On Fri, Jul 1, 2011 at 6:04 PM, Maxim Cournoyer <[email protected]> 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 > [email protected] > https://lists.berlios.de/mailman/listinfo/openocd-development > > -- Rodrigo. _______________________________________________ Openocd-development mailing list [email protected] https://lists.berlios.de/mailman/listinfo/openocd-development
