On Wednesday, September 15, 2010 2:17 PM, Alejandro MartÃnez wrote:
I'm trying to communicate with a usb serial device plugged to a USB port. I've seen some examples with boost::asio and connecting to ie:
/dev/ttyUSB0 for linux, or COM1 for windows
etc.
But i need something more robust and multiplatform. Like listing all the available devices and choosing by looking at the vendor id, or device id or something like that.
How can i do that?
I'm not aware of any portable libraries to do this. Each operating system has its own proprietary interface to the USB stack, and these are sufficiently different from each other to make a portable abstraction difficult. Even so, something like that might make a good boost library. Maybe built on top of asio...
Can this same approach be used later for say... bluetooth serial devices? How?
I'm not sure. Do operating systems even keep their Bluetooth interface similar to the USB interface?