View Full Version : "Host cannot connect to subnet"
BrighidKHeh
09-02-2015, 20:53
So I tried to run my code in Netbeans to establish a connection, but I get an error every time saying "WARNING: Host is not on same subnet as robot. May not be able to complete all communications with robot."
In the Driver Station, I have Joysticks and Communications, but I can't figure out how to get code. How do I fix this?
cstelter
09-02-2015, 21:13
So I tried to run my code in Netbeans to establish a connection, but I get an error every time saying "WARNING: Host is not on same subnet as robot. May not be able to complete all communications with robot."
In the Driver Station, I have Joysticks and Communications, but I can't figure out how to get code. How do I fix this?
Switch to Eclipse per the 2015 FRC Control System Setup instructions?
https://wpilib.screenstepslive.com/s/4485/m/13503/l/145002-installing-eclipse-c-java
BrighidKHeh
10-02-2015, 17:07
How can I transfer my Netbeans code to Eclipse? Do we HAVE to use Eclipse this year???? My code has no errors in Netbeans, but is made up of all errors in Eclipse, and I'm not sure why.
cstelter
10-02-2015, 22:07
I'm not an expert in it, but the control system walkthrough says use eclipse this year. I suspect the back end deploy (the part that finds and talks with the roboRio) was updated in eclipse and the old build mech (ant??) in netbeans may not. We've had no problems using eclipse. If for some reason no wpilib imports are being resolved, try opening an example project first before a robotBuilder project. Or start with IterativeRobot skeleton and add your code, but eclipse/C/C++ is what we were directed to use.
It's both any build scripts, but is eclipse that bad? I have had nothing bad go wrong with it. Eclipse over NetBeans any day, in fact most if not art java developers will tell you that
BrighidKHeh
11-02-2015, 16:26
So I CAN use Netbeans this season? There is nothing bad about Eclipse, but with 5 days left of the build season, I don't have time to try and figure out Eclipse.
So I CAN use Netbeans this season? There is nothing bad about Eclipse, but with 5 days left of the build season, I don't have time to try and figure out Eclipse.
There is nothing to figure out with Eclipse. I highly suggest you use Eclipse -- figuring out how to use Netbeans rather than Eclipse will be way more time consuming than just switching to Eclipse. It takes maybe thirty minutes max of time to setup Eclipse -- Eclipse this year is actually easier to use than Netbeans last year, in my opinion.
BrighidKHeh
11-02-2015, 16:57
I already know how to use Netbeans. I'm not sure how or where to figure out Eclipse based off of an FRC code. All of this year's code that I tried to copy over from Netbeans turned into all errors. I figured it would be easier to go with Netbeans because I have no idea what I'm doing with Eclipse.
Ben Wolsieffer
11-02-2015, 19:00
When you copied your code to Eclipse, did you have the FRC plugins installed and did you create the correct project type. You are going to have a very hard time if you try to continue using Eclipse.
BrighidKHeh
11-02-2015, 20:06
Yes, I have all of the FRC Plugins installed, and I'm in the wpilib Robot project. Am I able to use Netbeans instead of Eclipse this season though? I haven't received a solid answer to that question yet.
Cel Skeggs
11-02-2015, 20:47
Yes, I have all of the FRC Plugins installed, and I'm in the wpilib Robot project. Am I able to use Netbeans instead of Eclipse this season though? I haven't received a solid answer to that question yet.
Theoretically, yes. Practically, no. It would probably take someone with a lot of experience a couple days to make a version that works in NetBeans, and I haven't heard of anyone doing it.
Can you post a screenshot of your Eclipse setup open with an error'd file open?
(You can use a site like imgur to upload screenshots, and if you're using a recent version of Windows, you can use the Snipping Tool to take screenshots.)
BrighidKHeh
12-02-2015, 17:51
Object Autonomous;
if (Autonomous != null) Autonomous.cancel();
^That's the line of code. It has an error on the word "cancel". There's another one farther up that has "start" at the end that is also an error. The error says "The method cancel() is undefined for the type object".
On some other lines of code:
public IO() {
joystick1 = new Joystick(1);
joystick2 = new Joystick(2);
NoodleOn = new JoystickButton(joystick2, 3);
NoodleOn.whileHeld(new NoodleOn());
NoodleOff = new JoystickButton(joystick2, 4);
NoodleOff.whileHeld(new NoodleOff());
joystick(1), joystick(2),JoystickButton, NoodleOn, and NoodleOff are errors. The error says "Cannot instantiate the type joystick"
cstelter
12-02-2015, 18:03
when you hover over the words underscored in red-- what sort of quick fixes does it offer?
If it offers something like 'Import Command from wpilib' or maybe 'Import AutonomousCommnad from AutonomousCommand.java' then take those options.
If it doesn't offer either of these, perhaps you haven't put all your source where it belongs, or you did not start with Eclipse for C/C++ and instead started with Eclipse for Java (we did that and things did not work until we switched to the C/C++ version as prescribed in the screensteps).
BrighidKHeh
12-02-2015, 18:15
Our team codes in Java, so I thought we were supposed to start it in Java.
AbLiklik
13-02-2015, 02:02
I had the same problem. Seems to me that the embedded selenium server doesn't work properly. The solution is: start selenium server manually before you start NetBeans IDE and it will work.
cstelter
13-02-2015, 07:49
Our team codes in Java, so I thought we were supposed to start it in Java.
https://wpilib.screenstepslive.com/s/4485/m/13503/l/145002-installing-eclipse-c-java
Under the section 'Download Eclipse':
Select the C/C++ version of eclipse. The C/C++ version should be selected regardless of programming language choice (C++ or Java). You can also select one of the other versions, but that will require adding the C Development Tools (CDT). You should choose the version of eclipse that matches your operating system and version of Java from above.
You then have to add the Eclipse Java Development to the installation. Just folllow the steps at the link above.
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.