PDA

View Full Version : Using the school's Network as the Bridge


DavisC
10-26-2011, 04:06 PM
Hey everyone,

Well, I plan to attempt having my laptop connected to my school's network, which in theory each school network router would acess the Robot's Radio when possible.

So the most basic breakdown of this would be that (assuming the school has only 1 router) the router (still using its default IP settings) would need to be able to connect to the Driver Station, my Laptop, the Robot Radio, and the cRIO.
Would I be able to just set a static IP to each component (say make each component 10.0.0.zz)? OR would I have to manually set the IP adress for each componet to say 128.0.0.zz (would I be able to change the DS)?

Radio 10.xx.yy.1
cRIO 10.xx.yy.2
DS 10.xx.yy.5
Laptop 10.xx.yy.6
Cam 10.xx.yy.zz (11-20)
(where xx.yy would represent 5.39 for normal use and 00.00 for the schools network)

So I guess part of this would be the question of.. how the Router that connects the Laptop and Robot Radio together is configured for NORMAL use.

I plan on attempting this at my house tonight and school tomorrow night so I'll post back with results and check for updates.
Thanks,
Davis

~Cory~
10-26-2011, 04:16 PM
May I suggest to use a subnet mask of 0.0.0.0 and you should be fine.

Make sure you are not breaking any weird school bylaws...
============================================
EDIT:

I have done more research and 0.0.0.0 wont work. (its theoretical). However, you may want use Network address translation. Ill post what I can find.

Joe Ross
10-26-2011, 04:20 PM
use a subnet mask of 0.0.0.0 and you should be fine.

I'm not sure I've ever seen a device that lets you set a subnet mask of 0.0.0.0. Even if they did, it wouldn't let you surf the internet from behind the router, because it would think the whole internet was behind the router.

Mark McLeod
10-26-2011, 05:55 PM
The router IP doesn't really matter, nor does the subnet mask associated with it, but the robot network must be the private network 10.xx.yy.zz. You have no choice there.
I think that's a common misconception about routers. A router uses it's routing table (IPs and associated subnet masks for all connected devices) to figure out what to do with message packets, not it's own IP/mask. It's own IP/mask only matter when you are trying to talk directly to it, as when you want to login to look at and change the router settings. If we were restricted to having an IP address in common with a router, then no one would ever be able to talk to another computer out on the Internet.

I'm not clear on the concept you are going for.
If you really used the school's router as a "bridge" for the robot, then it would have to be mounted on the robot...

Do you just want to be able to access the Internet from your Driver Station/programming laptop?
If that's so, then why not just run two separate networks from your laptop?
One NIC set to 10. and the other to DHCP from the school's router?

Here's a network briefing that might help: http://team358.org/files/workshops/NetworkTopology.ppt

Joe Ross
10-26-2011, 06:22 PM
Do you just want to be able to access the Internet from your Driver Station/programming laptop?
If that's so, then why not just run two separate networks from your laptop?
One NIC set to 10. and the other to DHCP from the school's router?

Another option is to connect the router from the 2009 KOP to the school network and then connect all the FRC stuff to the router.

