15 int main(
int argc,
char** argv)
20 ret_val = scanner.
scan();
22 std::cout <<
"FTDI device not found!!!" << std::endl;
26 unsigned int no_devices = (
unsigned int)ret_val;
27 std::cout << no_devices <<
" device(s) found." << std::endl;
29 std::string serial_number, manufacturer, product;
30 for(
unsigned int i=0; i<no_devices; i++ )
33 if (ret_val < 0)
break;
36 if (ret_val < 0)
break;
39 if (ret_val < 0)
break;
41 std::cout << std::endl;
42 std::cout <<
"Device #" << i << std::endl;
43 std::cout <<
" Manufacturer : " << manufacturer << std::endl;
44 std::cout <<
" Product : " << product << std::endl;
45 std::cout <<
" Serial Number: " << serial_number << std::endl;
49 if (ret_val < 0) std::cerr <<
"Something went wrong. Did you run with sudo." << std::endl;
int main(int argc, char **argv)
int get_serial_id(unsigned int index, std::string &serial_id)
int get_product(unsigned int index, std::string &product)
int get_manufacturer(unsigned int index, std::string &manufacturer)
Scan the usb devices, and retrieve its serial id and else descriptions, especially for ftdi devices...