Go to Post Welcome to FIRST, the place where you can be competitive in a team. Here people can learn more in one year of FIRST than in four years of high school. - dude__hi [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 10-05-2010, 15:14
byteit101's Avatar
byteit101 byteit101 is offline
WPILib maintainer (WPI)
AKA: Patrick Plenefisch
no team (The Cat Attack (Formerly))
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Worcester
Posts: 699
byteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of light
cRIO networking

How would one go about changing the IP addresses of the cRIO's ports? More specifically, how would you (assuming it is possible) change the cRIO's port 2 from the 192.168.0.x network to a different network (ex 10.4.52.x)?

Also, Is it possible for the cRIO to have a proxy program on it, so stuff on port 1 can communicate with stuff on port 2 (like wireless camera access)?

For networking, how does the cRIO know what port to put it out on? With subnet 255.0.0.0? 255.255.255.0?
__________________
Bubble Wrap: programmers rewards
Watchdog.Kill();
printf("Watchdog is Dead, Celebrate!");
How to make a self aware robot: while (∞) cout<<(sqrt(-∞)/-0);
Previously FRC 451 (The Cat Attack)
Now part of the class of 2016 at WPI & helping on WPILib
  #2   Spotlight this post!  
Unread 10-05-2010, 15:30
apalrd's Avatar
apalrd apalrd is offline
More Torque!
AKA: Andrew Palardy (Most people call me Palardy)
VRC #3333
Team Role: College Student
 
Join Date: Mar 2009
Rookie Year: 2009
Location: Auburn Hills, MI
Posts: 1,347
apalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond repute
Re: cRIO networking

Port 1 is 10.xx.yy.2. You cannot change that
Port 2 is 192.168.1.1? You cannot change that either.

You can run a proxy.
If you are using the network cam, its IP is 192.168.1.90 so the cRio's port2 address makes sense.
Are you trying to forward camera images to the dashboard without overloading the cRio?
Are you using LabVIEW? If you open the ethernet cam in LV, set framerate and size and other options you want, and then stop (don't even save a refnum), and delete all vision code, it wont make a big impact on CPU speed (not any less then proxying the camera).
__________________
Kettering University - Computer Engineering
Kettering Motorsports
Williams International - Commercial Engines - Controls and Accessories
FRC 33 - The Killer Bees - 2009-2012 Student, 2013-2014 Advisor
VEX IQ 3333 - The Bumble Bees - 2014+ Mentor

"Sometimes, the elegant implementation is a function. Not a method. Not a class. Not a framework. Just a function." ~ John Carmack
  #3   Spotlight this post!  
Unread 10-05-2010, 15:47
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,567
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: cRIO networking

Are you asking how to do this inside the context of FIRST, or outside? You can change a lot of things through NI-MAX, that won't necessarily work with FIRST.
  #4   Spotlight this post!  
Unread 10-05-2010, 15:51
Peter Johnson Peter Johnson is offline
WPILib Developer
FRC #0294 (Beach Cities Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Redondo Beach, CA
Posts: 255
Peter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud of
Re: cRIO networking

Quote:
Originally Posted by byteit101 View Post
How would one go about changing the IP addresses of the cRIO's ports? More specifically, how would you (assuming it is possible) change the cRIO's port 2 from the 192.168.0.x network to a different network (ex 10.4.52.x)?

Also, Is it possible for the cRIO to have a proxy program on it, so stuff on port 1 can communicate with stuff on port 2 (like wireless camera access)?

For networking, how does the cRIO know what port to put it out on? With subnet 255.0.0.0? 255.255.255.0?
I believe the ni-rt.ini file in the root of the cRIO filesystem is where the IP addresses are set (although there might be another ini file as well, I'd have to look). The cRIO knows which port to send data out of based on the IP address and subnet mask set up for each port. It may have a default route set up for IP addresses within neither of those ranges, but I don't know what it is.
__________________
Author of cscore - WPILib CameraServer for 2017+
Author of ntcore - WPILib NetworkTables for 2016+
Creator of RobotPy - Python for FRC

2010 FRC World Champions (294, 67, 177)
2007 FTC World Champions (30, 74, 23)
2001 FRC National Champions (71, 294, 125, 365, 279)
  #5   Spotlight this post!  
Unread 10-05-2010, 16:13
Tom Line's Avatar
Tom Line Tom Line is offline
Raptors can't turn doorknobs.
FRC #1718 (The Fighting Pi)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 1999
Location: Armada, Michigan
Posts: 2,521
Tom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond repute
Re: cRIO networking

It seems to me that you can reassign the crio IP address in the format tool. Isn't that the deciding factor in whether it is 10.17.18.2 or 100.1.7.3?

Won't that re-write the .ini file when you format and work just fine?
  #6   Spotlight this post!  
Unread 10-05-2010, 16:23
Racer26 Racer26 is offline
Registered User
no team
Team Role: Alumni
 
Join Date: Apr 2003
Rookie Year: 2003
Location: Beaverton, ON
Posts: 2,229
Racer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond repute
Re: cRIO networking

I suspect the OP is wanting to use the cRIO LAN2 port for tethering, and the LAN1 port for wifi, so they're not (un)plugging the jack all the time. This would be a good idea for FIRST to implement.
  #7   Spotlight this post!  
Unread 10-05-2010, 16:33
apalrd's Avatar
apalrd apalrd is offline
More Torque!
AKA: Andrew Palardy (Most people call me Palardy)
VRC #3333
Team Role: College Student
 
Join Date: Mar 2009
Rookie Year: 2009
Location: Auburn Hills, MI
Posts: 1,347
apalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond repute
Re: cRIO networking

Except you would loose use of port2 for the camera... Maybe they could allow a hub on that port? Or use a radio with a built-in hub.
__________________
Kettering University - Computer Engineering
Kettering Motorsports
Williams International - Commercial Engines - Controls and Accessories
FRC 33 - The Killer Bees - 2009-2012 Student, 2013-2014 Advisor
VEX IQ 3333 - The Bumble Bees - 2014+ Mentor

"Sometimes, the elegant implementation is a function. Not a method. Not a class. Not a framework. Just a function." ~ John Carmack
  #8   Spotlight this post!  
Unread 10-05-2010, 16:37
Peter Johnson Peter Johnson is offline
WPILib Developer
FRC #0294 (Beach Cities Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Redondo Beach, CA
Posts: 255
Peter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud of
Re: cRIO networking

Quote:
Originally Posted by apalrd View Post
Except you would loose use of port2 for the camera... Maybe they could allow a hub on that port? Or use a radio with a built-in hub.
While in 2009 you could only hook the KOP camera up to port 2, this year, a hub was indeed allowed on port 2 (as a custom circuit). The camera fell under custom circuits as well. Port 1 had to be a direct connection to the radio, but port 2 was free for custom circuits.
__________________
Author of cscore - WPILib CameraServer for 2017+
Author of ntcore - WPILib NetworkTables for 2016+
Creator of RobotPy - Python for FRC

2010 FRC World Champions (294, 67, 177)
2007 FTC World Champions (30, 74, 23)
2001 FRC National Champions (71, 294, 125, 365, 279)
  #9   Spotlight this post!  
Unread 10-05-2010, 20:14
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,751
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: cRIO networking

The best way to change networking settings is in Max -- NI-Measurement and Automation Explorer. It is able to make lots of changes to the cRIO including SW installs, but for what you are asking, it primarily changes the ini file.

Since the FRC rules could be quite different next year, I'd say, make as many changes as you like for off-season. Next year pay attention to the new rules when they come out and change the system accordingly.

Interesting things to consider:
Put a switch or hub on port 1 to allow for DS and programming laptop to connect by cable without removing the bridge. You can also modify the camera IP, move it to the switch and have the dashboard read directly from another http connection to the camera -- no overhead for the cRIO whatsoever. It is also possible to add a route to the cRIO so that the camera on port two can be forwarded by the TCP stack rather than by a cRIO program -- not sure how beneficial this is compared to the direct connection.

Greg McKaskle
  #10   Spotlight this post!  
Unread 10-05-2010, 20:54
byteit101's Avatar
byteit101 byteit101 is offline
WPILib maintainer (WPI)
AKA: Patrick Plenefisch
no team (The Cat Attack (Formerly))
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Worcester
Posts: 699
byteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of light
Re: cRIO networking

I was hoping to be able to do a few things, all (hopefully) 2010 FRC legal

1. (with a switch on 2) have a two cameras on a wireless robot
a. process images and find a target
b. tweak the camera's config for optimum images using their built in server
c. view both images from both cameras at the same time
2. have 2CAN and camera on wireless robot
a. view camera (by passthrough or other source)
b. work with 2CAN config (via built in server)

diagrams:
Code:
jag cam cam
 |    |    |
2Can/Switch
      |
     [2] cRIO
     [1]
      |
    WGA
  ~~~~
Router
|
Computer

Me
__________________
Bubble Wrap: programmers rewards
Watchdog.Kill();
printf("Watchdog is Dead, Celebrate!");
How to make a self aware robot: while (∞) cout<<(sqrt(-∞)/-0);
Previously FRC 451 (The Cat Attack)
Now part of the class of 2016 at WPI & helping on WPILib
  #11   Spotlight this post!  
Unread 11-05-2010, 00:53
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,006
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: cRIO networking

Quote:
Originally Posted by byteit101 View Post
I was hoping to be able to do a few things, all (hopefully) 2010 FRC legal
Why do you think you need to change the IP addresses on the cRIO? Just make the 2CAN IP compatible with the port 2 network. I believe that is even what is recommended in the 2CAN user guide.

-Joe
  #12   Spotlight this post!  
Unread 11-05-2010, 06:50
byteit101's Avatar
byteit101 byteit101 is offline
WPILib maintainer (WPI)
AKA: Patrick Plenefisch
no team (The Cat Attack (Formerly))
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Worcester
Posts: 699
byteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of light
Re: cRIO networking

Oops, forgot 3
3. not have to change the computer ip address to work with the 2CAN and Cameras when they are connected to the computer
__________________
Bubble Wrap: programmers rewards
Watchdog.Kill();
printf("Watchdog is Dead, Celebrate!");
How to make a self aware robot: while (∞) cout<<(sqrt(-∞)/-0);
Previously FRC 451 (The Cat Attack)
Now part of the class of 2016 at WPI & helping on WPILib
  #13   Spotlight this post!  
Unread 11-05-2010, 13:14
Racer26 Racer26 is offline
Registered User
no team
Team Role: Alumni
 
Join Date: Apr 2003
Rookie Year: 2003
Location: Beaverton, ON
Posts: 2,229
Racer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond repute
Re: cRIO networking

I'm fairly certain the 2010 FRC rules explicitly allowed a robot-mounted switch to do just that, run a 2CAN and Camera.
  #14   Spotlight this post!  
Unread 11-05-2010, 13:32
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,006
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: cRIO networking

Quote:
Originally Posted by byteit101 View Post
Oops, forgot 3
3. not have to change the computer ip address to work with the 2CAN and Cameras when they are connected to the computer
So you want the devices on the same network, but not on the same network.

As long as you don't care if off network routing works, you can set the subnet mask to 255.0.0.0 on the PC and the 2CAN and the camera. Set 255.255.255.0 on each of the cRIO ports. Then the scheme you laid out will work for the case where every device is on one of those two networks. On caveat is you won't be able to talk to the 2CAN or camera via port 1 on the cRIO.

-Joe
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Networking remote dashboard rwood359 Technical Discussion 13 25-09-2010 23:06
Networking help! haroony341 Chit-Chat 8 06-05-2007 22:23
Networking Problems Mike Chit-Chat 0 26-01-2005 13:57
Networking Dial-up Ashley Weed Math and Science 13 05-09-2003 23:30
Home Networking on Windows XP D.J. Fluck Chit-Chat 16 14-09-2002 14:21


All times are GMT -5. The time now is 03:32.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi