• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how to connect router using java application

 
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
i am new to network programing.i would like to connect to router.can any one please explain the procedure to connect router using telnet or ssh or http or snp.

Thanks & Regards,
Nagaraju
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That depends on what interface the router makes available. Then it's just a matter of sending the commands. Again, probably hardware-dependent.
UPNP may be an option as well, again, depending on your hardware.
 
NagarajGoud uppala
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Joe Ess wrote:That depends on what interface the router makes available. Then it's just a matter of sending the commands. Again, probably hardware-dependent.


Hi Joe Ess,
thanks for your information.on my router i can connect using telnet or ssh protocal.for connection my thinking is
1)create a Serversocket
2)using UrlConnect
we can do it. isn't it?
any further information appriciated

Thanks in advance,
Nagaraju.

 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you trying to write Java code that connects to the router and then issues commands to it programmatically? If so, neither a ServerSocket, nor the URLConnection class will be of much help.

The Apache Commons Net library contains a Telnet client library you could use.
 
Ranch Hand
Posts: 490
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

NagarajGoud uppala wrote:

Joe Ess wrote:That depends on what interface the router makes available. Then it's just a matter of sending the commands. Again, probably hardware-dependent.


Hi Joe Ess,
thanks for your information.on my router i can connect using telnet or ssh protocal.for connection my thinking is
1)create a Serversocket
2)using UrlConnect
we can do it. isn't it?
any further information appriciated

Thanks in advance,
Nagaraju.



You can either:

1. Implement telnet using Socket, since it seems you are wanting client functionality

2. Use a telnet or ssh library.
 
NagarajGoud uppala
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

1. Implement telnet using Socket, since it seems you are wanting client functionality

2. Use a telnet or ssh library.



Yes ok i will try if any problems raises i will ask here
reply
    Bookmark Topic Watch Topic
  • New Topic