Static IP from .2 to .20?

Background: The Windows mDNS responder is horridly slow and builds take nearly 40 seconds, 3 for the build and 37 to connect to the roboRIO 5 times. To fix this, I switched the order in build.xml from mDNS->USB->Static to Static->mDNS->USB and build times dropped to ~8 seconds.

However, recently, I tried to build and I couldn’t get any static IP whatsoever, even though I had router and IP camera communications. I tried reflashing to no avail, only to notice that the reflasher tool said “Robot IP: 10.16.84.20”

When did it switch to .20? Now, SmartDashboard can’t connect over static IP as well as the old build tools (half second fix for the build tools, using mDNS on the dashboard causes quite a bit of update rate lag)

The DLink will begin assigning IP addresses starting at 10.XX.XX.20. You may be able to log into the online control panel for the roboRIO and force it to take a static address, but this might interfere with the Field Management System at events.

This year the roboRIO dosent use a static IP, it uses a dynamic IP address, that means when the robot restarts the RIO can have a different IP. If you want it to have the same IP every time you have to either:
a) Set a mac reservation on the router
or
b) Set a static IP on the RoboRIO

That way the RoboRIO will always have the same IP.

Windows doesn’t come with an mDNS responder. It might be helpful for you to read through For the 2020 season software documentation has been moved to https://docs.wpilib.org. Documentation for KOP items can still be found here. | FRC KOP Documentation and identify what mDNS responder, what firewall, and how your network is configured.

My build times with mDNS and a large java project (86 classes) are 12 seconds.

According to that link,

NI mDNS Responder - Installed with the NI FRC Update Suite

This laptop is also a driver station so it uses the NI mDNS.

If it’s worth anything, command line

ping roborio-1684.local

stalls for ~6 seconds before actually pinging >.<

firewall has been totally disabled for years now

Could you post the results of ifconfig and arp -a? I’ve never seen it take anywhere near that long if the device exists. You should see a ping response within a second.

Greg McKaskle

Greg,

I have a question regarding mDNS and the LabVIEW dashboard.

We’re trying to send some data from the dash to the robot over a UDP connection. In the past, we’ve done this using the robot’s static IP address and have had no issues. This year, we’ve not had much success unless we use a workaroung which isn’t going to work at competitions.

I’ll apologize in advance for not being able to post code or look for minute details as I’m at home today and our team’s computers are at the school.

Here is what we’ve done:

The main strategy is to use the part of the dashboard where it binds the smart dashboard to capture the IP address. In Loop 3 in the case structure where Bind Controls to Smart Dashboard.vi is located, we pull the robot IP address in the TRUE case and store it to a global variable. We use this global variable as the IP address in our UDP loop.

Here’s the issue: the global variable that is supposed to contain the IP address comes back as an empty string around 80% of the time. We’ve been working around the issue by figuring out the IP address manually, but that won’t work for competitions. Any suggestions?

No need to apologize.

The dashboard relies on the DS to learn what the robot IP address is. It seemed like a good idea to not have the DB and DS looking at different robots. The notifier is necessary because the binding otherwise won’t return. Storing the value in a local or global in the top loop or the third loop is a fine way to notify the rest of the DB of the robot IP.

So the way the IP sharing is supposed to work is for the robot IP and camera IP to be sent to the DB over TCP. The error handling for the DB TCP connection wasn’t as good as it should have been, so I’ve seen some issues where the connection simply doesn’t exist. The update last week corrected the known issues. PM me when you have access to the code, as I can tell you how to debug and improve it.

Greg McKaskle

Note this is with no roboRIO (or any mDNS device attached for that matter) present, since our team only has one roboRIO currently in bag.


C:\Users\Arhowk>ifconfig
'ifconfig' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\Arhowk>arp -a

Interface: 10.80.45.13 --- 0xc
  Internet Address      Physical Address      Type
  10.80.45.1            00-27-0d-7b-72-7f     dynamic
  10.80.45.255          ff-ff-ff-ff-ff-ff     static
  192.168.2.1           00-27-0d-7b-72-7f     dynamic
  224.0.0.2             01-00-5e-00-00-02     static
  224.0.0.22            01-00-5e-00-00-16     static
  224.0.0.251           01-00-5e-00-00-fb     static
  224.0.0.252           01-00-5e-00-00-fc     static
  224.0.0.253           01-00-5e-00-00-fd     static
  239.192.152.143       01-00-5e-40-98-8f     static
  239.255.255.250       01-00-5e-7f-ff-fa     static
  255.255.255.255       ff-ff-ff-ff-ff-ff     static

