TDS NOMAD windows CE5.0 device connects more than two USB devices - visual-studio

I have a TDS Nomad running windows CE 5.0 system. It has a USB host port. I have connected to the manufacture and ask if nomad can connect to more than 1 USB devices via USB hub (can connect to 7 USB devices, designed for windows ), they said they haven't tested to connect more than one USB device. If more than one devices is connected to nomad, there mightbe resource conflict.
The nomad works well with one USB device connect to it individually.
But I have a console application debugging in nomad using visual studio2005 and active sync.
I need to talk to both USB devices. Therefore I have to use USB hub. But it doesn't work most of the time. I think the drivers of two USB devices are all correctly installed on nomad.
But what I want to ask, is that has anyone tried to connect more than one USB device to windows CE product via USB hub and both of them works well ?

I'm slightly confused. here. You say the device has USB host and you want to connect more than one client device through a hub. This is definitely supported by the OS, and I've done this with several devices from several manufacturers, though never with a Nomad. Not sure what the OEM is talking about with "resource conflicts" as the USB spec itself allows for multiple devices (kind of the whole point behind a "bus").
But you say that your second "device" is the debugger. That isn't a USB Host connection from the device perspective, that's a USB Client connection, and it typically uses completely different hardware and drivers for that connection. Can a device have both a host and a client connection? Again, yes I've done this with many devices (but not a Nomad) and the OS fully supports it.
Now maybe this is USB OTG hardware (though back in the 5.0 days I doubt it) and the OEM didn't do the design well to handle a client and a host at the same time. Maybe the physical hardware is laid out poorly or the OAL portion of their USB driver is poorly done and can't route properly through a hub properly (I've definitely seen that before). Hard to say.
A USB Analyzer would tell you a whole lot about what's actually happening and where the problem is, but it is definitely a supported scenario by both the USB spec and the OS. If it's failing, it's a manufacturer/device-specific problem.

Related

Maintaining a Windows Bluetooth Connection

I'm manufacturing a device that connects to my computer using Bluetooth and then a desktop Java app uses the Bluetooth connection to send serial data to the device which is then displayed.
When I try to connect my device to windows 7 it successfully finds and pairs with it creating a Bluetooth link on a COM port. This link can then be used by a serial prompt (used for testing) or my Java application. It works initially however soon after windows drops the connection and the only way to reconnect is to delete the device within devices and printers and then reconnect.
This seems to be a known problem with windows bluetooth so I decieded to use a third party Bluetooth application. I downloaded and tried Toshiba's Bluetooth Stack and it was able to add a Bluetooth device and keep a stable connection which works great however this only works for Toshiba computers without getting a cracked version.
This device is commercial and can't be sold with cracked versions of software. Has anybody experienced the same problems or not in other operating systems and has any solutions of advice as that would be a tremendous help.
This is not a good idea/method to use the COM ports generated by Windows, it's not working fine and not reliable in any scenario ; you should use Bluetooth Sockets instead.
Using Toshiba or Widcomm or BleuSoleil won't help: under Win7, all dongles are now trying to use the Microsoft Stack, not their own implementation.

Spying on a USB connection on Windows?

I have an Arduino application talking over USB to an application on Windows 8 using the MAVLINK protocol. The connection appears as COM3.
Is there a Windows application that can spy on this connection and display the traffic going in both directions? Raw bytes are fine, I don't need the protocol decoded.
You could log serial port activity using Portmon. (Edit: You need to first connect to the local computer via the Computer menu, and you must start capture on the port before a program opens it.)
You may not want to log USB traffic. Such a log would include a lot of extra information relating to the USB to serial adapter which is providing COM3. Portmon would only give you the bytes transferred over COM3, and the Mavlink protocol is entirely contained within that data stream. If you're sure you want to log all USB traffic to and from that device, then I recommend SnoopyPro. In Windows 7, you need to run it as administrator.
If you can use Windows XP in your environment, USB sniff should work for you. If you need something more powerful (and are willing to pay a fee for it) then USBLyzer might be a viable option.
The answer is SnoopyPro, and you can download it at:
SnoopyPro Sourceforge
This tool allows you to get USB information and also USB communication data. I used it in the past to know how a USB device worked in order to do its driver on Linux. I used this tool as a sniffer.
Basically, SnoopyPro allows you to intercept, display, record and analyze the USB protocol and all transferred data between any USB device connected to your PC and applications. It can be successfully used in application development, USB device driver or hardware development and offers the powerful platform for effective coding, testing and optimization.

Windows PC as a USB slave to emulate a thumbdrive

I need to create a application that will allow a Windows PC (XP/Vista) to emulate a thumbdrive. That is, when the PC is plugged into either another Windows system, or in this case, a piece of hardware that allows for USB thumbdrives to be plugged in, a folder on the computer looks like a giant thumbdrive. Any thoughts on where a guy would start to investigate this?
Update (more specific description):
I need to connect my PC to one of the newer multifuction devices that support scanning to a USB thumbdrive that is inserted into the front of the device. These units do not support WIA or TWAIN via the rear USB connector that you'd typically use for connectivity to a PC.
Most USB controllers in regular pc's dont have the possibility to function as an USB slave. So I'd start with investigating what kind of hardware you're going to use.
Another way to go: there are USB Link cables to link up 2 pc's over USB, maybe that's usable for you?
You cannot do this in an application. At the lowest level, the USB ports on your computer are controlled by an Host Controller Interface. This chip will manage up to 127 slave USB devices. You would need to seriously reprogram this chip before it implements the slave side of the USB protocol. Of course, at that point any USB hub in your PC will break down - those 8 USB ports you probably have are usually implemented by 2 smart USB hubs connecting to both USB1 and USB2 host controllers. Next, your USB keyboard and mouse will stop working.
Take an MCU with two Slave USBs. Write a simple frimware which makes one USB act as a Special Device Class and wait until PC on this USB provides mandatory data (including Device Class, of course) for the other USB. Write a PC program which connects to the Special Device (your MCU), uploads Mass Storage Device Class and redirects I/O to a dedicated partition. The other USB on the MCU will become an emulated Mass Storage Device.
Some of those code can be taken from Linux.

USB Debugging

I'm looking for a very specific USB device for debugging systems that may use USB but not with a regular computer (proprietary hardware). I want a device that has a USB host controller and two USB device connections. The device to be debugged is connected to the USB host controller and one of the device connections is connected to another device with it's own host controller on it. The the other device connection is connected to a pc. The point being that all USB data travelling through the device (from the device connected to the host controller to the device connected to the first device connection) is reported to the pc.
I'll happily write software to do the logging (in fact I want to) but I can't seem to find a board like this anywhere. Can anyone help?
I have an Ellisys USB analyser, which isn't exactly what you describe internally, but does sit between a peripheral and a host and use a separate PC to collect the data.
(i.e. it has two 'B' and one 'A' connectors on it.)
Excellent product, and very helpful company.
Sniffing the USB shouldn't be too hard if you have the right hardware. And that is the tricky question. I haven't seen anything that describes the USB breakout box that you want. However I can say that this is in the realm of the following two magazines:
Nuts and Volts
Circuit Cellar
If they don't have a USB breakout box project in their archives, then at least they will have advertisements for small cheap single board computers that would have multiple USB ports that you can use for buffering the signals and reporting it back to your PC.
Alternatively is it possible to just wire your PC up to the middle of your two devices and write a custom drive that echos data back and forth while sniffing off a stream for you?
Sorry for the long delay in my reply -- I checked out one of our USB developer's toolchain, and he uses a Beagle USB Sniffer. He seems happy with it.
You're looking for a USB device with two upstream outputs. I think according to the USB spec, this is not possible. You will have two USB hosts trying to send messages and control the USB devices at the same time.
What if you were to look for a device which allowed you to view the data going through a hub via something other than a usb output?
If you're building something custom, take a look at this USB chip site. The chips are programmable via a windows application. Once you define how you want it to operate, it's saved on an EPROM on the dev board ($30-$50).
Sorry if this isn't helpful!

How to sniff a USB port under Windows?

From time to time, I need to dump USB traffic under Windows, mostly to support hardware under Linux, so my primary goal is to produce dump files for protocol analysis.
For USB traffic, it seems that SniffUsb is the clear winner... It works under Windows XP (but not later) and has a much nicer GUI than earlier versions. It produces huge dump files, but everything is there.
However, my device is in fact a USB serial device, so I turned to Portmon which can sniff serial port traffic without the USB overhead.
After five years waiting, now it's possible to sniff usb packets on windows
See http://desowin.org/usbpcap/tour.html for a quick tour. It works pretty well
Since people don't seem to realize it, Wireshark does monitor USB traffic and has a parser for it; but the catch is it only works under Linux. Wireshark on Windows will not do this.
It may be possible to plug the USB device you want to monitor, along with a Linux machine (with Wireshark running) and your Windows machine and just use the USB device under Windows.
Problem with the above? I don't know how the Linux machine or the Windows machine will detect each other.
Busdog, an open source project hosted on github, has worked well for me. It has a driver it installs to allow it to monitor USB communications. The config window allows you to reinstall or remove the device at any time.
You can select the USB device you want from an enumerated list. A nice feature is to have it automatically trace a new device that is plugged in:
Data communications to and from an SWR analyzer I was reverse engineering were captured flawlessly:
USBSnoop works too - and is free.
Or, you could buy a USB to Ethernet converter and use whatever network sniffer you prefer to see the data.
Personally, I'd use QEMU or KVM and instrument their USB passthrough code, and then use libusb to prototype the replacement driver in user space (this latter bit I've done before; writing USB device drivers in Python is fun!).
Microsoft Message Analyzer was able to capture USB traffic, with Device and Log File parser from MS: link
Update: as mentioned by #facetus, MS Message Analyzer has been retired on November 25 2019.

Resources