My USB 2.0 hub is really 1.0--anyway to check?

R

RayLopez99

I got gipped I think, and I always suspected it. For reasons too
complicated to get into (I manually timed the data transfer, the hub
looked 'old' even though it's stamped with the logo "2.0
USB" (probably counterfeit), Windows XP gives a 'warning' message: 'to
transfer faster, use 2.0'), I think my USB 2.0 hub is really 1.0

Is there a loopback plug to test it? Or should I just rely on manual
data transfer timing?

Can it be the fault of my mobo? It was state of the art in 2002--I
assume that was after USB 2.0.

RL
 
P

Paul

RayLopez99 said:
I got gipped I think, and I always suspected it. For reasons too
complicated to get into (I manually timed the data transfer, the hub
looked 'old' even though it's stamped with the logo "2.0
USB" (probably counterfeit), Windows XP gives a 'warning' message: 'to
transfer faster, use 2.0'), I think my USB 2.0 hub is really 1.0

Is there a loopback plug to test it? Or should I just rely on manual
data transfer timing?

Can it be the fault of my mobo? It was state of the art in 2002--I
assume that was after USB 2.0.

RL

I'd probably use UVCview and check the config information.

For example, there is enough info there to determine -

1) max rate device can run at (USB1.1 or USB2)
2) current negotiated rate

Negotiated rate can be limited by:

1) Wrong or missing OS driver
2) Bad USB cabling, typically coming through a
crappy computer case front connector. A large
number of older Antec cases, had USB 1.1
connector assemblies on the front. These prevented
USB 2.0 rates from happening. They'll only negotiate
at USB 1.1 rates.

To check out (2), you'd plug the hub into a rear connector
on the computer, in the I/O plate area. Rear connectors
generally work better, as they're joined right to the
motherboard.

If you check Device Manager, and look in the USB section, there
should be at least one "Enhanced" entry. That would be the
USB 2.0 driver, for at least a single logic block. The drivers
are loaded per logic block, and one logic block can drive six
USB connectors at USB 2.0 rates. The entries in Device Manager
aren't "ports", so if you're baffled by the total count of
items, that's the problem. The list is for logic blocks,
and not per connector on the computer.

More info on UVCView is here.

*******
ftp://ftp.efo.ru/pub/ftdichip/Utilities/UVCView.x86.exe
http://www.users.on.net/~fzabkar/USB_IDs/UVCView.x86.exe

File size is 167,232 bytes.
MD5sum is 93244d84d79314898e62d21cecc4ca5e

This is a picture of what the UVCView info looks like.

http://www.die.de/blog/content/binary/usbview.png

Some information on the parameters seen in UVCView.

http://www.beyondlogic.org/usbnutshell/usb5.htm

Using the VID/PID info from UVCView, for the plugged
in device, you should be able to look up the device
and identify it here. This would tell you what
chip was used for your USB device, and provide a
way to determine whether it was genuine or not.

http://www.linux-usb.org/usb.ids

To identify a device using UVCView, it should be
plugged into one of the computer connectors. As far
as I know, UVCView only presents a list of things
seen directly on the computer connectors.
*******

Paul
 
R

RayLopez99

    Paul

Thank you for the advice. I will not load the program you reference,
only because it's not a diagnostic but a USB camera viewer that
happens to have a diagnostic in it, and I don't want it potentially
interfering with my Logitech USB camera. But thanks anyway.

You confirmed what I suspected: USB in the back is more reliable than
USB front connectors.

As for cable length, it is 1 meter, short.

RL
 
P

Paul

RayLopez99 said:
Thank you for the advice. I will not load the program you reference,
only because it's not a diagnostic but a USB camera viewer that
happens to have a diagnostic in it, and I don't want it potentially
interfering with my Logitech USB camera. But thanks anyway.

You confirmed what I suspected: USB in the back is more reliable than
USB front connectors.

As for cable length, it is 1 meter, short.

RL

I've seen no notion of "interference" here.

UVCView is just an instance of Usbview, with a little added code
for reading out camera information. How Usbview works, is
documented here. It uses IOCTLs that already exist in the OS
and USB stack.

http://msdn.microsoft.com/en-us/library/ff558728(VS.85).aspx

Paul
 
R

RayLopez99

I've seen no notion of "interference" here.

UVCView is just an instance of Usbview, with a little added code
for reading out camera information. How Usbview works, is
documented here. It uses IOCTLs that already exist in the OS
and USB stack.

http://msdn.microsoft.com/en-us/library/ff558728(VS.85).aspx


Paul--thanks. Seems like this program is pretty safe. For now
though, I'm too busy to check and I'll live with USB 1.1 (it is slow
but does work)

But this thread raised an interesting question for me: I've been
looking around (not too hard, but keeping a lookout) for either free
source code or a paid, third party solution for reading / writing to
USB (the successor to Serial I/O ports) using C# programming language,
preferably a library I an drop into Visual Studio .NET. Most of the
free stuff I saw is in C, and I hate to try and port that.

If you have any links please do let me know.

Thank you,

Ray

stuff I found from your links, but no answers:

http://msdn.microsoft.com/en-us/library/ff558731(VS.85).aspx

http://bytes.com/topic/net/answers/637380-read-write-usb-port-using-c

I want to read/write on USB port using C# with out using any third
party software means directly using .NET 2005. Is that any way to do
so??Any input will be appreciated!!Thanks in Advance
 
R

RayLopez99

Paul--thanks.  Seems like this program is pretty safe.  For now
though, I'm too busy to check and I'll live with USB 1.1 (it is slow
but does work)

But this thread raised an interesting question for me:  I've been
looking around (not too hard, but keeping a lookout) for either free
source code or a paid, third party solution for reading / writing to
USB (the successor to Serial I/O ports) using C# programming language,
preferably a library I an drop into Visual Studio .NET.  Most of the
free stuff I saw is in C, and I hate to try and port that.

If you have any links please do let me know.

Thank you,

Ray

stuff I found from your links, but no answers:

http://msdn.microsoft.com/en-us/library/ff558731(VS.85).aspx

http://bytes.com/topic/net/answers/637380-read-write-usb-port-using-c

I want to read/write on USB port using C# with out using any third
party software means directly using .NET 2005. Is that any way to do
so??Any input will be appreciated!!Thanks in Advance

For example, for Serial I/O, as of 2008 Microsoft now has a library
devoted to it--see the link below. Is USB close enough to Serial I/O
that we can modify this library to access USB? I suspect not.

RL

Tutorial on Serial I/O (a library for .NET, as of December 2008 ):
http://www.c-sharpcorner.com/upload...12082008111137am/serialportcommunication.aspx
 
P

Paul

RayLopez99 said:
Paul--thanks. Seems like this program is pretty safe. For now
though, I'm too busy to check and I'll live with USB 1.1 (it is slow
but does work)

But this thread raised an interesting question for me: I've been
looking around (not too hard, but keeping a lookout) for either free
source code or a paid, third party solution for reading / writing to
USB (the successor to Serial I/O ports) using C# programming language,
preferably a library I an drop into Visual Studio .NET. Most of the
free stuff I saw is in C, and I hate to try and port that.

If you have any links please do let me know.

Thank you,

Ray

stuff I found from your links, but no answers:

http://msdn.microsoft.com/en-us/library/ff558731(VS.85).aspx

http://bytes.com/topic/net/answers/637380-read-write-usb-port-using-c

I want to read/write on USB port using C# with out using any third
party software means directly using .NET 2005. Is that any way to do
so??Any input will be appreciated!!Thanks in Advance

Well, first off, I'm not a software developer. I write short programs
for my own usage, but I'm not a computer science graduate or anything.

The OS uses "protocol stacks", and that gives an orderly way to
deal with things in the computer.

Some protocols stacks are built-in, and at the top of the stack,
may provide a convenient way to work with hardware. For example,
many details of setup may be hidden from you, so that you have
less work to do.

