c++ - Unable to detect USB device -


please have @ following code

#include "myclass.h" #include <qstring.h> #include <qdebug.h>     myclass::myclass()    {        qlist<qextportinfo> ports = qextserialenumerator::getports();         int counter=0;         while(counter<ports.size())        {        qstring portname = ports[counter].portname;        qstring productid= ports[counter].productid;        qstring physicalname = ports[counter].physname;        qstring vendorid = ports[counter].vendorid;        qstring friendname = ports[counter].friendname;          string convertedportname = portname.tolocal8bit().constdata();        string convertedproductid = productid.tolocal8bit().constdata();        string convertedphysicalname = physicalname.tolocal8bit().constdata();        string convertedvendorid = vendorid.tolocal8bit().constdata();        string convertedfriendname = friendname.tolocal8bit().constdata();         cout << "port name: " << convertedportname << endl;        cout << "product id:" << convertedproductid << endl;        cout << "physical name: " << convertedphysicalname << endl;        cout << "vendor id: " << convertedvendorid << endl;        cout << "friend name: " << convertedfriendname << endl;        cout << endl;        counter++;         }    } 

i have connected "dreamcheeky thunder missile launcher" usb toy, unable it's vendor id or product id or atleast related it! see following image

enter image description here

but using usbdview software, can details. see following image

enter image description here

what matter code? or if not suitable? please help!

just running installer toy , checking comes with, doesn't describe api or documentation accessing serial port.

if used sort of monitoring program on program maybe reverse engineer how commands device.

it may easier interface ui directly. using program ahk or calling sendinput() coordinates relative upper left corner of ui, command directions of device.

missile launcher ui

edit: more links related this: because usb device doesn't listed com# (how serial port shows up), , hid device, need library can talk that. here links should there:

http://www.qtcentre.org/threads/41075-usb-hid-connect-on-qt

http://www.signal11.us/oss/hidapi/

https://github.com/iia/qt_libusb

it looks guys @ robo realm have done already:

http://www.roborealm.com/help/dc_missile.php

http://www.roborealm.com/help/usb_hid.php

http://www.roborealm.com/tutorial/usb_missile_launcher/slide010.php

hope helps.


Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -