Log in

View Full Version : Help needed for loading codes into cRIO (Java)


RoboElite640
04-02-2011, 16:28
Error comes up while downloading java codes into cRIO. I installed the FRC plugins. Formatted the cRIO and reimaged it. Firewall is also turned off and the IP address is set to 10.6.40.5


C:\Documents and Settings\Developer\sunspotfrcsdk\build.xml:95: The following error occurred while executing this line:
C:\Documents and Settings\Developer\sunspotfrcsdk\ant\upgrade.xml:4 0:
java.net.ConnectExtension:Connection timed out: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl .java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSoc ketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.j ava:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.j ava:366)
at java.net.Socket.connect(Socket.java:529)
at java.net.Socket.connect(Socket.java:478)
at java.net.Socket.<init>(Socket.java:375)
at java.net.Socket.<init>(Socket.java:189)
at org.apache.commons.net.DefaultSocketFactory.create Socket(DefaultSocketFactory.java:53)
at org.apache.commons.net.SocketClient.connect(Socket Client.java:162)
at org.apache.commons.net.SocketClient.connect(Socket Client.java:250)
at com.sun.spot.sdk.tool.ftp.JakartaFtpWrapper.connec tAndLogin(JakartaFtpWrapper.java:37)
at com.sun.spot.sdk.tool.ftp.UpgradeTask.execute(Upgr adeTask.java:213)
at org.apache.tools.ant.UnknownElement.execute(Unknow nElement.java:291)
at sun.reflect.GeneratedMethodAccessor74.invoke(Unkno wn Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execut e(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:39 0)
at org.apache.tools.ant.Target.performTasks(Target.ja va:411)
at org.apache.tools.ant.Project.executeSortedTargets( Project.java:1397)
at org.apache.tools.ant.helper.SingleCheckExecutor.ex ecuteTargets(SingleCheckExecutor.java:38)
at org.apache.tools.ant.Project.executeTargets(Projec t.java:1249)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java :442)
at org.apache.tools.ant.taskdefs.CallTarget.execute(C allTarget.java:105)
at org.apache.tools.ant.UnknownElement.execute(Unknow nElement.java:291)
at sun.reflect.GeneratedMethodAccessor149.invoke(Unkn own Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execut e(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:39 0)
at org.apache.tools.ant.Target.performTasks(Target.ja va:411)
at org.apache.tools.ant.Project.executeSortedTargets( Project.java:1397)
at org.apache.tools.ant.Project.executeTarget(Project .java:1366)
at org.apache.tools.ant.helper.DefaultExecutor.execut eTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Projec t.java:1249)
at org.apache.tools.ant.module.bridge.impl.BridgeImpl .run(BridgeImpl.java:281)
at org.apache.tools.ant.module.run.TargetExecutor.run (TargetExecutor.java:539)
at org.netbeans.core.execution.RunClassThread.run(Run ClassThread.java:154)

Build Failed (total time:59 seconds)

HELP NEEDED

RoboElite640
05-02-2011, 07:58
bump

slijin
05-02-2011, 08:27
First off, no bumping threads.

Can you ping the cRIO from the Classmate (or whatever computer you're using to load code)? Is the ethernet cable a crossover (I've heard straight-throughs can be used, but FIRST recommends a crossover). Is the cable actually plugged in (i.e. not slipping out of anything)?

RoboElite640
05-02-2011, 14:04
sorry, didnt know about the no bumping. Being new, im not sure what you mean by ping. We're using a straight cable and its plugged in (not loose).

1168Programmer
05-02-2011, 21:25
sorry, didnt know about the no bumping. Being new, im not sure what you mean by ping. We're using a straight cable and its plugged in (not loose).

To ping, go to command prompt, (for windows, if you see "run" on the start menu, click that and select cmd [or type it], a black window should pop up), type "ping" and the ip address of your crio. It will send data packets to your crio, if they are sent back then you are connected and the problem is something else.

RoboElite640
06-02-2011, 16:44
Well we can't try to ping it until Monday, but if it doesn't ping then what should we do?

1168Programmer
06-02-2011, 17:07
Try to deploy tethered, if you're not doing that already.

In your original post it says an error occurred at a certain line, I think it says line 95. So, maybe check that.

Hmm, do you have the most recent plugin update?

Is there anything in your code that would cause the connection to just time out?

inkspell4
06-02-2011, 17:36
You will have to have it connected to the wireless and then make sure that the dric=ver station is deployed then build if this doesnt work follow the instructions on http://www.usfirst.org/uploadedFiles/Robotics_Programs/FRC/Game_and_Season__Info/2011_Assets/Kit_of_Parts/How_to_Build_and_Load_Programming_in_LabVIEW,_C,_a nd_Java.pdf this is supplied by first if on monday the problem still exists i will speek with one of my fellow programers. We are also a new team so we understand this situation.:)

RoboElite640
06-02-2011, 19:48
We do have the most recent plugins for java. I dont think theres anything that would cause the connection to be timed out because i tried using simple codes and it still said connection timed out. I'll try wireless tomorrow but if the connection is interrupted then wont the cRIO be corrupted or is that only when you reimage it?