In other cases, (custom designed USB hardware, unlike any other),
you as the driver developer, are responsible for writing the
stack, from somewhere near the physical layer, on upwards. In that
case, there is still a layer you cannot access, as it belows to
the OS. The USB logic block in the Southbridge, contains multiplexed
conversations, and only one of those belongs to you. So the OS has
to route the thing you've registered for (endpoint), to you. And then,
your custom design details take care of the upper layers of the stack.
That might include reading and writing registers in the USB chip,
by sending packets of some sort to it. You'd be a driver developer,
but still not responsible for controlling the motherboard Southbridge
chip (as other software owns that).

I suspect you're talking about plugging in a USB to RS232 adapter
device. For example, I have two of those on the computer right now.
They use FTDI chips. At one level, they follow a USB class standard.
Which means, when the device is first plugged in, it is recognized
as a USB to RS232 adapter (it isn't completely unknown to the OS).
But you can also get a driver package, which promises to give you
a "virtual communications port". i have this installed. One of the
advantage of this, is it has its own control panel, so you can
set preferences for the hardware.

http://www.ftdichip.com/Drivers/VCP.htm

If I was to open a Hyperterminal window, and point it at COM3, I
can send bytes to the RS232 connector on the end of the cable. And
that is no different, than using a motherboard RS232. It would be
the same kind of software interface.

The Hyperterminal program, can't tell the difference between the
16550 driving COM1 and COM2, versus the FTDI chip driving COM3. All
those details are hidden. If I had an "ordinary" RS232 communications
package or method (say, some C# library), it could talk to COM3 just
as easily as COM1 or COM2. The reason for this, is WinXP doesn't allow
talking directly to hardware, so to talk to COM1 or COM2 in the first
place, I don't control the registers on the 16550 UART myself.

http://en.wikipedia.org/wiki/16550_UART

So

1) If you're using a USB to RS232 adapter chip and cable

and

2) You'd installed whatever is needed to make virtual COM ports

then the same software package that talks to regular RS232 ports
(COM1 and COM2), can talk to a USB to RS232 adapter (some other COM).

A USB to serial port adapter, will have some upper limit as to how
fast it can communicate. For example, this one claims to run
12 Megabaud, and you might achieve that, if two chips were
connected back to back, and operated between two computers.
(If you put RS232 level shifters in there, it would slow the
max rate. If you used RS422, it might work a bit better. Years
ago, I had some RS422 in something I built, and those chips
could do about 10 Megabaud over a very short distance.)

http://www.ftdichip.com/Products/ICs/FT2232H.htm

They also make USB to eight wire port chips. This one delivers
about 1MB/sec, and you can think of this one as being
similar to using an older parallel port on a PC. Using devices
like this, makes it possible to connect your custom hardware
design, to a computer, for control or monitoring.

http://www.ftdichip.com/Support/Documents/DataSheets/ICs/DS_FT245R.pdf

So you should state the context of your question, as to whether
you've got a USB to RS232 adapter that you're trying to write
code for. Or, you've got some other kind of adapter.

HTH,
Paul
 
R

RayLopez99

Well, first off, I'm not a software developer. I write short programs
for my own usage, but I'm not a computer science graduate or anything.

Don't worry, neither am I, though I have some engineering degrees.


[stuff deleted]

