What sort of code errors can cause VexNet dropouts?

I’m trying to debug why a robot is losing communication with its joystick controller. I suspect it’s a problem with its key. Some electrical tape on the key seemed to help - for a while - but then the problem appeared again a couple days later. I’ve ascertained all the batteries are fully charged, and reloaded firmware. The drop out happens sometimes after only 20 seconds or so, yet sometimes we can drive it for 5 minutes or more with lots of bumping around without any problems.

I would swap out the old keys with new ones but… I have only two keys. I had ordered more but… the old ones are discontinued and the brand new ones are… are… (sobbing) in limbo… :eek:

I’ve heard that coding errors could cause communication drop outs, but I don’t know what to look for in that regard. Any suggestions? Thanks.

I have the exact same problem. I posted a question about this the other day and someone advised us to have a back up battery plugged in to limit the loss of connection. Have you tried this?

I don’t think coding errors would cause this. Is all of your firmware and software up to date?

Yes, we have a back up battery. It’s fresh - or at least it was fresh a week ago. I’ll see if a new backup battery helps. Good suggestion.

I think it’s all up to date. It’s done in RobotC. I guess I can double check to be sure.

Thanks. I appreciate your suggestions and rapid replies.

OK cool no problem. Our problem has slowly gotten worse though. I can’t do anything without losing connection. I’m having a mild panic attack right :o. I start it, maybe get my lift to go up a tiny bit, then I lose connection and can’t do anything about it.

Have you tried testing with a USB A-A cable? If you have issues tethered, you may have a bad controller/cortex.

Have you tried using a different pair of VEXNet Keys? They are very easily damged, and AFAIK there’s no real way to test if they are working correctly. If you have another robot whose connection is good throughout the entire day, swap keys with them.

If the disconnects continue to occur, then start swapping out other parts of the system. One time last year, I had a partner controller that, when plugged into any Joystick, caused disconnections almost instant. It can literally be alost anything.

If the disconnection problem starts happening on the second robot that you swapped keys with, attempt to identify the broken key by changing the key pairing used. Once you figure out which one it is, tag it and don’t use it.

I feel your pain. This afternoon disconnects seem fewer than yesterday. It’s like a weather report. One thing is to be sure you don’t have any metal within about 2 inches of the key’s end. Modifying that did not help us, but it’s a suggestion I’ve heard from a lot of people.

These godless, gremlin-prone keys seem to be the weakest link in the otherwise heavenly world of Vex. I wish there were another way.

I can guarantee your problem is in your battery to cortex connection. There are coils (or just pins I can’t remember which) inside the battery connection on the cortex that can come loose after much usage. To fix this you need you take a small needle or pin and push the pins (or coil ill ask mentor more about it tonight) back together towards the center so the connection between the battery and cortex is secure.

9 times out of 10 this has been the problem with dropping connection in my club.

Ill try and get my mentor to post directions on how to fix it in more detail if I see him tonight.

And the keys really aren’t that bad. Care for the keys and they will stay good as new.

Interesting suggestion. I’ve heard some other people say that, too. Our cortex is fairly new but I guess anything is possible. I just wish we had some kind of special laparoscope for viewing into the battery connector, especially with the cortex mounted. Thanks for the warning on this.

I have had this problem and the conclusion I reached is that it is usually the connector on the battery that is the problem.

what I have seen happen is that over time the tabs that hold the pins onto the plastic housing loosen which gives the cord some play and then when the wire get’s bumped, one (no reason it couldn’t be both) of the pins moves which causes the connection to be broken for a split second. in most cases the backup battery can handle the current if it is BRAND NEW. but every so often, lots of current is being drawn, the backup battery doesn’t seem to cut it and the controller resets or something.

I have no proof that this is exactly what is happening just like we have no proof of quantum theory besides the fact that it works. But like quantum mechanics, the model fits that data (as apposed to the data fitting the model).

Whatever is happening, taping the back of the connector and the wires together drastically reduced the problem.

I think I wrote too much :smiley:

Double check your backup battery and its connections. If that is good then I would try swapping out the VEXNet keys. They seem to go bad often. At least they always did for me.

So…one of my teams is having this exact issue. Our problem though is that it only happens when plugged into the electronics at an event. We have driven the bot for literally one hour solid with no problems. At the last meet we uploaded the firmware on the cortex and the joystick, put in a new back up battery, and even changed brains. We can not duplicate the problem even when using a competition switch.

Now, one team said that it might be our power expander. Got a new one and replaced the old one. It still runs just fine as it did before. We have league this weekend so we are hoping for the best, but I am concerned. We also re-wrote the code using a different computer. No idea why this would work or cause a problem, but alas we are grasping for straws. We obviously changed VEXnet keys, but they work just fine when not plugged into the field electronics. ???

Have you noticed a pattern where this problem tends to occur? You noted when you are plugged into VEXNet it gives you problems but have you noticed it at a particular time in VEXNet? For example, common times for disconnects are when your motors are all running at the same time or when your robot gets jolted. Does this sound like your robot or is it random?

We tend to have similar issues but have been running ten motors on one battery. We are getting a power expander so hopefully that solves our issues but I can try and help you with your issues. We have picked up several solutions we would be happy to pass on. Good luck this season!

Just to quickly chime in - all VEXnet communications are handled by the Master Processor and completely separated from ROBOTC/User Processor land. We have some status fields that we’re able to interrogate from the master processor regarding the VEXnet status (i.e. is a joystick paired or not), but we don’t have control of establishing links or the update rate of packets.

All of the previous anwsers are possible ways to make the connection better, but I sense that the problem all of you are having is Wifi interference.

Are any of you using the new keys? Are those out yet?

Also on the topic of interference, try going to a place with no wifi or cellular interference and try then. At our school, during the day the connection is really bad, but then when the school day is over and the majority of the wifi devices are gone, the connection works a lot better. not perfect, just better. However, when we get to a competition and wifi is required to be off, the connection is nearly perfect, I have only seen one team, ever with problems.