1168Programmer
06-02-2011, 19:52
Did you reimage it to the right programming language?

Definitely try pinging it and let us know what happens.

RoboElite640
07-02-2011, 08:59
I tried pinging it and i got 4 packages sent and 4 packages received. I also tried using a crossover cable and still got the same error. I have the cRIO IP address at 10.6.40.2, but what exactly should the subnet be at 255.0.0.0?

adf0221
07-02-2011, 12:12
make sure you disconnect from the radio on your robot before you attempt to download or else you will receive that error

RoboElite640
07-02-2011, 13:43
We have the Dlink router disconnected the entire time.

RoboElite640
07-02-2011, 13:56
we also have it saying waiting to connect to OTA command server of 10.6.40.2:8001

RoboElite640
07-02-2011, 15:14
I was also wondering if the status light is supposed to be blinking yellow.

1168Programmer
07-02-2011, 16:41
make sure you disconnect from the radio on your robot before you attempt to download or else you will receive that error

You can connect through the newest radio from the KOP this year. That's why it has so many Ethernet ports.

You do have the correct subnet mask, it should be the default 225.0.0.0

1168Programmer
07-02-2011, 16:48
By status light, do you mean the light that goes on the robot or the light on the cRIO, or a completely different light?

RoboElite640
07-02-2011, 17:21
The status light on the cRIO...

RoboElite640
07-02-2011, 19:24
One more thought: do the switches on the cRIO (other than 'Safe Mode') have to be turned on or off?

Alan Anderson
07-02-2011, 20:53
One more thought: do the switches on the cRIO (other than 'Safe Mode') have to be turned on or off?

All of them, SAFE MODE included, should be off to start with.

The CONSOLE OUT switch can be turned on if you want to attach a terminal to the cRIO's serial port (but don't do that if you're using a serial-to-CAN converter such as a Black Jaguar). The NO APP switch has no effect on anything other than LabVIEW programs. The USER1 switch can be read by software and can be set to whatever you want it to be.

RoboElite640
07-02-2011, 21:53
So basically everything should be off, and what if the error still shows? any other suggestions?

RoboElite640
08-02-2011, 07:41
All of them, SAFE MODE included, should be off to start with.

The CONSOLE OUT switch can be turned on if you want to attach a terminal to the cRIO's serial port (but don't do that if you're using a serial-to-CAN converter such as a Black Jaguar). The NO APP switch has no affect on anything other than LabVIEW programs. The USER1 switch can be read by software and can be set to whatever you want it to be.

I had everything turned off including SAFE MODE. Tried downloading the code into the cRIO and still got the same error.

RoboElite640
08-02-2011, 08:09
The 'Power' light is on green, but the 'Status' light on the cRIO is blinking yellow. Shouldn't it be green and not blinking? What does this mean?

1168Programmer
08-02-2011, 17:25
Do you have your team number set in NetBeans? I know it sounds stupid, but we forgot to set it when we installed NetBeans on an auxiliary laptop and then when we tried to download code we got a long error, possibly the one in your original post...

RoboElite640
08-02-2011, 18:07
Yes we have the team number set there. so we reinstalled everything and when we try to run the code, we get stuck here.





