Configuration tool for FIRST Robotics Competition Robot Radios
- Using Golang provides a high speed, native binary upon compilation. This prevents decompilation to usable source code.
- There are no pre-requisites to running a Go binary, as it has all the needed libraries and runtimes compiled into the binary.
- Immense amount low level support and libraries.
This configuration tool is a re-write of the current Radio Configuration tool, with a few key differences.
- No longer written in Java, so decompilation to gain access to the source is no longer possible (Go compiles to machine code.)
- Connection protocol is now encrypted - no longer possible to intercept and steal credentials without serious work.
- Embedded TFTP Server for imaging (removes the need of ap51-flash.exe)
- Listens for ARP requests to identify the model of radio
Because of the requirement of needing to intercept ARP packets, use of Google's gopacket library is required.
Gopacket requires cgo as it binds to the C libpcap.h
header.
-
Install go_amd64 (add go binaries to your PATH)
-
Install TDM GCC x64 (add TDM-GCC binaries to your PATH) - Make sure to click the x86 and x64 option for TDM GCC.
-
Also add TDM-GCC\x86_64-w64-mingw32\bin to your PATH
-
Install Winpcap
-
Download Winpcap developer's pack and extract it to C:\
-
Find wpcap.dll and packet.dll in your PC (typically in c:\windows\system32 copy them to some other temp folder or else you'll have to supply Admin privs to the following commands
gendef wpcap.dll
, andgendef packet.dll
-
Now we'll generate the static libraries files: Run
dlltool --as-flags=--64 -m i386:x86-64 -k --output-lib libwpcap.a --input-def wpcap.def
Anddlltool --as-flags=--64 -m i386:x86-64 -k --output-lib libpacket.a --input-def packet.def
-
Now just copy both libwpcap.a and libpacket.a to C:\WpdPack\Lib\x64
Win x64 compilation instructions from Stack Overflow
Create a cycle system of sorts for each team (From team number entered to configuration completed)- Code cleanup, remove un-needed code, and document
Figure out a flow of operations for how the cycle will work- Resources (images, firmwares) added to the go-bindata resource folder.- Setup an rsrc script to inject the manifest into the final exe- Unit testing setup- Encryption for configuration.- TFTP Server setup- ARP Listener setup
- Tool opens
- Team enters their number
- Instructions are on the page
- Selects either program, or image buttons.
- On selecting the program button, it sends the configuration string to the team. (pending changes to the config string and system) Return to main screen.
- On selecting the image button, listens for ARP request, get radio model, flash radio model via tftp. Return to main screen.
- Tool opens
- Team enters their number
- Instructions are on the page
- Selects "Program"
- Listens for ARP string and gets model
- Flashes radio with image
- Upon the radio booting up again, the radio is configured
- config
- Used to hold all configuration values that changes different parts of the program
- fileio
- Used to read and parse OpenWRT Image files as well as the WPA Key CSV.
- gui
- Handles the GUI
- imaging
- Used for flashing, and configuration of the router
- netconfig
- Network based configuration, also handles network protocols.
- resources
- Holds images, and any embedded resources
- util
- Utility functions and methods