Go to Post I think FIRST is a big trap. They lure you in with these cool competitions and shiny robots and along the way they trick you into learning something :) - =Martin=Taylor= [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 05-12-2011, 21:41
Lightfoot26's Avatar
Lightfoot26 Lightfoot26 is offline
Just Out For A Rip, Bud...
AKA: Seth Lightfoot
FRC #1625 (Winnovation)
Team Role: Mentor
 
Join Date: Dec 2009
Rookie Year: 2010
Location: Winnebago, IL
Posts: 120
Lightfoot26 is just really niceLightfoot26 is just really niceLightfoot26 is just really niceLightfoot26 is just really niceLightfoot26 is just really nice
One less thing to worry about?

Ok, I don't how it works with you guys and your team, but for us, electrical and programming are kinda mashed into one and there is one to two people that are really involved on the sub team at all. Well this year, I'm that guy. Now when we do PR events we like to have someone with a base of knowledge in electrical/programming to both talk to people, and fix problems. Well I'm a busy man, and can't make every event. Soooooo I have started to build a base of resources and help for the "mechys" to follow when I am unavailable. Currently I am writing a .bat on a thumbdrive so the can plug it in, hit go, and it walks them through/does it for them, set up a router, bridge, and ds, from default settings... this is where i need YOU! I would like to make it click go and boom, done, but this is nearly impossible, so things done physically i plan on just doing "echo (instructions) pause" now ive also been playing around with importing a routers config file ect ect... so basically, i want a thumb drive that when plugged in, has a batch file that will set all the necessary network devices to get it working. (it seems the wireless networking is what most of my mechanical friends call me about) Thoughts, Input, examples, maybe the file itself already exists?? ahhaha thanks all!
__________________
Winnovation Team 1625 (2010-??)
  • Electrical/Programming Captain (2011-2013)
  • Auxiliary Driver (2012-2013)
  • Team Captain (2013)
  • Alumni (Graduated May 2013)
  • Electrical and Programming Mentor (2014-??)
  #2   Spotlight this post!  
Unread 05-12-2011, 22:53
MattC9's Avatar
MattC9 MattC9 is offline
Registered User
no team
Team Role: Alumni
 
Join Date: Nov 2010
Rookie Year: 2009
Location: Texas
Posts: 435
MattC9 has a spectacular aura aboutMattC9 has a spectacular aura aboutMattC9 has a spectacular aura about
Re: One less thing to worry about?

If you do this please share because I have come into to many situations like this.
  #3   Spotlight this post!  
Unread 11-12-2011, 21:10
Lightfoot26's Avatar
Lightfoot26 Lightfoot26 is offline
Just Out For A Rip, Bud...
AKA: Seth Lightfoot
FRC #1625 (Winnovation)
Team Role: Mentor
 
Join Date: Dec 2009
Rookie Year: 2010
Location: Winnebago, IL
Posts: 120
Lightfoot26 is just really niceLightfoot26 is just really niceLightfoot26 is just really niceLightfoot26 is just really niceLightfoot26 is just really nice
Re: One less thing to worry about?

I started writing it....
@echo off
color 57
echo Welcome to Seth's epic radio setting program!
pause
cls
echo by inserting this flashdrive you have activated my robot wireless network configuration program. This program is designed to alter both your computer settings router and bridge.
set /p z=Would you like the program to continue editing your current settings (y/n)?
if /i "%z%" EQU "y" GOTO :yes
if /i "%z%" EQU "n" GOTO :no

:yes


echo You have selected yes! Configuration will continue on keypress!
pause
cls
echo Before we begin configuration please be sure that you have the bridge on the robot powered on and connected to the cRio. Now connect the field router to this machine (be sure you aren't in the internet uplink port on the router!!!!) PLEASE NOTE: The current version of this program requires you to manually reset the bridge and router to factory defaults. Please ensure you have completed that first. Configuration will continue on keypress.
pause
cls
echo Configuration Proceeding
timeout 3
echo Setting IP address and Subnet
netsh interface ip set address name="Local Area Connection" source=static addr=192.168.1.104 mask=255.255.255.0
echo Setting Gateway
netsh interface ip set address name="Local Area Connection" gateway=192.168.1.1 gwmetric=0
echo Done!
timeout 5
cls
echo Here are the new settings on this machine
netsh interface ip show addresses "Local Area Connection"
pause
echo now that your computer has the neccessary settings, the program will now open the GUI on the router. The username and password is admin and admin respectively. Remember Internet Explorer will launch and cover this program, remember to bring it back to the front to continue with instruction.
pause
cls
start iexplore.exe 192.168.1.1
echo Now that you are logged in navigate to the administartion tab, and the configuration management. Click the button that says "Restore"
echo.
echo now restore with the file named "Router Configuration". Navigate to this file on keypress.
pause
cls
start S:\armory
echo after Router Configuration has been loaded, proceed with setup by pressing any key.
pause
echo Congratz! ur router haz the appropriate settings!! Now unplug this machine form the router and plug it into an open port on the bridge. Ensure your bridge is powered on. Continue on keypress after all this has been completed.
pause
cls
echo Configuration Proceeding
timeout 3
echo Setting IP address and Subnet
netsh interface ip set address name="Local Area Connection" source=static addr=192.168.0.51 mask=255.255.255.0
echo Setting Gateway
netsh interface ip set address name="Local Area Connection" gateway=192.168.0.50 gwmetric=0
echo Done!
timeout 5
cls
echo Here are the new settings on this machine
netsh interface ip show addresses "Local Area Connection"
pause
cls
echo Now, once again the program will now load the robots radio's GUI. Please note this program is running in the background, after IE is launched bring this program back to the front to continue instruction. It will launch on keypress.
pause
start iexplore.exe 192.168.0.50
echo the Username is admin and the password is left blank. Once you are in, navigate to the Mantainence tab. Once there pick System on the left sidebar. Choose "Load from Local Harddrive" you want to load S:/armory/bridge Configuration. it will open on keypress.
pause
cls
start S:\armory
echo after everything has been loaded to both the Router and Robot Radio, plug this machine back into the router. (MAKE SURE IT ISN'T IN THE INTERNET UPLINK PORT!) After this is completed, press any key.
pause
echo OK! Now we are almost done! This will set this machines network settings to what it needs to control the robot.
pause
cls
echo Configuration Proceeding
timeout 3
echo Setting IP address and Subnet
netsh interface ip set address name="Local Area Connection" source=static addr=10.16.25.5 mask=255.0.0.0
echo Setting Gateway
netsh interface ip set address name="Local Area Connection" gateway=10.16.25.4 gwmetric=0
echo Done!
timeout 5
cls
echo Here are the new settings on this machine
netsh interface ip show addresses "Local Area Connection"
pause
cls
echo CONGRATZ!! You are all ready to go! On keypress the program will launch driverstation! you should be good to go. If there are still problems, call me, seth, or refer to the Readme. in S:
pause
cls
echo have fun!!! Love Seth.
pause
start driver station.exe
exit

:no


echo You have selected no and have quite possibly made the worst decision of your miserable life! Program will close on keypress!
pause
cls
exit
__________________
Winnovation Team 1625 (2010-??)
  • Electrical/Programming Captain (2011-2013)
  • Auxiliary Driver (2012-2013)
  • Team Captain (2013)
  • Alumni (Graduated May 2013)
  • Electrical and Programming Mentor (2014-??)
  #4   Spotlight this post!  
Unread 11-12-2011, 21:19
plnyyanks's Avatar
plnyyanks plnyyanks is offline
Data wins arguments.
AKA: Phil Lopreiato
FRC #1124 (The ÜberBots), FRC #2900 (The Mighty Penguins)
Team Role: College Student
 
Join Date: Apr 2010
Rookie Year: 2010
Location: NYC/Washington, DC
Posts: 1,114
plnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond repute
Re: One less thing to worry about?

I wrote a couple batch files last season for just setting my computer's IPs in between DCHP and FRC static, as well as for pinging the cRIO. Here's my IP change batch files, in case anyone's interested:

To Static:
Code:
@ECHO OFF
cls
ECHO Setting defualt FRC Static IP addresses:
ECHO Wireless Address: 10.11.24.7
ECHO Subnet: 255.255.255.0
ECHO Gateway: 10.11.24.1
netsh int ip set address "Wireless Network Connection" static 10.11.24.7 255.0.0.0 10.11.24.1 1
ECHO Done!
exit
To DHCP:
Code:
@ECHO OFF
cls
ECHO setting wireless adapter and DNS to DHCP
netsh interface ip set address name="Wireless Network Connection" dhcp
netsh interface ip set dns name="Wireless Network Connection" dhcp
ECHO Done!
__________________
Phil Lopreiato - "It's a hardware problem"
Team 1124 (2010 - 2013), Team 1418 (2014), Team 2900 (2016)
FRC Notebook The Blue Alliance for Android
  #5   Spotlight this post!  
Unread 11-12-2011, 23:01
MattC9's Avatar
MattC9 MattC9 is offline
Registered User
no team
Team Role: Alumni
 
Join Date: Nov 2010
Rookie Year: 2009
Location: Texas
Posts: 435
MattC9 has a spectacular aura aboutMattC9 has a spectacular aura aboutMattC9 has a spectacular aura about
Re: One less thing to worry about?

Sweet! so I am a programming illiterate (some what). I am not familiar with batch files, is there a tutorial somewhere, where I could learn how to compile and run this code?
  #6   Spotlight this post!  
Unread 11-12-2011, 23:33
WizenedEE's Avatar
WizenedEE WizenedEE is offline
Registered User
AKA: Adam
FRC #3238 (Cyborg Ferrets)
Team Role: Leadership
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Anacortes, WA
Posts: 395
WizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to all
Re: One less thing to worry about?

Quote:
Originally Posted by MattC9 View Post
Sweet! so I am a programming illiterate (some what). I am not familiar with batch files, is there a tutorial somewhere, where I could learn how to compile and run this code?
1. save as *.bat
2. double click

OR
1. Save on flashdrive as autorun.bat
2. Plug in flashdrive
  #7   Spotlight this post!  
Unread 12-12-2011, 16:04
plnyyanks's Avatar
plnyyanks plnyyanks is offline
Data wins arguments.
AKA: Phil Lopreiato
FRC #1124 (The ÜberBots), FRC #2900 (The Mighty Penguins)
Team Role: College Student
 
Join Date: Apr 2010
Rookie Year: 2010
Location: NYC/Washington, DC
Posts: 1,114
plnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond repute
Re: One less thing to worry about?

Quote:
Originally Posted by MattC9 View Post
Sweet! so I am a programming illiterate (some what). I am not familiar with batch files, is there a tutorial somewhere, where I could learn how to compile and run this code?
Yup, just save and run the file. Windows takes care of the rest (and double checks you want to modify your computer's settings).

If you want to learn to write batch files, they're basically a script of Windows shell commands. You can find some more information about them here.
__________________
Phil Lopreiato - "It's a hardware problem"
Team 1124 (2010 - 2013), Team 1418 (2014), Team 2900 (2016)
FRC Notebook The Blue Alliance for Android
  #8   Spotlight this post!  
Unread 14-12-2011, 23:23
Lightfoot26's Avatar
Lightfoot26 Lightfoot26 is offline
Just Out For A Rip, Bud...
AKA: Seth Lightfoot
FRC #1625 (Winnovation)
Team Role: Mentor
 
Join Date: Dec 2009
Rookie Year: 2010
Location: Winnebago, IL
Posts: 120
Lightfoot26 is just really niceLightfoot26 is just really niceLightfoot26 is just really niceLightfoot26 is just really niceLightfoot26 is just really nice
Re: One less thing to worry about?

Pretty sweet. It's really the exact IPv4 settings for everything that gets them confused... so I am basically setting their IP, hitting the GUI and telling them to load config files for each component from the same flashdrive. I'm working out the kinks... Read some of it above.... is there any changes or possible additions?? Right now, its on a flashdrive as an .exe via (.bat to .exe) with an autorun.ini a folder called "armory" which is all the resources and config files and the icon (winnovation logo!!! ) and a README i typed up including factory reset instructions... Our DAP-1522 is being a pain, I must work on it... also autorun is being sorta a pain, thats what im working on now, I must refine the actual .bat a little too. But Plug in flashdrive and BOOM! is really nice and worth the work in my eyes.
__________________
Winnovation Team 1625 (2010-??)
  • Electrical/Programming Captain (2011-2013)
  • Auxiliary Driver (2012-2013)
  • Team Captain (2013)
  • Alumni (Graduated May 2013)
  • Electrical and Programming Mentor (2014-??)
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 06:35.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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