I would suspect that the router is nothing more than a straight raw TCP/IP connection -- similar to using telnet to connect to a POP or SMTP server or even HTTP. I would first use something like Ethereal to trace the connection and see what data goes back and forth, probably straight ASCII text -- nothing binary. If that is all it is you can simply use java to connect to the system and write some data (send the appropriate command). Then just read data until you receive some "end-of-line" token. Make sure you get the end-of-line characters correct, because some protocols will interpret them differently.
I suspect all you really need is
Socket(InetAddress, port)
Socket.getOutputStream() - for sending the commands
Socket.getInputStream() - for receiving the output
Last edited by a-j; 02-16-2005 at 11:06 PM..
|