I suspect you're talking about plugging in a USB to RS232 adapter
device. For example, I have two of those on the computer right now.
They use FTDI chips. At one level, they follow a USB class standard.
Which means, when the device is first plugged in, it is recognized
as a USB to RS232 adapter (it isn't completely unknown to the OS).
But you can also get a driver package, which promises to give you
a "virtual communications port". i have this installed. One of the
advantage of this, is it has its own control panel, so you can
set preferences for the hardware.


Yes, maybe this is the key. Take a quick look at the tutorial I
posted in this thread, keywords here:( Tutorial on Serial I/O (a
library for .NET, as of December 2008 ):
http://www.c-sharpcorner.com/upload...12082008111137am/serialportcommunication.aspx
)

Notice he is accessing COM1. Here is the key code fragment (from our
point of view, the details obvious are buried in the library):
SerialPort _serialPort = new SerialPort("COM1", 19200, Parity.None, 8,
StopBits.One);

So, the question Paul is as follows: if I buy the hardware you
recommend, the USB-to-Serial adapter, will it have a "COM1" port that
simulates a 'real' COM1 port? That way I can test this simple program
(well written and straightforward--I can simply copy and paste it into
Visual Studio, it's that simple) and see if I can read write to COM1.
I'll have to use a "loopback plug" I think--I really don't know how
they work exactly, but they are for testing--trouble is, how can I
test if it's USB? No physical IO ports for the plug to plug into?

Then you must modify the code the author writes as follows:

replace "_serialPort.Write("SI\r\n");" //this was his specific
hardware, that had a command SI with carriage/new line appended

with "_serialPort.Write("AT&V\r\n");" or "_serialPort.Write("I0\r
\n");" see more commands here: http://en.wikipedia.org/wiki/Hayes_command_set#The_basic_Hayes_command_set

As you can see, I'm just trying to get the COM1 port to say something
so I can echo it on the screen in the program as he wrote it.

Anyway, the real question is whether the USB-to-Serial adapter will
really mimic and Serial I/O card, or not. Keep in mind I have two PCs
that I intend to write this test program for: one is an old XP OS PC
that really does have an I/O card in it, and the other is a modern
Windows 7 OS machine with a quad-core that does not. The presence of
an old card might make a difference (these commands might wake up the
old card) so I might remove the old card from the XP machine prior to
testing this program.

Any advice appreciated.

1) If you're using a USB to RS232 adapter chip and cable

and

2) You'd installed whatever is needed to make virtual COM ports

then the same software package that talks to regular RS232 ports
(COM1 and COM2), can talk to a USB to RS232 adapter (some other COM).

Right.

RL
 
L

Loren Pechtel

I got gipped I think, and I always suspected it. For reasons too
complicated to get into (I manually timed the data transfer, the hub
looked 'old' even though it's stamped with the logo "2.0
USB" (probably counterfeit), Windows XP gives a 'warning' message: 'to
transfer faster, use 2.0'), I think my USB 2.0 hub is really 1.0

Is there a loopback plug to test it? Or should I just rely on manual
data transfer timing?

Can it be the fault of my mobo? It was state of the art in 2002--I
assume that was after USB 2.0.

It could be a 1.0 port on your motherboard. I've seen some machines
that were mixed, some 1.0's and some 2.0's.

It also could be a 1.0 device plugged into your 2.0 hub.
 
P

Paul

RayLopez99 said:
So, the question Paul is as follows: if I buy the hardware you
recommend, the USB-to-Serial adapter, will it have a "COM1" port that
simulates a 'real' COM1 port? That way I can test this simple program
(well written and straightforward--I can simply copy and paste it into
Visual Studio, it's that simple) and see if I can read write to COM1.
I'll have to use a "loopback plug" I think--I really don't know how
they work exactly, but they are for testing--trouble is, how can I
test if it's USB? No physical IO ports for the plug to plug into?

When the product mentions something like the "virtual COM port",
that means, as far as any software is concerned, it's a real
port, and does everything the same way. The RS232 connector will
have the flow control pins, the same hardware or software
control of flow control and so on. It's all the same.

As long as your serial port library, doesn't have any
restrictions on the value of the COM port, then it
should work. Like, if COM ports go up to 16, the
library shouldn't limit you to just COM1,COM2,COM3,COM4.

A loopback plug, would wire TX to RX. An outgoing
character, comes right back to you. That's the purpose
of a loopback plug. To be technically correct, the
flow control lines should also be wired the right way,
so that there are no buffer overruns at high speed.
If you were going to stay at 1200 baud for a quick test,
you could even take a paper clip, and just connect the
TX pin to the RX pin. (I.e. You don't need flow
control, until you're serious about flawless
communications. No flow control wiring, is good
enough for a quick sanity check, that the port
is working.)

HTH,
Paul
 
R

RayLopez99

When the product mentions something like the "virtual COM port",
that means, as far as any software is concerned, it's a real
port, and does everything the same way. The RS232 connector will
have the flow control pins, the same hardware or software
control of flow control and so on. It's all the same.


I see. I took a look at the photo, and indeed it looks like (though
hard to really tell) that the one end is a typical USB female port,
and the other end is what looks like a traditional Serial
Port...WAIT...I took a closer look, no, I'm mistaken. It's an
"artists rendition". In fact, what this company is selling is a CHIP,
not the actual chip + hardware. Do you know offhand if there's a "USB-
to-Serial Port" piece of hardware that uses this chip? That way I can
buy it and experiment with writing code to capture data. Even more
germane for me would be one of those (I've seen this, but offhand
don't recall where) USB-to-External Modems (yes they exist) pieces of
hardware. Then I can really test my code, by dialing up a Dial Up
internet service provider and checking the messages I receive. No
need for a loopback, etc.
As long as your serial port library, doesn't have any
restrictions on the value of the COM port, then it
should work. Like, if COM ports go up to 16, the
library shouldn't limit you to just COM1,COM2,COM3,COM4.

A loopback plug, would wire TX to RX. An outgoing
character, comes right back to you. That's the purpose
of a loopback plug.

I see. So if I can find a "USB-to-Serial Port" piece of hardware I
mentioned above, I can use this with a loopback plug (which I'm sure
they still sell somewhere) and use the program referenced in this
thread to write to COM1, then read from it (at the same time). Pretty
cool.

Let me know about this "piece of hardware" if it exists insofar as you
know. If not, I'll get the usb modem I mentioned above. Of course,
if I was you, I could built such hardware just using the spec sheet
from the chip you reference--but I'm not you, and few people are! ;-)

RL
 
P

Paul

RayLopez99 said:
Let me know about this "piece of hardware" if it exists insofar as you
know. If not, I'll get the usb modem I mentioned above. Of course,
if I was you, I could built such hardware just using the spec sheet
from the chip you reference--but I'm not you, and few people are! ;-)

RL

It does exist, because I bought a couple. I got the
first one home, before I discovered what chip was
inside, and that led me to the FTDI site. There are
other brands out there, so they're not the only company
to make the chips.

(The advert here, even admits it is an FTDI. I did a
search on the part number from the packaging, and ended
up here. I have a suspicion this is only distributed
in Canada - it probably starts as a Chinese production,
and then a retailer puts their name on it, so it's not
like it was a "major brand" or anything.)

http://www.computerplug.com/show_product.php?product_id=CUSB-232A

I use one USB to RS232, to connect to my UPS (un-interruptible
power supply). If the UPS wants the computer to shut down,
the info flows through that path. A service in Windows,
monitors for requests from the UPS.

The second USB to RS232, I use for an external dialup
modem. I use that on occasions when ADSL is down, and
I want to get to the web site that has the status page
for my ADSL provider. If it says the service is
down for maintenance, then I know I should be
patient. If they haven't acknowledged the failure,
then I know I need to phone them up and report it.
So that USB to RS232 adapter is used for a more
regular purpose, of connecting a dialup modem.

Paul
 
R

RayLopez99

The second USB to RS232, I use for an external dialup
modem. I use that on occasions when ADSL is down, and
I want to get to the web site that has the status page
for my ADSL provider. If it says the service is
down for maintenance, then I know I should be
patient. If they haven't acknowledged the failure,
then I know I need to phone them up and report it.
So that USB to RS232 adapter is used for a more
regular purpose, of connecting a dialup modem.

    Paul

Excellent. I'll order one from a US supplier like Egghead or some
such. Good work and thanks again.

RL
 
P

Paul

RayLopez99 said:
Excellent. I'll order one from a US supplier like Egghead or some
such. Good work and thanks again.

RL

http://www.ixp.jp/XPE/

"FTDI versus Prolific.

If you can, go with FTDI, their driver sticks the device to the
com port, so you can move it around the usb connectors and it
keeps the same name. The Prolific one doesn't do this. Resulting
in it allocating any number of com ports."

That's a minor difference, between FTDI versus Prolific PL-2303
based adapters.

On other kinds of USB adapters, the reason for that kind of behavior,
can be because the USB device lacks a serial number. USB devices,
where each unit has a unique serial number associated with it, allows
Windows to track it via the serial number. Then, if you move the
adapter or device, from one USB port to another, Windows will
realize it has seen the adapter before, and it maintains it's
properties.

If the USB device doesn't have a serial number, then, moving it
from port to port, causes each plugin to be treated as a new
instance.

Paul
 
R

RayLopez99

If the USB device doesn't have a serial number, then, moving it
from port to port, causes each plugin to be treated as a new
instance.

    Paul

Cool. I wonder if there's a place that lists USB instruments for
sale. That would be a logical text step, after I run successfully
this demo program. Then I can write a program that records data from
a USB enabled instrument, assuming it's as easy (as I hope it is)
reading from a simulated RS-232 port (i.e., "COM1") for various
instruments, such as blood pressure, heartbeat, temperature, etc.

PS--note this typo: "http://www.computerplug.com/show_product.php?
product_id=C-USB610A Micro Innovations USB to Serial DB9 Adapter"

Should read "DE9" not DB9. DB25 was a "COM2" but there's no such
thing as a DE9, says Wikipedia: http://en.wikipedia.org/wiki/D-subminiature

RL
 
P

Paul

RayLopez99 said:
Cool. I wonder if there's a place that lists USB instruments for
sale. That would be a logical text step, after I run successfully
this demo program. Then I can write a program that records data from
a USB enabled instrument, assuming it's as easy (as I hope it is)
reading from a simulated RS-232 port (i.e., "COM1") for various
instruments, such as blood pressure, heartbeat, temperature, etc.

PS--note this typo: "http://www.computerplug.com/show_product.php?
product_id=C-USB610A Micro Innovations USB to Serial DB9 Adapter"

Should read "DE9" not DB9. DB25 was a "COM2" but there's no such
thing as a DE9, says Wikipedia: http://en.wikipedia.org/wiki/D-subminiature

RL

I didn't know that.

Usually, the guys at work were always quick to provide correction.
I didn't know the second letter in the name, was the shell size.

*******

The text in the product picture lists DB-9.

http://www.computerplug.com/img/accessories/C-USB610A.jpg

Another example here.

http://ca.startech.com/product/AT925FF-DB9-to-DB25-Serial-Cable-Adapter-Female-to-Female

Even the box my U.S.Robotics modem comes in, refers to the
connector as DB9.

I expect you'll find DB9 in common usage in product descriptions.
In some of the equipment I have here, they simply don't try to
label the connector at all, and show a picture of it instead.

I'll have to remember this for the next time. (Engineering is a
lot like the game Trivial Pursuit, where the person with the
largest store of knowledge of this type, wins :) )

Paul
 
R

RayLopez99

The text in the product picture lists DB-9.

http://www.computerplug.com/img/accessories/C-USB610A.jpg

Another example here.

http://ca.startech.com/product/AT925FF-DB9-to-DB25-Serial-Cable-Adapt...

Even the box my U.S.Robotics modem comes in, refers to the
connector as DB9.

I expect you'll find DB9 in common usage in product descriptions.
In some of the equipment I have here, they simply don't try to
label the connector at all, and show a picture of it instead.

I'll have to remember this for the next time. (Engineering is a
lot like the game Trivial Pursuit, where the person with the
largest store of knowledge of this type, wins :) )

    Paul

Well you would win that game anyday Paul. I'm not sure on the DB9 vs
DE9, just going on what appears to be the case in Wikipedia. Do feel
free to post to this thread, which I've bookmarked, if you find cool
USB based instruments that are not too expensive. Such as a Geiger
Counter would be a cool app, to measure radiation, etc etc etc.

RL
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top