Linux LMS_RecvStream() and "libusb: warning [libusb_exit]"

#1

Part of source code:

BUF_SIZE = 512 looks like

Output512

BUF_SIZE = 65536

Output65536

on Windows 10 same code work without problems

#2

Windows and Linux uses different USB drivers.

Your code only shows that you are creating a thread which does the receiving. There’s no other signs of thread synchronization. Is your main thread waiting for the receive thread to finish? Are you terminating the program early? Do you close the usb device when the program ends?

1 Like
#3

“libusb: warning [libusb_exit]” is a common warning on Linux. The way to remove that warning would be to disable each channel (call LMS_EnableChannel with false) and then call LMS_Close.

#4

I forgot to write testThread.join(); in main thread.
I was confused because in Win10 it works without .join()