Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Reading USB with C++(University assignment)
Reading USB with C++ [message #1784869] Thu, 05 April 2018 02:13 Go to next message
André Cecchi is currently offline André CecchiFriend
Messages: 1
Registered: April 2018
Junior Member
Hello, everyone.

One of my university professors gave my colleagues and I a task for this Friday and no one seems to be able to get any progress what so ever. I'm in a group of 3 people and we've already searched the web exhaustively after information, with no success. All we find is evasive answers that don't really help much.
The professor also handed us 3 PDFs regarding communication protocols in general, but that's about it... Nothing close to practical programming in C++.

The task is to establish any USB communication on our PC using C++ on the Eclipse IDE. So we figured we could read data from the mouse and print it's position on the screen, but we don't even know where to start.

Do you guys have any tips, information, guidelines or even (miraculously) example codes we could use?

Thank you very much in advance !
Re: Reading USB with C++ [message #1785025 is a reply to message #1784869] Sun, 08 April 2018 02:31 Go to previous message
David VavraFriend
Messages: 803
Registered: October 2012
Senior Member
This forum is for dealing with Eclipse/CDT issues.
It isn't about writing programs.
Your question is off-topic.

Besides, you didn't mention what machine USB is connected to or what OS if any.
You would need that information.
For many OS's you would need to write a driver and have privileges to use it.

Some USB devices look like a serial port and can be accessed as such.
The OS makes it so.

For example, I have a Linux app that connects and controls an XM PCR receiver.
All communication is through /dev/ttyUSB0.
For Windows, the interface would be different.

Try searching for
"writing USB drivers"
"reading raw mouse data"
"controlling USB devices"

This may get you started:

Good luck.

Previous Topic:"could not be resolved" errors, but Go To Definition works!
Next Topic:gcc build warnings
Goto Forum:

Current Time: Mon Nov 12 17:50:28 GMT 2018

Powered by FUDForum. Page generated in 0.01877 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top