Content originally posted in LPCWare by L.simon on Fri Mar 28 02:57:36 MST 2014
thank you for your reply,
I am now using the nxpUSBlibV0.98b and got the HID working but after some time working with it i realized i needed bulking tranfers.
So i started using the CDC example and tested it with a hyperterminal and it works.
The problem is that i want to use the pyUSB project to communicate with the program,
Sending bulk transfers to the device works perfectly and i can send multiple transfers.
But from the moment i start to try to read something out, the python program gives me a timeout error.
I have a usb sniffer Beagle USB480 which tells me that i do send a read request to my device but the device doesn't seem to give the data.
I tried constantly sending data from the device(it works with the hyperterminal) and reading it with the python program, the same thing happens, i do get the read request in beagle but they give "IN-NACK", the pyUSB uses an other driver (libUSB-win32) than the hyperterminal.
But i don't think that is a problem because the write command does work.
is there something specific i need to do before reading? maybe some sort of configuration or setup?
i dont think so for i have no specific one with the hyperterminal.
i think it might because the read command and the command to put data on the bus are not synchronized?
That does happen with a write command
if(CDC_Device_BytesReceived(&VirtualSerial_CDC_Interface))
{
recv_byte[0] = CDC_Device_ReceiveByte(&VirtualSerial_CDC_Interface);
CDC_Device_SendData(&VirtualSerial_CDC_Interface, (char *)recv_byte, 1);
}
in python i read directly after the write command.
basically the serial connection is not needed but i do need bulking to work.
is anyone able to help me?
thank you for your time,
Greetings,
Simon