Hi everybody, how are you?
I was working on adapting a project to work libusb with Qt using an microcontroller as a device. the project in question is this link:
https://wiki.kucia.net/doku.php?id=projects:qtusb
I wrote an email to the owner of the project and for reasons of time I recommended this forum.
It works correctly, but it has limitations that are the reason why I am here today.
the code uses to write:
libusb_bulk_transfer(this->APK, 0x01, buf, sizeof(buf), &bytes, 100); // escribir en endpoint
and to read:
libusb_bulk_transfer(this->APK, 0x81, buf, sizeof(buf), &bytes, 100); // leer el endpoint
The idea is to try to connect a slot through which a function can be called to read when the host own the buffer.
In other libraries uses like:
connect(puerto, [b]SIGNAL(readyRead())[/b], this, SLOT(intRs232()));
or:
connect(timer, SIGNAL(timeout()), this, SLOT(intTimer()));
in this way you do not need to ask the microcontroller to send data, but rather, constantly receive frames, but, I did not find information about libusb signals
I need help from the Qt and libusb side because the microcontroller code works and does not affect the problem itself.
kind regards from Argentina.
More information:
Host side:
Desktop Qt 5.14.2 MinGW 64-bit (C++)
USB Bulk using libusb
Windows 10
Device side:
MPLAB X - XC8
Microchip PIC18F2550
Without USB libraries