DavisC
10-26-2011, 08:20 PM
Ok, and as clarification for what I am attempting. I want my Laptop to wirelessly connect to the Network (school's complete local internet system in place of the WRT610N) which will then connect wirelessly to the Robot Radio (in place of the DAP-1522).

So what I got from the presentation is that my cRIO and DS can still be set to their FRC IPs (10.5.39.zz) while the Network (instead of WRT610N) can be at its default address and me still being able to connect through it.

And btw I am not breaking any school bylaws (infact the heads of the internet system at the school, after I mentioned it to them, told me to take it in one day and we would try it; more or less they don't care cause our school is pretty lenient being a pvt school and all even if for Fine Arts).

PS: yea I have no desire to access the Internet with this setup (although other students connected to the router still need to be able to)

Mark McLeod
10-26-2011, 08:58 PM
It's eminently doable if you have the assistance of the school's IT people, since routers can be purposely set to disallow some types of wireless connections or traffic.

You could of course link your laptop directly to the robot DAP-1522 without any router of any kind, but if by "robot radio" you mean one of the older FRC bridges, then yes you do need a router as an intermediary.

Is this so you can remotely drive the robot all over the school without leaving your room?

SuperS_5
10-26-2011, 09:57 PM
It's eminently doable if you have the assistance of the school's IT people, since routers can be purposely set to disallow some types of wireless connections or traffic.
I know that the public schools around here all have very strict network policies. Even the wireless access points usually will not allow for communication between the wireless nodes. (Often the LAN segments are limited to the room, so nodes may only access other nodes inside the room.) This would severely limit the connection between devices.

If your private school is much more cooperative, I agree that with their help it is definitely possible. I just want to mention that the cRIO and the FRC framework can consume a large amount of bandwidth when running, and is very sensitive to latency problems. Even if you can get it connected, you may impact others on the network. If the network becomes saturated, the connection to the cRIO is often the first to die.



Is this so you can remotely drive the robot all over the school without leaving your room?

For our demonstrations and testing, I often mount the router directly on the robot. In an attempt to be as close to the framework as possible, the router is still only wireless connected to the bridge, which is still wired to the cRIO. (Even if they are only a few inches apart.) I power the router from the power distribution board. This allows me to control the robot from anywhere within wireless range of the robot, as long as I have my laptop with me. (Sometimes in my laptop bag while holding the USB controller, so I drive and not carry the robot a few hundred meters.)

Alan Anderson
10-26-2011, 10:15 PM
Ok, and as clarification for what I am attempting. I want my Laptop to wirelessly connect to the Network (school's complete local internet system in place of the WRT610N) which will then connect wirelessly to the Robot Radio (in place of the DAP-1522).

In 2011, the Robot Radio is the DAP-1522. If you don't need a connection to the Internet, just put the DAP on the robot in AP mode the way it was documented in the setup instructions at the beginning of the year. Your driver station laptop will connect directly to the robot, with no other routers or access points needed.

DavisC
10-26-2011, 10:15 PM
You could of course link your laptop directly to the robot DAP-1522 without any router of any kind, but if by "robot radio" you mean one of the older FRC bridges, then yes you do need a router as an intermediary.

Is this so you can remotely drive the robot all over the school without leaving your room?

Yea pretty much, cause this year my school resetup its internet system so that all of the routers (we got like 15 or so in the school) are under 1 common SSID so that throughout the campus, you only need to connect once (unlike previous yrs where we had E-Hall, E-Hall 2, B-Hall, and etc).
So while I can connect directly to the DAP I would like to use the schools routers and a tie.

I have been testing the setup and if I changed the IP of the cRIO (using MAX) to say 192.168.2.2, my Laptop to 192.168.2.6, and the DS team # to 16802 (balances the numbers to 168.2) I am unable to detect the cRIO through wired connection. I believe this is because the actual DS still attempts to find a cRIO with the IP of 10.168.2.2...
If I remember correctly their was a way to edit/make your own DS or Dashboard, and it would probably be possible to change the default search address their (but I don't remember anything about it).

I still have not attempted Static IPs but it seems impossable for my home routers because with the default address, I can only assign static IPs of 192.168.2.zz...

Now in the presentation it has a Laptop able to access the web and another access the Robot but that sends it through the WRT router then the typical Internet router...

Looks like this is goin to be one tough cookie...

Mark McLeod
10-27-2011, 06:00 AM
I still have not attempted Static IPs but it seems impossible for my home router because with the default address, I can only assign static IPs of 192.168.2.zz...

Your static IPs can be whatever you wish regardless of your home router's IP address.
It's a router's job to be uniquely different than everyone else.:)
It's convention to keep local devices in the same IP address space. It makes it easier to talk about it and catch mismatches, but it also misleads you into thinking that's the only way it will work.
For instance, my home router/gateway uses a 71.190. address (necessary since a private network IP cannot talk directly to the Internet), but the dozen or so computers in the house are all assigned private 192.168. addresses (one uses 132.), except for when the robots are visiting and I run a mixture of 192. and 10. addresses. (192.168. is one of the private address ranges, like 10.)

You won't get very far trying to completely makeover how our 10. robot networks are setup. Why are you doing that, just experimenting?
It is a good learning experience to dig into things like that.

It's actually a pretty trivial problem. It just takes getting used to the concepts involved.
There are a huge number of variations possible (IP is a pretty big space), but also many ways to foul it up until you learn what's important.

DavisC
10-27-2011, 11:57 AM
Yea, I was changing the whole 10.x system because I wasn't able to get it to work with 192.x ...
So it is my understanding that it is possible to have the Home Router set to its default (192.168) and still connect through it (with my Laptop set to 10.xx) to the Robot Radio (set to 10.xx)? Ok, so what on each components (referring to DS side, intermediate Router, and cRIO side) would be of importance.
For yours, it is my understanding that you have your home Router (one which your computers connect through) with an IP of 71.190 (so it connects to the robot and and indirectly, the internet) which from their, could connect to your Robot Radio or through another Router set at 192.168 to the Internet?

Would this be possible while having the Middle Router which (though a line) connects to the Internet and the robot, set to an IP of 192.168...?

Mark McLeod
10-27-2011, 08:09 PM
For simplicity's sake you want no more than a single router in the direct robot network. It can complicate things going router to router and can take a little more expertise to track down problems. Your school IT folks can handle that if it's necessary.

I have a test rig at home that I hook up a half dozen different ways depending on how lazy I am and what I'm doing at the time.
For some programming tests I leave a cRIO sitting in one room running off a regulated power supply while I wander the house with my laptop using the house wireless to download and test example code of the cRIO. I can keep my wife company at the dining room table that way.

I just turned it on a minute ago and did it this way:
My laptop connects wirelessly directly to my home router (IP must be 10., netmask doesn't matter as long as it's valid)
IP: 10.3.58.9 (I also tested IP 10.3.58.8 just for fun)
netmask: 255.0.0.0 (I also confirmed that 255.255.255.0 works fine too)
The router connects to the cRIO via my household Ethernet -> switch -> cRIO
IP: 192.168.1.1 (doesn't matter what IP or netmask is used)
netmask: 255.255.255.0 If I wanted to use the Internet, then I would connect Ethernet to my laptop and set the Ethernet port to DHCP.
My Gateway IP for Internet traffic is 71.190.x.y

If you add in a robot bridge, then just use a 10. IP and make sure the SSID/Security matches your router/AP.

DavisC
10-27-2011, 10:30 PM
Hmm.. thats an interesting point i forgot to do in my tests. when i setup the Robot Radio (DAP) I never though of making it the same SSID as the as the school's network (and yea im testing this with 1 network router to begin).

Also, I will start doing this but 1 tech teacher mentioned to just start with having my Laptop wired to the Network and the only wireless was to the Robot (just to decomplicate things some).

Then when we get to multiple routers it should be interesting cause our setup is something like this:
(all the switches are 20 ports)
Modem > Server > Switch > Ethernet/Wifi (many like this)
Switch > Switch > Ethernet/Wifi (many like this)
Switch > Switch > Enthernet/Wifi (many like this)
Etc, this kinda follows to get enough ports for each building and to get to enough Wifi access points for each building (total of 5 buildings now (kinda spread out))

Mark McLeod
10-28-2011, 07:29 AM
It's a good plan begin with as simple a network as possible.
To start, I'd actually recommend connecting both your laptop and your cRIO directly via Ethernet to your school network and confirm you can run your Driver Station successfully.
Then you are starting with something simple that you are sure works and you can add one new wrinkle at a time:

laptop->school router->cRIO (Ethernet all)
DAP dropped in via Ethernet (laptop->school router->DAP->cRIO)
Laptop to wireless (laptop/school AP/router->DAP->cRIO)
DAP to wireless (laptop/school AP/router/DAP->cRIO)
Make sure the DAP is set to bridge mode, not AP.

The multiple switches won't matter.
I oversimplified my home network, it actually goes:
AP/router -> 16-port switch -> 8-port switch -> cRIO

DavisC
11-01-2011, 04:08 PM
Well I made a new attemp yet again today, and I used the components that come with FIRST so y'all can test it yourself if ya want (used: DAP-1522, WRT610N, and all the other normal robot components).

-First I reset the DAP-1522 (pressed and held "reset" button) and followed the FRC manual for configuring it (IP, SSID, etc).
-Then I reset the WRT610N (held "reset" button) and left the IP as the default (192.168.1.1, I believe) and changed the SSID to 539.
-So I connected my Laptop (IP of 10.5.39.6) to the WRT via cable, and the WRT was connected to the DAP via cable, and the DAP was connected to the cRIO via cable.
-----From that, I recieved communication to the cRIO in the Driver Station.
-So I disconnected the cable going from the WRT to the DAP.
-----I was not able to recieve communication by doing that.

So, any suggestions?

Mark McLeod
11-01-2011, 05:01 PM
What mode is the DAP in (AP/Auto/Bridge)?
What part of the FRC manual did you follow (there are two different ways given to setup the DAP as I recall)?

(and why are you using the WRT? Sort of a pretend school router?)

DavisC
11-01-2011, 09:22 PM
What mode is the DAP in (AP/Auto/Bridge)?
What part of the FRC manual did you follow (there are two different ways given to setup the DAP as I recall)?

(and why are you using the WRT? Sort of a pretend school router?)

The DAP was in Bridge mode. I followed the way where I clicked config manually > put in the correct team # > gave it correct IP > did not password protect (I don't have access to the manual right now so I hope thats enough description).

And yes, I am using the WRT as a "pretend school router" to just simplify things. I had also named that as well to 539 b/c, while my school network is named TES, I do have the flexability for "go time" to name the DAP to "TES" as well.

any ideas?

Mark McLeod
11-02-2011, 05:58 AM
You took a good first step by testing everything while directly connected.
Since it works while connected via Ethernet, that proves your basic networking IP/netmasks are set correctly.

Your second step failed showing that just your wireless settings between the WRT and DAP are not compatible.
So compare the purely wireless settings between the boxes.
2.4 vs 5 Gz
SSID (539)
Security (none)
etc.

DavisC
11-02-2011, 04:16 PM
Thank You all!

well, I was reconfiguring settings (tested with wired connection 1st) and just when I was out, a little green light came up on the Driver Station signifying I had communication (I was Wired to to the WRT, which was Wifi to the DAP, wired to the cRIO)!!!!!
I had finally connected with the DAP and WRT connected via WIFI! But I decided to go on, and with a breeze I changed the IP of my Laptops wifi and connected to the WRT via Wifi; this too gave me communication!
So, finally managed do: Laptop > -Wifi- > WRT > -Wifi- > DAP > -wired- > cRIO.

Thanks everybody for your help. I took screenshots of the config settings for the DAP (D-Link) and the WRT (Cisco/Linksys), they are in the attached ZIP folder.

Just gotta see sometime if I can config it properly to the schools network (might pose difficulties because of their new Security System where every student has a username and password which is kept on a school server).

DavisC
11-12-2011, 10:32 AM
Just an update on how it is goin (had some delays cause I had to prep everything for anoffseason event).

The Internet security server at my school has posed some difficulties (we are setup with WPA2-Enterprise) and I (and the school teachers) are not sure that it is possible to setup a wirelessly bridged connection.

How it currently works (on life support), I have it as follows (dashed for wifi, line for wired):
MyLaptop- - - - - -SchoolsNetwork- - - - - -SecondLaptop------RobotRouter------cRIO

So I have to have a SecondLaptop on the robot to logon to the SchoolsNetwork (the SecondLaptop has its wifi and wired connection bridged). Also the RobotRouter doesn't really serve a purpose in this scenario unless I'm using it to connect the camera too.

But our camera is dead so I currently plan have a USB Webcam connected to the SecondLaptop and use some online videochat system (if I manage to bridge the RobotRouter to the SchoolsNetwork I have an alternate way which would work).

-Davis