I'm using a USB device usually connected on /dev/ttyUSB0
Sometimes when there's more USB devices it goes to /dev/ttyUSB1 or others
I've added a rule under /etc/udev/rules.d/myrule.rules with the following line:
SUBSYSTEM=="usb", ATTRS{idVendor}=="xxxx", ATTRS{idProduct}=="yyyy", MODE="0666", SYMLINK="MyUSB"
That works fine, when I plug my USB device I get the /dev/MyUSB file ready.
The problem is that when I try to access to this file using my C++ program it doesn't work sending a message: "Inappropriate ioctl for device". If I use the /dev/ttyUSB0, which is also available everything works well.
Do I have to modify my C++ code to deal with SYMLINKS ?
Thanks in advance,
Carles.