OK.
Vu comment la fonction est écrite, on pourrait penser qu'elle peut supporter le passage d'une valeur vide, mais peut-être qu'elle n'aime pas ton '' et qu'il faudrait lui passer nil ou '0' ou que sais-je d'autre ?
Sinon, encore de la lecture : https://github.com/libusb/hidapi
Et en plus, c'est un peu le bronx avec les forks... Lecture (jusqu'en bas) : https://github.com/signal11/hidapi/issues/373 (tout en bas j'ai vu passer pas mal de posts avec un problème similaire au tien, enfin, lu à la va-vite).Citation:
HIDAPI has four back-ends:
Windows (using hid.dll)
Linux/hidraw (using the Kernel's hidraw driver)
libusb (using libusb-1.0 - Linux/BSD/other UNIX-like systems)
macOS (using IOHidManager)
On Linux, either the hidraw or the libusb back-end can be used. There are tradeoffs, and the functionality supported is slightly different. Both are built by default. It is up to the application linking to hidapi to choose the backend at link time by linking to either libhidapi-libusb or libhidapi-hidraw.
Note that you will need to install an udev rule file with your application for unprivileged users to be able to access HID devices with hidapi. Refer to the 69-hid.rules file in the udev directory for an example.
Linux/hidraw (linux/hid.c):
This back-end uses the hidraw interface in the Linux kernel, and supports both USB and Bluetooth HID devices. It requires kernel version at least 2.6.39 to build. In addition, it will only communicate with devices which have hidraw nodes associated with them. Keyboards, mice, and some other devices which are blacklisted from having hidraw nodes will not work. Fortunately, for nearly all the uses of hidraw, this is not a problem.
Linux/FreeBSD/libusb (libusb/hid.c):
This back-end uses libusb-1.0 to communicate directly to a USB device. This back-end will of course not work with Bluetooth devices.
Et un post intéressant à lire et utiliser pour tester sa config et ses périph's: https://unix.stackexchange.com/quest...-an-hid-device
HS : pourquoi ne pas demander au vendeur de ta station météo ce qu'elle attend et ce qu'elle peut fournir, et comment ?

