Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   General Forum (http://www.chiefdelphi.com/forums/forumdisplay.php?f=16)
-   -   Use of USB Hub with Ethernet RJ45 Adapter (http://www.chiefdelphi.com/forums/showthread.php?t=131740)

Ed Law 28-12-2014 13:55

Use of USB Hub with Ethernet RJ45 Adapter
 
I recently purchased a small laptop to be used as our team's driver station. Our old one was broken. It has one USB 3.0 on the right and one USB 3.0 on the left but no ethernet port. I bought a 3 Ports USB 3.0 Hub with RJ45 10/100/1000 Gigabit Ethernet Converter LAN Wired Adapter.

Our driver station has three joysticks, one on the left for the robot operator and two on the right for the robot driver.

My question is does the RJ45 coming off of the adapter has to be dedicated to connecting to the FMS or is it okay to connect some joysticks to the 3 USB Hub also? Can you please explain the data rate requirements instead of a yes or no answer so I can learn something? Thanks.

billbo911 28-12-2014 14:09

Re: Use of USB Hub with Ethernet RJ45 Adapter
 
Ed, it would be helpful if you could also provide the make and model of the laptop as well as the USB adapter you bought.

It is quite likely that both USB 3 ports share common hub internally to the laptop. They may also be sharing the bandwidth available.

My $.02 without doing a bunch of calculations is that it might be beneficial to get a second USB hub and use it only for joysticks and the other for ethernet.

I'll need to dig a bit to find out what the data rates use for joysticks is.:o

Leav 28-12-2014 15:11

Re: Use of USB Hub with Ethernet RJ45 Adapter
 
I have very little knowledge in the matter, but since this is such a "weird" question for the non-FIRST world, I would think the best approach to this would be to setup a test.

Basically you want to know if the data transfer rate for the network will suffer because of the joysticks being connected, right?

Maybe use something like this program to test the network speed and use some sort program or page like this to test the joysticks.
  1. Run the network test with no joysticks
  2. run the network test with joysticks running and working (mash the buttons!!!)


I would probably feel good if the tests showed no significant difference.

-Leav

engunneer 28-12-2014 18:25

Re: Use of USB Hub with Ethernet RJ45 Adapter
 
I would be inclined to say that the fact that it is all USB3 means that you should be ok.

From wikipedia, USB3 can get 3.2 Gbps asa typical datarate. Let's say the field is running gigabit (unlikely), so that uses up 1Gbps of the 3.2. The remaining 2.2Gbps can easily be split to three joysticks. The joysticks I have seen are all USB 2 or 1.1, so lets say 280 Mbps, assuming they use up all the possible bandwidth they can (which they don't). 3x280Mbps < 2.2 Gbps. So even including all the ports running at the max possible rate, the USB3 spec still has plenty of room for all this data.

Also, the maximum datarate from the robot's bridge is 300Mbps on the wireless side.

Jared 28-12-2014 18:40

Re: Use of USB Hub with Ethernet RJ45 Adapter
 
From experience, data rate isn't the problem, it's the latency from the adapter.

Greg McKaskle 28-12-2014 20:15

Re: Use of USB Hub with Ethernet RJ45 Adapter
 
I have used an RJ45 to USB adapter on a tablet and it worked well enough. As a more helpful datapoint, the roboRIO images, downloads code, runs debugging protocols, DS, DB, and video over a USB2 connection that bridges ethernet. I have seen the latency climb up when too many things are going on, but it is generally OK, and I think most of the issues that do exist are due to the virtual network NIC driver, not the bus itself.

As for rates, the DS rates in past years were basically preallocated. The combined bandwidth of control and status was ~1Mbit at all times. The newer protocol has a better idea of what is actually used, is more dynamic, and uses TCP for some elements instead of repeated UDP transmissions. The newer protocol will use way less bandwidth. Depending on access point settings, it may also require fewer management packets to use bandwidth.

The video limits may change, but have historically been 6Mbits.

So a DS plugged into the field would have used about 7Mbits with video and about 1Mbit without video.

As for the joysticks, it depends on the reports of the device, but the typical FRC joystick transmits a five byte report . I'm not certain of the rate, but I'd guess that it is 50, possibly 100Hz. The Xbox joystick looks to take twelve bytes per update, as a comparison. Other custom ones will use one or two bytes per continuous axis and a bit per button. Rumble will be a few bytes the other direction and will be at a slower rate.

If there were a test I'd be curious to run, it would be plugging a dirt-slow USB1 device into the hub and see if that affects large and time-sensitive transfers such as a video stream or perhaps a file transfer.

Please post any results or conclusions. I use a thunderbolt adapter in order to get RJ45, and my wife's laptop has probably never used one in years. Wifi all the way.
I suspect your laptop's description will become increasingly common.

Greg McKaskle

Ed Law 28-12-2014 21:23

Re: Use of USB Hub with Ethernet RJ45 Adapter
 
The USB hub I bought is this http://www.amazon.com/gp/product/B00...?ie=UTF8&psc=1

We use one Logitech Attack 3 joystick and two Logitech Extreme 3D Pro joysticks which have USB 2.0

MrRoboSteve 28-12-2014 22:04

Re: Use of USB Hub with Ethernet RJ45 Adapter
 
Clearly this hub is the best for FRC use.

Or maybe it is this one.

More seriously, I think you're unlikely to run into throughput issues in FRC matches if you are using one hub to connect two joysticks and a USB Ethernet adapter, even if you're running at USB 2.0 speeds. I would instead focus on getting a USB Ethernet adapter that has rock solid drivers. Finally, using only one of the USB ports on your computer means that the port lasts longer. They do wear out.

Oh, and please test it out before you get to the competition. These haven't been stocked as spares in previous years.

Mark McLeod 29-12-2014 10:22

Re: Use of USB Hub with Ethernet RJ45 Adapter
 
I've usually run into USB issues not with the bitrate, but with the total power draw through a single port. Particularly a problem with hubs.
Too much peak power from one port can cause device brownouts.

It's not just the max USB power spec, but the Windows power saving features that cause problems, particularly while operating on battery power alone.
I'd recommend turning off USB power saving features through the Device Manager.

MrRoboSteve 29-12-2014 13:12

Re: Use of USB Hub with Ethernet RJ45 Adapter
 
You're right that aggressive power management can cause problems. Testing the driver station in the exact configuration you plan to use BEFORE the end of build season is a good idea.

Now that there's shore power at the driver station, I think using it is a best practice.

Doug Frisk 29-12-2014 15:55

Re: Use of USB Hub with Ethernet RJ45 Adapter
 
Quote:

Originally Posted by MrRoboSteve (Post 1417721)
You're right that aggressive power management can cause problems. Testing the driver station in the exact configuration you plan to use BEFORE the end of build season is a good idea.

Now that there's shore power at the driver station, I think using it is a best practice.

I'm astounded by the number of teams that don't plug in their drivers station during a match. There is no downside to having the laptop on AC power and plenty of downside to relying on the battery.


All times are GMT -5. The time now is 05:44.

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