C:\Users\Arhowk>ipconfig /all

Windows IP Configuration

   Host Name . . . . . . . . . . . . : Arhowk
   Primary Dns Suffix  . . . . . . . :
   Node Type . . . . . . . . . . . . : Hybrid
   IP Routing Enabled. . . . . . . . : No
   WINS Proxy Enabled. . . . . . . . : No
   DNS Suffix Search List. . . . . . : Lapeerschools.org

Wireless LAN adapter Wireless Network Connection:

   Connection-specific DNS Suffix  . : Lapeerschools.org
   Description . . . . . . . . . . . : Intel(R) Centrino(R) Wireless-N 100
   Physical Address. . . . . . . . . : 78-92-9C-8B-35-9A
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes
   Link-local IPv6 Address . . . . . : fe80::2946:6c61:d614:24fe%12(Preferred)
   IPv4 Address. . . . . . . . . . . : 10.80.45.13(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Lease Obtained. . . . . . . . . . : Saturday, February 21, 2015 11:50:24 AM
   Lease Expires . . . . . . . . . . : Sunday, February 22, 2015 11:50:24 AM
   Default Gateway . . . . . . . . . : 10.80.45.1
   DHCP Server . . . . . . . . . . . : 1.1.1.1
   DHCPv6 IAID . . . . . . . . . . . : 309891740
   DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-16-F3-49-42-C8-60-00-3A-9F-B2

   DNS Servers . . . . . . . . . . . : 10.16.6.201
                                       10.16.6.202
   NetBIOS over Tcpip. . . . . . . . : Enabled

Ethernet adapter Local Area Connection:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Atheros AR8151 PCI-E Gigabit Ethernet Con
troller (NDIS 6.20)
   Physical Address. . . . . . . . . : C8-60-00-3A-9F-B2
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes

Tunnel adapter isatap.Lapeerschools.org:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . : Lapeerschools.org
   Description . . . . . . . . . . . : Microsoft ISATAP Adapter
   Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes

Tunnel adapter isatap.{89EC4FD1-FB07-4BDB-981F-C8D057186120}:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Microsoft ISATAP Adapter #2
   Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes

Tunnel adapter Local Area Connection* 9:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Teredo Tunneling Pseudo-Interface
   Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes

C:\Users\Arhowk>

It looks like this is connecting through your school’s WiFi, and the school uses the same 10. address range.

Any reason why you aren’t connecting directly to the robot DLink SSID 1684?

As stated before, the robot is currently in the bag.

Won’t be able to get data like that with the robot for a week or so.

If it’s any help, our rookie team’s driver station (x86 compared to my x64, Windows 8 compared to my windows 7, decently different laptops) also has the same hangtime.

Sorry, we have several DLink’s left to test with after one got bagged with our robot.

Does your rookie team work in the same space as your team?
Is it a common WiFi environment or a common school system that might utilize similar AP setups?

It looks like you might be describing troubles only using the direct USB connection though.
Do you have the same issues with USB, Ethernet and wireless?

Yes

Is it a common WiFi environment or a common school system that might utilize similar AP setups?

I don’t understand what you’re asking… though my next answer might help

It looks like you might be describing troubles only using the direct USB connection though.
Do you have the same issues with USB, Ethernet and wireless?

Wireless works fine, normal ~200ms connection time to robot (ethernet ~100ms). USB has never worked for me, not since day 1, I’ve used exclusively Ethernet/wireless.

ipconfig for windows. Invariably I use the wrong one.

Oops. Yeah, I meant ipconfig, but auto-correct fixed it for me.

I was wondering if there were many interfaces up and whether the DNS server may be sent the .local name and be taking quite awhile to give up and revert to mDNS.

I think the thing I’d do is to disable the wifi and see if the USB timing changes. If that helps, you at least know why it takes so long. I’m not sure how to get the .local to go to mDNS immediately.

Greg McKaskle

One thing that might be useful in future imaging tools is to provide an option for setting up a static IP (default: disabled). The .local address would still work so the DS would be able to find it, and for those of us who mDNS doesn’t work we’d still have reliable access to the robot, without having to figure out how to setup a static IP.