Log in

View Full Version : Java to Crio Downloading Issues


pureFloat
14-01-2012, 16:48
My team is using Java to program our robot, and we want to put a simple project we created onto the Crio. We have imaged our Crio and have set the laptop's IP address. When loading the code, Netbeans gives us this message:
Target IP: 10.35.6.2
Network interfaces on host:
Realtek PCI FE Family Controller: address: 10.35.6.7 netmask: 255.255.255.0 <--- on robot's subnet
Connection FTP @10.35.6.2
And then it stops. It doesn't give an error or anything. Does anyone have any idea what's going on?

bdbayes
14-01-2012, 17:02
The computer is unable to connect to the robot. There is likely an iphone address set incorrectly somewhere.

pureFloat
14-01-2012, 17:27
Ok, we got it. It turns out I overlooked firewall. Stupid firewall. However, now we're running into a new issue. Netbeans is now giving us this message:
Waiting to connect to OTA command server of 10.35.6.2:8001 for past 43s
Waiting to connect to OTA command server of 10.35.6.2:8001 for past 44s
Waiting to connect to OTA command server of 10.35.6.2:8001 for past 45s
It keeps going on. My friend says it should work in 7 seconds, but now it's at around 700. Does anyone know what this means and how we can fix it? Thanks to anyone who helps.

bdbayes
14-01-2012, 17:29
You need to restart your crio and download once more. This happens once after imaging the crio.

pureFloat
14-01-2012, 17:48
Cool! That works. Now we just need to get the actual code working :)

bdbayes
14-01-2012, 18:11
Glad to hear it works. You should try some of the examples.

leeboy1312
16-01-2012, 17:30
We are having a similiar problem when we try to deploy the code onto the CRio the program stops without a build error at

[cRIO] Default disabled() method running, consider providing your own
[cRIO] task 0x25c7a58 (System Web Services Load Thread) deleted: errno=0 (0) status=0 (0)
[cRIO] task 0x2869f70 (mDNS resolve) deleted: errno=0 (0) status=0 (0)
[cRIO] task 0x2bff0d0 (mDNS resolve) deleted: errno=0 (0) status=0 (0)


I have tried almost everything i can think of so any help would be strongly appreciated.

Thanks,
F.I.R.S.T. Team #4021

bdbayes
16-01-2012, 18:09
That is displayed whenever you finish deploying the code.

matthysen2
08-02-2012, 22:41
You need to restart your crio and download once more. This happens once after imaging the crio.
I have had this same problem aswell. When you say restart do you mean pressing the button on the or cutting the power off and then turning it back on? And should this be done while the code is trying to run?

bdbayes
08-02-2012, 23:16
I have had this same problem aswell. When you say restart do you mean pressing the button on the or cutting the power off and then turning it back on? And should this be done while the code is trying to run?

You will need to power cycle the entire robot. You do not want to power cycle the robot while it is running the code.

Patrick Chiang
09-02-2012, 03:08
I have had this same problem aswell. When you say restart do you mean pressing the button on the or cutting the power off and then turning it back on? And should this be done while the code is trying to run?

It's a known bug since last year.

SOP for flashing/updating the crio:
1. Flash it
2. Upload code
3. Reboot the crio
4. Pretend nothing happened and upload code
5. Success.

touchdownjesus4
09-02-2012, 08:25
We are having a similiar problem when we try to deploy the code onto the CRio the program stops without a build error at

[cRIO] Default disabled() method running, consider providing your own
[cRIO] task 0x25c7a58 (System Web Services Load Thread) deleted: errno=0 (0) status=0 (0)
[cRIO] task 0x2869f70 (mDNS resolve) deleted: errno=0 (0) status=0 (0)
[cRIO] task 0x2bff0d0 (mDNS resolve) deleted: errno=0 (0) status=0 (0)


I have tried almost everything i can think of so any help would be strongly appreciated.

Thanks,
F.I.R.S.T. Team #4021

This same thing happens when I deploy code to our cRIO. It gets to the mDNS resolve and hangs. I've found that if you just stop the process it deploys the code correctly, it just seems to get hung up after its finished deploying for some reason. It says that there is robot code when we switch to the driver station and any changes we make work even though it hangs.

derekwhite
09-02-2012, 10:57
The deploy process is not supposed to "finish". It stays connected to your robot in order to display any output that your robot or the cRIO prints out.

This message is printed by WPILibJ if you haven't overridden the disabled() method (which isn't a requirement by the way):
[cRIO] Default disabled() method running, consider providing your own

If you see that message, then it's very likely that your robot code is running fine.

This message is printed by the cRIO for some reason. I think it is an ordinary status message though, not any real problem:
[cRIO] task 0x25c7a58 (System Web Services Load Thread) deleted: errno=0 (0) status=0 (0)
[cRIO] task 0x2869f70 (mDNS resolve) deleted: errno=0 (0) status=0 (0)
[cRIO] task 0x2bff0d0 (mDNS resolve) deleted: errno=0 (0) status=0 (0)

