Can someone please show me an example of how to stream data from a usb device (through com port)? I saw some managed examples that wont help much in a win32 and a few examples that did not work. Thanks in advance
Can someone please show me an example of how to stream data from a usb device (through com port)? I saw some managed examples that wont help much in a win32 and a few examples that did not work. Thanks in advance
what are you trying to do exactly? capture usb traffic? I think they make data loggers for that. I think trying to do it in real time with a serial port is a waste of time, because even the slowest usb port is ~100 times faster than the fastest typical serial port.
What can this strange device be?
When I touch it, it gives forth a sound
It's got wires that vibrate and give music
What can this thing be that I found?
I bought a usb GPS and there is serial data coming from it (com3). How do I extract the information from it?
Exactly the same as a regular COM port. Post some code and error messages if that doesn't work.
Here is my awesome serial I/O class for all to enjoy:
ggCode:#include "Win32Serial.h" #include <iostream> #include <iomanip> #include <cctype> using namespace std; using namespace Win32Serial; int main() { CWin32Serial com3; if (!com3.Open(3, CBR_115200, 'N', 8, 1, FC_Disabled)) { cerr << "Failed to open COM3, ec = " << GetLastError() << endl; return 1; }//if BYTE b; while (com3.ReadByte(b)) { int c = (unsigned)b; if (c == '\r' || c == '\n') cout << endl; else if (!isprint(c)) cout << "." << flush; else cout << (char)c << flush; }//while return 0; }//main
What can this strange device be?
When I touch it, it gives forth a sound
It's got wires that vibrate and give music
What can this thing be that I found?