You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, could you help me please.
I've installed the hidapi into my Qt project by the instruction from here http://www.eliasing.com/qt/hid-qt
uses the hidapi-0.7.0 version , OS Windows 10
And it compiled well, then I reading the vid and pid, but the method hid_write()
exactly gives -1. _ tried to use latest version of hidapi_ (moved the folders with my version and put instead new, then cleaned my project, rebuild, rewrite the path to file hidapi.h)
And the same history - only reading the pid and vid
res = hid_init();
qDebug() << res << 1;
handle = hid_open(0x046d, 0xc31c, NULL);
if (handle == NULL) qDebug() <<"Handle is Null";
else
qDebug() << "Hid opened: "<< handle;
}
MicroCont::~MicroCont()
{
res = hid_exit();
qDebug () << "hid exit: " << res << 3;
}
void MicroCont::writeHID() //THIS IS SLOT function, SO I USE IT BY THE BOTTON PUSH
{
// Read the Manufacturer String
res = hid_get_manufacturer_string(handle, wstr, MAX_STR); //THIS IS WORK
qDebug("\nManufacturer String: %ls", wstr);
// Toggle LED (cmd 0x80). The first byte is the report number (0x0).
buf[0] = 0x0;
buf[1] = 0x80;
res = hid_write(handle, buf, 65); //but this is NOT work
qDebug () << res << 2;
}
`
I tried to write some command to my device, but it's owful. Please help, my brain is going to booom...
The text was updated successfully, but these errors were encountered:
Make buffer pointer NULL, once it is freed.
In hid_close() buffer pointer is freed and next to that the libusb_free_transfer function is called which checks for if the LIBUSB_TRANSFER_FREE_BUFFER flag is set and the buffer pointer is not NULL. when this condition evaluates true, it
tries to free memory for a buffer which is already free and a crash occurs.
Even though the described behavior should not happen as per libusb documentation, it has been observed with some version(s) of libusb.
Hello, could you help me please.
I've installed the hidapi into my Qt project by the instruction from here
http://www.eliasing.com/qt/hid-qt
uses the hidapi-0.7.0 version , OS Windows 10
And it compiled well, then I reading the vid and pid, but the method hid_write()
exactly gives -1. _ tried to use latest version of hidapi_ (moved the folders with my version and put instead new, then cleaned my project, rebuild, rewrite the path to file hidapi.h)
And the same history - only reading the pid and vid
`MicroCont::MicroCont(QObject *parent) : QObject(parent)
{
//---------------------------------------------------------------------------------
}
MicroCont::~MicroCont()
{
res = hid_exit();
qDebug () << "hid exit: " << res << 3;
}
void MicroCont::writeHID() //THIS IS SLOT function, SO I USE IT BY THE BOTTON PUSH
{
// Read the Manufacturer String
res = hid_get_manufacturer_string(handle, wstr, MAX_STR); //THIS IS WORK
qDebug("\nManufacturer String: %ls", wstr);
}
`
I tried to write some command to my device, but it's owful. Please help, my brain is going to booom...
The text was updated successfully, but these errors were encountered: