Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   automatic IP FRC team changer by:CFR #4966 (http://www.chiefdelphi.com/forums/showthread.php?t=127137)

Cbastias4966 24-02-2014 14:34

automatic IP FRC team changer by:CFR #4966
 
Hi:

My name is camilo, from condor force robot (Chile). We created a application that change the ip of your team for connect to the crio automatically, without enter to control panel, and network configuration.This application decreases the work of configuring your ip every moment that you want connect to the robot,it's more quickly.
Application only runs in windows 7 and windows 8.

download here

PD: any problem, contact to cbastias@condorforcerobot.cl :D

thanks.
atte
Camilo Bastias
#4966
Condor Force robot

AlexBrinister 24-02-2014 18:46

Re: automatic IP FRC team changer by:CFR #4966
 
You could just write a batch script for that.

Code:

netsh interface ip set address "<interface name>" static <addr> <netmask> <gateway>
netsh interface ip set dns "<interface name>" static <dns_addr>

Make a file called robotIp.bat and run as Admin

Alex Brinister

Cbastias4966 24-02-2014 19:23

Re: automatic IP FRC team changer by:CFR #4966
 
Quote:

Originally Posted by AlexBrinister (Post 1349164)
You could just write a batch script for that.

Code:

netsh interface ip set address "<interface name>" static <addr> <netmask> <gateway>
netsh interface ip set dns "<interface name>" static <dns_addr>

Make a file called robotIp.bat and run as Admin

Alex Brinister

this .exe do that, without edit the batch script

cmwilson13 24-02-2014 19:27

Re: automatic IP FRC team changer by:CFR #4966
 
the driver station already does it as well i believe

Greg McKaskle 24-02-2014 19:54

Re: automatic IP FRC team changer by:CFR #4966
 
The driver station checks the IP info -- using netsh. If it doesn't meet the expected settings, it will set it to a static IP.

It does not automatically restore the settings, but it does create a restore file and script in the Public Documents directory named "FRC Restore My Network Settings.bat".

You could pretty easily put an alias to it on the desktop.

Greg McKaskle

AlexanderTheOK 26-02-2014 01:23

Re: automatic IP FRC team changer by:CFR #4966
 
The script the driver station uses doesn't revert the IP settings back to dhcp as far as I remember, you'd have to make that part with your own batch file. Its a pretty simple command though:

Code:

netsh interface ip set address "<your internet name>" dhcp
?

I think thats right. My sleep schedule has been wrecked lately but I think that't it. :)

Greg McKaskle 27-02-2014 06:03

Re: automatic IP FRC team changer by:CFR #4966
 
If the DS changes the IP settings, it performs a dump to a text file. It doesn't explicitly set the PC to DHCP, but attempts to restore it to how it initially found it. Originally, it was going to restore when quitting, but this was actually quite annoying, especially on a programming laptop. This step needed to be independent of the DS.

Below is the documentation on dump. I haven't used it in years.

Greg McKaskle



C:\Windows\system32>netsh interface ip dump /?

Usage: dump

Remarks:
Creates a script that contains the current configuration. If saved to a
file, this script can be used to restore altered configuration settings.


All times are GMT -5. The time now is 02:34.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi