Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

USB device issues using HUB or some PC's

Hi,

I've created small firmware for a device which using one interrupt in endpoint and one bulk out endpoint. I'm using NI VISA 4.1 to control the device.

I'm currently testing the device and unfortunately met the following issue :

I've testen on 6 different PC, with and without the use of a hub. With hub the device always fails. Without hub it fails on 2 of the 6 PC's.
The 4 PC's that work with the device always work correctly (even after hundereds of tests they never fail). The PC's that fail, never work.

To me it look svery much like some inconsistency amoung chipsets/drivers/visa, but I'm not sure about this yet. It may very well be something I overlooked in the firmware.

Are there any known issues with handling interrupt endpoints on specific chipsets using NI VISA ?

Regards,
Marcel

0 Kudos
Message 1 of 6
(3,602 Views)

Hi Marcel,

Has the NI-VISA Run-Time been installed on all the PCs?

Wat kind of issues are you having? Error messages etc?

Thanks

Karsten

0 Kudos
Message 2 of 6
(3,579 Views)
Hi,

The error also happens on my development system and can simply be reproduced by just including a regular USB (powered) HUB between my device and my PC. Direct connection to my PC works well. I haven't any difference in the device recognition in windows when using the HUB though. Everything seems exactly the same with or without HUB.

The error I get is "Error -1073807298 occurred at VISA Write"
This seems to be an I/O error.

Meanwhile I also know that the exact same problem also exist with NI-VISA in Linux with this device, so I can outrule any problems with windows drivers I think.
Still I have 3 possible causes (firmware, NI-VISA or chipset issues). I guess I'll have to trace all USB packets to find out what exactly goes wrong in this particular situation and check what communication actually arrives in my device when the VISA write is carried out.

regards,
Marcel




0 Kudos
Message 3 of 6
(3,576 Views)

Hi Marcel,

I also did a search on our web site on the error number and got the following results. As you can see it's a pretty generic error message.

I also remeber seeing this error when the VISA Resource name is incorrect. Could it be that the the NI-VISA resource name has changed when using a USB powered HUB? This could explain why it does not work with the hub but it does without it?

Hope this helps,

Thanks

Karsten

0 Kudos
Message 4 of 6
(3,547 Views)
Hi,

The resource name is equal, except for the numbering. This doesn't matter since I only select the device based on Vendor ID en Product ID. The device is found and also some functions work. Basically the interrupt endpoint works, but as soon as I switch to using the bullk endpoint it fails when using a hub. Using only INT endpoints works well, even with hub. The issue is that I don't want to use only INT endpoints, I want a combination of INT en BULK endpoints which also should work I think (it does without hub).

The error message is indeed quite generic and it's quite hard for me to find the root cause this way. I also checked with NI spy, but it's not making much sense either yet.

Regards,
Marcel


0 Kudos
Message 5 of 6
(3,538 Views)
Hi,

I've got the device to work through the hub. The fix is a bit strange however.

My BULK endpoint had a fixed packetsize of 128 bytes. I changed this to 64 bytes and now the device works well when using a hub.

I can't explain yet why this "fix" works because the device actually supports 128 bytes transfers. It's however no issue for my device to use 64 bytes transfers, so I will use that.

Regards,
Marcel

0 Kudos
Message 6 of 6
(3,536 Views)