For your own sanity and/or peace of mind, you might want to print a message at the beginning and end of your disabled(), autonomous() and operatorControl() methods - something like "entering autonomous mode", "exiting autonomous mode", etc.

austin1743
09-02-2012, 19:57
Ok, we got it. It turns out I overlooked firewall. Stupid firewall. However, now we're running into a new issue. Netbeans is now giving us this message:
Waiting to connect to OTA command server of 10.35.6.2:8001 for past 43s
Waiting to connect to OTA command server of 10.35.6.2:8001 for past 44s
Waiting to connect to OTA command server of 10.35.6.2:8001 for past 45s
It keeps going on. My friend says it should work in 7 seconds, but now it's at around 700. Does anyone know what this means and how we can fix it? Thanks to anyone who helps.


hello, we are having the same problem as you, we dont have any firewall running that we know of and have had 3 people check it. Can you tell us what you did so we can try to fix ours?

we try to send code but get the same error that says connection has timed out and we can't figure out why....


heres what we get...

Target IP: 10.0.0.2
Network interfaces on host:
Intel(R) 82567LM Gigabit Network Connection: address: 10.17.43.5 netmask: 255.0.0.0 <--- on robot's subnet
Intel(R) WiFi Link 5100 AGN: address: 10.10.12.154 netmask: 255.255.255.254
Connecting FTP @10.0.0.


we are thinking we need to change the target ip address to the 10.17.43.5 but are unsure of how to do this and are trying to figure out if this is the real reason for our problem...

TravSatEE
10-02-2012, 00:49
There is a netbeans configuration option to change, in the menu:

Tools -> Options -> Miscellaneous -> FRC Configuration

Change your team number.

This step is missing from [1]. Their section on Netbeans is a little sparse and references an older version (6.7). No one took credit as author on that document to suggest this change.

[1] http://www.usfirst.org/sites/default/files/uploadedFiles/Robotics_Programs/FRC/Game_and_Season__Info/2012_Assets/Getting%20Started%20with%20the%202012%20FRC%20Cont rol%20System_2.pdf

jesusrambo
10-02-2012, 01:34
Open up your netbeans settings, click the miscellaneous tab, click the FRC Java tab, and set your team number in there.

austin1743
10-02-2012, 11:20
thanks, we have done that and will test it in a few hours. I will respond back if it works.
when we set it in netbeans we got set remote address to (10.17.43.2) which i am going to assume is correct?

also...
using command prompt and the ipconfig command,

we have the:
IPv4 - 10.10.12.154
subnet - 255.255.0.0
default gateway 10.10.0.1

we are team 1743 so i know it should read (10.17.43.6) there...

but i am unaware of what it should correctly read.... Can someone post up an accurate example of exactly how it should be?

Patrick Chiang
10-02-2012, 15:35
thanks, we have done that and will test it in a few hours. I will respond back if it works.
when we set it in netbeans we got set remote address to (10.17.43.2) which i am going to assume is correct?

also...
using command prompt and the ipconfig command,

we have the:
IPv4 - 10.10.12.154
subnet - 255.255.0.0
default gateway 10.10.0.1

we are team 1743 so i know it should read (10.17.43.6) there...

but i am unaware of what it should correctly read.... Can someone post up an accurate example of exactly how it should be?

What is your exact setup? If you use the wireless router on the robot as an access point, you don't need to configure the default gateway on your computer. Disable DHCP on the router and manually change your address to 10.17.43.x, where x is an integer 0~255 and not 1, 2, 4 or 6, or 11 (to be safe).

austin1743
10-02-2012, 15:37
so we fixed the ip address issue (thanks for the help)

now we got another issue (lol)

we are getting an error where it says looking for frc_2012_v43.zip but got frc_2011_v28.zip

we tried looking for where it is calling for this file path but we couldn't find it... our netbeans is updated to the fullest and has all of the plug-ins installed...

Patrick Chiang
10-02-2012, 15:48
so we fixed the ip address issue (thanks for the help)

now we got another issue (lol)

we are getting an error where it says looking for frc_2012_v43.zip but got frc_2011_v28.zip

we tried looking for where it is calling for this file path but we couldn't find it... our netbeans is updated to the fullest and has all of the plug-ins installed...

Two things you should try:
1. Update your cRio flashing utility. The 2012 version has some major changes done to it.
2. Uninstall, reinstall the plugins in netbeans. Those plugins *should* contain the cRio image files.

austin1743
10-02-2012, 19:40
ok the flash utility is just the cRio imager correct?

our netbeans is currently up to date with all of 2012's updates for frc.

will keep you guys informed..


we are using wired connection right now and trying to get that set-up before wireless...

jesusrambo
10-02-2012, 19:57
Correct, reimaging the cRIO should solve the versioning error.

austin1743
10-02-2012, 20:14
thanks, i will do this first thing before we do anything else.

i will keep you guys informed more tomorrow. Time for some sleep in this robotics season before crunch time.

