KiCad has some built-in auto routing capabilities for laying out PCB wires. More advanced version, online auto-router from www.freerouting.net, can cooperate with KiCad and gives better results. FreeRouter however does not work in offline even after copying Java Web Start resources to local system; auto-router still checks internet access on startup. Irritated I hacked binaries and got rid of online check. Now you can make your auto-router working anytime.
Last year I started my play with home-made PCBs with EaglePCB, very popular software among hobbyists. I am working on project that may go commercial so I decided to move to KiCad because of obvious reason: licensing. EaglePCB has spoiled me with auto routing capabilities which I was using in first attempts to lay out wires on prototype boards to save on time. Online auto-routing does no satisfy my needs so I decided to make my offline version inside KiCad installation.
First step was is get Java Web Start resources. Get these four resources downloaded:
and placed in ./bin of KiCad directory. You can find freeroute.jnlp existing in KiCad installation, this way GUI starts auto-router; we are about to replace it. Next, modify both JNLP files to make codebase referring to local resources i.e. replace codebase=”http://freerouting.net/java” with codebase=”file://localhost/your_path_to_kicad_bin”. Make sure you use absolute path and path does not contain white spaces, otherwise Java Web Start will not pick up JAR files; in my case it is codebase=”file://localhost/C:/Developer/KiCad/bin”.
At this point it will not work yet. You can disable network in your OS, run KiCad, enter pcbnew to open auto-router and after accepting Java security messages router will start just to display: Internet connection required to start the Freerouter application!
With network sniffer I have discovered it only accesses website at the beginning just to read http://www.freerouting.net/java/online_check.txt file. Whether the author intent was to make placeholder for some logic to be placed on server-side later, to collect some usage statistics, or whatever else, from user perspective working while traveling it is pain in the ass.
I took a look inside decompiled code just to confirm my observation: the application denies work if UserOnline class cannot reach out to text file on the web. Since the JARs are not sealed (signed) I have created replacement version of this class just to confirm it works fine in complete offline.
Last steps you need to do is to take this UserOnline.class, browse the router.jar content with any archive tool like 7-zip, replace original class router.jar!/gui/UserOnline.class and save. Voila! Launch auto-router again and it works in offline perfectly now.
Disclaimer: As of writing of this article I could not verify if hack breaks licensing model of FreeRouter in any way as the www.FreeRouting.net website does not verbalize license or limitations in any way.