View Single Post
  #1   Spotlight this post!  
Unread 12-03-2009, 21:07
Eric Finn's Avatar
Eric Finn Eric Finn is offline
Registered User
FRC #0166 (Chop Shop)
Team Role: College Student
 
Join Date: May 2006
Rookie Year: 2005
Location: Merrimack, NH
Posts: 101
Eric Finn has a spectacular aura aboutEric Finn has a spectacular aura about
Send a message via AIM to Eric Finn
Lightbulb Simple Team Number to IP Address Utility

Ever wanted to set your computer's IP so that you would be able to communicate with your robot, but didn't want to hassle with all the dialogues required to do so in Windows? (Control Panel > Network Connections > Your Network Connection > Properties > Internet Protocol (TCP/IP) > Properties ...what a bore!)
Well, I have a solution! teamtoip takes your team # and your network interface name, and automatically sets your IP address and subnet mask!

Command line usage:
Code:
teamtoip [team] "Interface Name"
Where [team] is your team number and "Interface Name" is the name of the interface you want to change the IP of. Generally it is "Local Area Connection" or "Wireless Network Connection" for wired Ethernet or wireless, respectively.

This utility was created mainly for inspectors at competitions, who have to change their IP address for each individual robot they inspect, which is quite inconvenient.

I am posting it here for 2 reasons:
  1. More eyes looking can catch more issues. If you find anything wrong with my code, or even anything that can be improved upon, don't hesitate to email me.
  2. This will probably be useful to more than just inspectors. Team members who don't like screwing around with network interface configuration (and don't need the IP address to be set back to what it was before ;) as well as people who don't remember the IP address convention can use this.
So, without further ado, here is the program:

Source: http://goatsgomoo.arksaw.com/project...p/teamtoip.cpp
Binary [Windows]: http://goatsgomoo.arksaw.com/project...p/teamtoip.exe
__________________
It always takes longer than you expect, even when you take into account Hofstadter's Law.
--Hofstadter's Law

Reply With Quote