jesusrambo
10-02-2012, 20:46
Time for some sleep in this robotics season before crunch time.

You kidding? That's what the Mountain Dew is for :)

austin1743
10-02-2012, 21:25
no im not kidding, hehe stocking up on mountain dew now... hehe crunch time starts in the final week :)

how long does this cRio imaging process take? before it only took us a couple minutes...

Patrick Chiang
10-02-2012, 23:42
how long does this cRio imaging process take? before it only took us a couple minutes...

Up to 5 minutes. Shouldn't take any longer than that.

austin1743
11-02-2012, 09:20
we have been imaging for 2 hours now.... continues to say formating cRio...

i dont think this is normal...

Patrick Chiang
11-02-2012, 13:35
Something is definitely wrong if it's taking more than an hour. Try connecting back to the cRio. If you can't connect back to it, then it's somewhat likely that it's bricked. If you can connect back to it, try the re-image thing again.

My only three guesses for what possibly happened is:
1. You were flashing it thru a wireless connection?
2. The cRio lost power midway through formatting?
3. The cRio was faulty?

austin1743
11-02-2012, 20:19
well i got it to the right image... (by doing what you said)

our next problem is no robot communication... for this is i:


cycled power
reimaged it 2 times
checked to make sure ip addresss set-up correctly (they are)
made sure ethernet cord is properly attached (wired connection entire time)

any other suggestions?

jesusrambo
11-02-2012, 20:39
Both IP addresses? Are you able to ping it?

Did you image it with the right IP address?

Are it and your computer on the same IP range (10.xx.yy.zz where xx and yy make your team number), with the computer's subnet set to 255.255.255.0?

austin1743
11-02-2012, 20:47
i have 2 different ip address. one for the cRio and one set for the laptop.. should they be set to the same exact thing?

subnet is set just as it should be... the (255.255.255.0)

jesusrambo
11-02-2012, 20:55
i have 2 different ip address. one for the cRio and one set for the laptop.. should they be set to the same exact thing?

subnet is set just as it should be... the (255.255.255.0)

No, not the same thing, but on the same range, and make sure the cRIO's is 10.xx.yy.2

austin1743
11-02-2012, 21:29
ok cool,

i have the cRio at 10.17.43.2

and the computer at 10.17.43.5 (i believe)


what is the correct range?

jesusrambo
11-02-2012, 23:53
Yep, that looks right.

Check firewalls and what network device the driver station is using. Can you ping the CRIO?

LukeS
12-02-2012, 11:34
ok cool,

i have the cRio at 10.17.43.2

and the computer at 10.17.43.5 (i believe)


what is the correct range?

By range, he means the same IP subnet.

How IP subnets work is if you look at the IP address and subnet mask in binary, the 1s in the subnet mask mean that that bit of the address is part of the the network address, and 0s in the subnet mask mean that that bit of the address is part of the the node address. So, they are in the same subnet if all of the network bits in the IP address are the same.

So,
// pseudo-code
// Addresses in binary
cRIO = 10.17.43.2 ; // 00001010.00010001.00101011.00000010
laptop = 10.17.42.5 ; // 00001010.00010001.00101011.00000101
netmask= 255.255.255.0; // 11111111.11111111.11111111.00000000

// binary and
cRIO_network = cRIO & netmask
laptop_network = laptop & netmask;

println(" > "+cRIO_network); println(" > "+laptop_netowork);
> 00001010.00010001.00101011.00000000
> 00001010.00010001.00101011.00000000

println(" > "+(cRIO_network == laptop_network))
> true

Without doing any binary math, though, if the subnet mask is all 255s and 0s, you can tell easily; 255 means that octet is network, and 0 means node. A mask of "255.255.255.0" means that your range is "10.17.42.*".

austin1743
13-02-2012, 15:43
thanks alot guys for the help. The cRio wasn't imaging correctly because of an IP adress issue that is now fixed :)

now we have a cRio that receives code greatly :)

we are now at another problem.

when we activate tele-op mode our robot doesn't move. I also checked the driver dashboard and i am not getting any pwm input/ output when i move the controller... i know normally i should see the first 4 pwm ports moving when i move the controller. any suggestions?

jesusrambo
13-02-2012, 19:06
Check in the driver station, click the SETUP tab, and look on the right hand side. Look under the tab labeled "Joystick Setup (drag to order)" and make sure at least one of those has a joystick under it. Then make sure it's in the right position. Those positions correspond to joystick values in the code. Press any button on the joystick, and the corresponding one should light up blue in that setup pane.

austin1743
13-02-2012, 20:16
i will try that tomorrow,

i am looking through the code to make sure i have it working the way it should...

i used a tank drive which works great and the joysticks moves the robot... all but i need mecanum drive to work as we have mecanum wheels on the robot...

i am quite new to programming in general and im not sure i have it set right... i looked at another teams mecanum code and it seem to look very similar... i have attached our code to this message. if someone could take a look at it and let me know what im missing that would be great and amazing.

thanks for the helps guys.