I made these batch files to switch between Static IP and DHCP in Windows. I use them because I use my laptop’s Wireless at school, and wired to program our robot, but at home I use the Wired.
To use them, just paste the commands in notepad and save as a .bat (EG: “cRIO Mode.bat” or “Internet Mode.bat”)
cRIO / Static IP Mode:
@echo off
netsh interface ip set address name="Local Area Connection" static 10.23.34.6 255.0.0.0 10.23.34.4 1
pause
NOTE: You need to change the addresses to your team number. We are 10.23.34.*, but you probably aren’t!
DHCP Mode:
@echo off
netsh interface ip set address "Local Area Connection" dhcp
pause
~DtD
PS> If you typically use a static IP when not talking to your robot, and you need to configure DNS servers too, then use these commands:
netsh interface ip set dns "Local Area Connection" static 208.67.222.222
netsh interface ip add dns "Local Area Connection" 208.67.220.220 index=2
In general, I have noticed that the cRIO and friends are MUCH less finicky about what thier IPs are and such. We only used static for reimaging the cRIO. I have tested numerous network configurations, and both Windriver and the Driver Station (Updated One) seem to always find it.
EG: One of the configs I did was:
cRIO <-> WiFi Brick (The black one)
WiFi Router (One with the blue spoiler) <-> Internet
My dev laptop and Driver Station connected to WiFi router over WiFi. (DS needs to be updated or this fails, set up WiFi network in Developer)
If you do use WiFi with the Classmate, I HIGHLY advise you delete the WiFi profile before competition, the Classmate did not like it with WiFI attempting to work and connection over LAN.