init:
init:
clean:
Created dir: C:\Users\Developer\Documents\NetBeansProjects\FRC2 011Team640\build
Compiling 1 source file to C:\Users\Developer\Documents\NetBeansProjects\FRC2 011Team640\build
compile:
Created dir: C:\Users\Developer\Documents\NetBeansProjects\FRC2 011Team640\j2meclasses
preverify:
Created dir: C:\Users\Developer\Documents\NetBeansProjects\FRC2 011Team640\suite
Building jar: C:\Users\Developer\Documents\NetBeansProjects\FRC2 011Team640\suite\FRC2011Team640_1.0.0.jar
jar-app:
CompilerOracle: exclude com/sun/squawk/Method.getParameterTypes
CompilerOracle: exclude com/sun/squawk/SymbolParser.getSignatureTypeAt
CompilerOracle: exclude com/sun/squawk/SymbolParser.stripMethods
[translating suite image [closed: false, parent: squawk] ...]
### Excluding compile: com.sun.squawk.Method::getParameterTypes
### Excluding compile: com.sun.squawk.SymbolParser::getSignatureTypeAt
[Including resource: META-INF/MANIFEST.MF]
Romizer processed 137 classes and generated 4 files.
Expanding: C:\Users\Developer\Documents\NetBeansProjects\FRC2 011Team640\suite\FRC2011Team640_1.0.0.jar into C:\Users\Developer\Documents\NetBeansProjects\FRC2 011Team640\suite
Moving 1 file to C:\Users\Developer\Documents\NetBeansProjects\FRC2 011Team640\suite
Moving 1 file to C:\Users\Developer\Documents\NetBeansProjects\FRC2 011Team640\suite
Moving 1 file to C:\Users\Developer\Documents\NetBeansProjects\FRC2 011Team640\suite
Deleting: C:\Users\Developer\Documents\NetBeansProjects\FRC2 011Team640\image.suite.api
Host OS: Windows 7 6.1, 6.1
Host JVM: Java HotSpot(TM) Client VM 19.0-b09
Target IP: 10.6.40.2
Network interfaces on host:
Realtek RTL8102E/RTL8103E Family PCI-E Fast Ethernet NIC (NDIS 6.20): address: 10.6.40.6 netmask: 255.255.255.255 or hidden by IPv6 address (due to Java on Windows Bug:6707289)
Connecting FTP @10.6.40.2
upgrade:
Sending local file image.suite
flashapp:
deploy:
init:
[cRIO] [OTA Server] ********* REBOOTING cRIO *********
[cRIO]
Waiting for cRIO to reboot (1s)
Waiting for cRIO to reboot (2s)
Waiting for cRIO to reboot (3s)
Waiting for cRIO to reboot (4s)
Waiting for cRIO to reboot (5s)
Waiting for cRIO to reboot (6s)
Waiting for cRIO to reboot (7s)
[cRIO]
[cRIO] -> * Loading StartupDlls: debug
[cRIO] Entering debug.o StartupLibraryInit
[cRIO] Debugging is up, target server mounted at /tsfs
[cRIO]
[cRIO]
[cRIO] VxWorks
[cRIO]
[cRIO] Copyright 1984-2006 Wind River Systems, Inc.
[cRIO]
[cRIO] CPU: MPC5200 -- Wind River Lite5200 BSP.
[cRIO] Runtime Name: VxWorks
[cRIO] Runtime Version: 6.3
[cRIO] BSP version: 2.0/10
[cRIO] Created: Jul 29 2009, 13:41:47
[cRIO] ED&R Policy Mode: Deployed
[cRIO] WDB Comm Type: WDB_COMM_END
[cRIO] WDB: Ready.
[cRIO]
[cRIO] Leaving debug.o StartupLibraryInit
[cRIO] * Loading StartupDlls: NiRioRpc
[cRIO] * Loading StartupDlls: niorbs
[cRIO] * Loading StartupDlls: NiViSrvr
[cRIO] * Loading StartupDlls: visa32
[cRIO] * Loading StartupDlls: nivissvc
[cRIO] task 0xee4b28 (PAL00fb5ec8) deleted: errno=0 (0) status=0 (0)
[cRIO] NI-RIO Server 3.2 started successfully.
[cRIO] task 0xc5ffb8 (NiRioRpc) deleted: errno=0 (0) status=0 (0)
[cRIO] * Loading StartupDlls: nivision
[cRIO] * Loading StartupDlls: niserial
[cRIO] * Loading StartupDlls: FRC_FPGA
[cRIO] * Loading StartupDlls: FRC_NetworkCommunication
[cRIO] task 0x1b0d7e8 (t2) deleted: errno=0 (0) status=0 (0)
[cRIO] FRC_NetworkCommunication was compiled from SVN revision 2258
[cRIO]
[cRIO] NI-VISA Server 4.5 started successfully.
[cRIO] task 0xe63238 (t1) deleted: errno=1835009 (0x1c0001) status=1 (0x1)
[cRIO] FPGA Hardware GUID: 0x2EAA5E59CAF1A8A966853A011B61CC91
[cRIO] FPGA Software GUID: 0x2EAA5E59CAF1A8A966853A011B61CC91
[cRIO] FPGA Hardware Version: 2011
[cRIO] FPGA Software Version: 2011
[cRIO] FPGA Hardware Revision: 1.5.3
[cRIO] FPGA Software Revision: 1.5.3
[cRIO] * Loading StartupDlls: FRC_JavaVM
[cRIO]
[cRIO]
[cRIO] [OTA Server] Version: 2011 FRC, Jan 6 2011, 09:47:42
[cRIO]
[cRIO]
[cRIO] Welcome to LabVIEW Real-Time 8.6.1f3
[cRIO]
[cRIO] [Squawk VM] Version: 2011 FRC, Feb 2 2011, 13:26:47
[cRIO] FPGA Hardware GUID: 0x2eaa5e59caf1a8a966853a011b61cc91
[cRIO] FPGA Software GUID: 0x2eaa5e59caf1a8a966853a011b61cc91
[cRIO] Default robotInit() method running, consider providing your own
[cRIO] Default disabled() method running, consider providing your own
BUILD STOPPED (total time: 2 minutes 35 seconds

1168Programmer
08-02-2011, 18:20
Does your robot run? From the output it appears that it should...

RoboElite640
08-02-2011, 18:55
When we went to the driver station, there is Robot Communication and the 'Robot Code' light is green. However, nothing runs and it says that the 'Watchdog' is unfed.

1168Programmer
08-02-2011, 20:23
Do you have any timers starting in teleopInit() besides the Watchdog? Because that would certainly cause a Watchdog unfed error.

RoboElite640
09-02-2011, 17:54
We dont have any other timer starting in teleopInit

1168Programmer
09-02-2011, 19:34
Ok. Make sure you're feeding the Watchdog in both teleop and autonomous. There's another thread on Watchdog errors ... Watchdog errors (http://www.chiefdelphi.com/forums/showthread.php?t=82930)

My best recommendation for now is to see if there's anything useful on there. Please post back if something develops.