
22. Troubleshooting
22.1. Where to start?
If it is the first time that you use a Yoctopuce module and you do not really know where to start, have
a look at the Yoctopuce blog. There is a section dedicated to beginners
1
.
22.2. Linux and USB
To work correctly under Linux, the the library needs to have write access to all the Yoctopuce USB
peripherals. However, by default under Linux, USB privileges of the non-root users are limited to read
access. To avoid having to run the
VirtualHub
as root, you need to create a new
udev
rule to
authorize one or several users to have write access to the Yoctopuce peripherals.
To add a new
udev
rule to your installation, you must add a file with a name following the "
##-
arbitraryName.rules
" format, in the "
/etc/udev/rules.d
" directory. When the system is
starting,
udev
reads all the files with a "
.rules
" extension in this directory, respecting the
alphabetical order (for example, the "
51-custom.rules
" file is interpreted AFTER the "
50-
udev-default.rules
" file).
The "
50-udev-default
" file contains the system default
udev
rules. To modify the default
behavior, you therefore need to create a file with a name that starts with a number larger than 50,
that will override the system default rules. Note that to add a rule, you need a root access on the
system.
In the
udev_conf
directory of the
VirtualHub
for Linux
2
archive, there are two rule examples which
you can use as a basis.
Example 1: 51-yoctopuce.rules
This rule provides all the users with read and write access to the Yoctopuce USB peripherals. Access
rights for all other peripherals are not modified. If this scenario suits you, you only need to copy the
"
51-yoctopuce_all.rules
" file into the "
/etc/udev/rules.d
" directory and to restart your
system.
# udev rules to allow write access to all users
# for Yoctopuce USB devices
1
see: http://www.yoctopuce.com/EN/blog_by_categories/for-the-beginners
2
http://www.yoctopuce.com/FR/virtualhub.php
www.yoctopuce.com
479
Summary of Contents for Yocto-RangeFinder
Page 1: ...Yocto RangeFinder User s guide...
Page 2: ......
Page 18: ...12 www yoctopuce com...
Page 26: ...20 www yoctopuce com...
Page 42: ...36 www yoctopuce com...
Page 70: ...gcc lyocto lm lpthread lusb 1 0 lstdc 10 Using Yocto RangeFinder with C 64 www yoctopuce com...
Page 90: ...84 www yoctopuce com...
Page 120: ...114 www yoctopuce com...
Page 130: ...124 www yoctopuce com...
Page 484: ...478 www yoctopuce com...
Page 488: ...482 www yoctopuce com...
Page 490: ...23 Characteristics 484 www yoctopuce com...
Page 491: ......
Page 492: ......