Page 1 of 1

UDPTerminal

Posted: Mon Jun 23, 2008 11:44 am
by bbracken
It certainly would be nice if UDPTerminal had a mode to capture incoming packets (just the data portion). I always need to get data out of an NB for testing and debugging purposes. Typically I printf to the serial port (usually in comma delimited format) and have to capture the serial data via HyperTerm or MTTY (which by the way periodically causes my laptop to run out of virtual memory -- HyperTerm doesn't exhibit this problem). If UDPTerminal had a capture to file capability, I would be able to simply send my command delimited data via UDP. This would certainly be a lot faster.

bb

Re: UDPTerminal

Posted: Mon Jun 23, 2008 12:46 pm
by Chris Ruff
:shock: Run out of virtual memory?? Strange, I might run 3 of these at once all of the time and I have never seen that problem. (But I don't use eclipse)

Chris

Re: UDPTerminal

Posted: Mon Jun 23, 2008 5:53 pm
by bbracken
Chris,

The MTTY issue isn't using an Eclipse generated application. I think it has to do with the USB serial. Strange thing is that it never happens if I use HyperTerm.

Bill Bracken

Re: UDPTerminal

Posted: Sun Jul 27, 2008 9:51 pm
by thomastaranowski
Bill, I feel your pain. Usually I just work up a quick python script to capture, and print the results to stdio. It ends up being a 2-3 liner, which I'd paste here if I had it handy on my laptop. The long version ends up being something like this (untested):

from socket import *
s = socket(AF_INET, SOCK_DGRAM)
host = "localhost"
port = 514
buf = 1470
addr = (host, port)
s.bind(addr)
while 1:
data, addr = s.recvfrom(buf)
print buf

Re: UDPTerminal

Posted: Mon Aug 25, 2008 4:15 pm
by bbracken
When I get some time I think I will implement a class for UDPLogging. You create an instance (or multiple instances) of the UDPLogger in the NB. I'll then write a PC app which will be able to ask for all the loggers defined. You can then dynamically change IP address of the logger, enable/disable it, change the port... or whatever else needs to be done. I've done something close on the NB already and on the PC end I just have a console application where you specify a port to receive on and a filename if you want to store the data received.