Questions tagged [libudev]

libudev is a API library for accessing udev device management within systemd daemon designed for Linux. Use this tag for *programming questions* using libudev. Questions about *configuring the daemon* (including writing unit files) or using udevadm tool are better directed to Unix & Linux: https://unix.stackexchange.com.

16 questions
10
votes
4 answers

libudev development package not found

I am writing an app autodetect devices is plugged/unplugged. I used C++ with the Qt framework. libudev.h was included on my code. and I actually installed libudev-dev package successful via sudo apt-get install libudev-dev but QtCreator still has an…
kien bui
  • 1,760
  • 2
  • 17
  • 33
2
votes
2 answers

Listening for sysfs battery events

I'm writing a daemon which checks the battery capacity. This is for a solar powered embedded device running Linux. I've read that it's a bad idea to use sleep() in daemons, thus I'm trying to use events. So I wrote some PoCs, but I'm not getting any…
pan
  • 121
  • 1
  • 4
2
votes
0 answers

How can I detect USB serial port connections in C on Windows and macOS?

Using libudev in Linux I am able to add a handle to an event manger to detect on boot and upon plugging in a USB serial device by monitoring tty events. self->udev_monitor = udev_monitor_new_from_netlink(self->udev,…
jwoodw
  • 19
  • 3
1
vote
0 answers

How pyudev is LGPL license but libudev-dev is GPL license?

The systemd source indicating udev is GPL license: systemd$ vim LICENSES/README.md The following exceptions apply:  * some udev sources under src/udev/ are licensed under **GPL-2.0-or-later**, so the    udev binaries as a whole are also distributed…
Marco Polo
  • 11
  • 2
1
vote
1 answer

error: failed to run custom build command for `libudev-sys v0.1.4`

I am new to rust and trying to do cross compilation. However while doing that I am getting an error error: failed to run custom build command for libudev-sys v0.1.4 . I tried following the solution…
Ankit Kumar
  • 403
  • 3
  • 8
1
vote
0 answers

How can I get libusb hotplug events to a docker container?

TD;DR I would like to know if there is a way to get AP_NETLINK/NETLINK_KOBJECT_UEVENT messages in a docker container without using --net host. So I can make libusb hotplug feature to work... Partially answer, read Edit 1 and Edit 2 I am trying to…
Lord_Rafa
  • 33
  • 7
0
votes
0 answers

Keys for udev_device_get_property_value

What keys (c strings) can be used in udev_device_get_property_value? Where I can look for list of all keys? It is looks that no chance to find it in official API documentation. Thanks! Only founds ref manuals like…
0
votes
0 answers

How to build libudev from source?

I am trying to build libudev from source, since I would like to make it a conan package. Current conan package only installs libudev from apt repository. I have found the sources under the systemd library here since original source was merged into…
Brykyz
  • 587
  • 4
  • 30
0
votes
0 answers

How to "conan install" libudev package for arm arch?

The "libudev/system" available on conancenter for x86 arch: https://conan.io/center/libudev?os=Linux&tab=configuration When installing to x86 it is working: sudo conan install libudev/system@ -pr ./conan/profiles/x86_64 --build=missing -r…
Marco Polo
  • 11
  • 2
0
votes
1 answer

udev interface for python3?

Is there any example on how to capture udev events in Python3? I can't get events working at all in .237 (or 1.0?). And couldn't get any examples of GUdev with Introspection. I'm not sure where the problem lies. I found an example test.py but there,…
jcoppens
  • 5,306
  • 6
  • 27
  • 47
0
votes
1 answer

Using libudev to find device dev path by pid and vid

I currently have a device that has a known PID and VID that is unique to the device and I want to use that information to find it's dev device path, like /dev/ttyUSB0. Is this possible? So far, I have been successful in using libudev to find the…
dan123123
  • 67
  • 1
  • 10
0
votes
1 answer

V4L-Utils & Vitis 2021.2 Build Instructions

I'm trying to build V4L-Utils using the instructions System: Vitis 2021.2, Ubuntu 20.04.4 LTS Setup: ~$ source /tools/Xilinx/Vivado/2021.2/settings64.sh ~$ source /home/max/petalinux/2021.2/settings.sh ~$ export INSTALL_PREFIX=/usr ~$ ./configure…
Max
  • 43
  • 9
0
votes
1 answer

In C, is there a way to pass a return value of one program to another program?

I have 2 basic questions since I'm new at C: How to go about passing the return value of a C program to another program? prog1 will list out items (number of items can be varied each time of execution) and I'd like to store and pass ONLY the last…
aqh999
  • 3
  • 3
0
votes
0 answers

pass DEVNAME as argument to a script in udevrules

I am trying to catch devtype=usb_interface and pass devname of the usb_device it came from, kinda like this: ACTION=="add" ENV{DEVTYPE}=="usb_interface" RUN+="/path/to/exec/exec_41_udevrules.py '%E{ACTION}' '%E{DEVNAME}'" problem is passing…
John Doe
  • 97
  • 1
  • 10
0
votes
1 answer

caps2esc stopped working with systemd problem

I'm running Manjaro 18.1.0 and using the interception-caps2esc 0.1.3-2 plugin via AUR. My /etc/udevmon.yaml and /etc/systemd/system/udevmon.service are setup as described in the answer here. This has been working fine for months, but has now…
MSR
  • 2,731
  • 1
  • 14
  • 24
1
2