Questions tagged [devices]

devices refers to questions about the Unix/Linux device special files, normally these are under /dev. Do not use this tag for physical devices (for that use e.g. usb or pci).

Filter by
Sorted by
Tagged with
0
votes
0answers
14 views

Getting the `/dev/video*` file path for a specific webcam?

Right now I have several camera paths on my system: /dev$ find . -name "video*"./video1 ./video0 ./video4 ./video2 I happen to know that my HTC Vive's web camera (located on the front of the VR ...
0
votes
1answer
27 views

Does a raw device need a file system?

In order to bypass the operating system cache when reading a file, I used O_DIRECT flag when calling open(). In Wikipedia it says that there is no difference between the two. Yet, does defining a HD (...
0
votes
0answers
67 views

PKCS # 7 signature not signed with a trusted key

I have this problem I don't know if it affects my computer in any way. When I turn it on, I get the message: PKCS # 7 signature not signed with a trusted key Which appears in white or orange. I am ...
0
votes
0answers
15 views

Get which /dev/tapX got associated to a macvtap without guessing

Following this guide to setup a macvtap works great. An excerpt from the guide loosk like this: # ip link add link eth1 name macvtap0 type macvtap # ip link set macvtap0 address 1a:46:0b:ca:bc:7b up #...
1
vote
0answers
37 views

What is the kind of device? [closed]

/dev/ack ( /dev/ackf for example) in UNIX (such as S5R4)? And how it is using? it looks like a terminal (tty) with some differences (it's from my practic), but I have not full understanding what is ...
1
vote
1answer
64 views

How do I get the `/dev/ttyUSB0` from `/dev/bus/usb/006/015`?

Short version: How, from device information such as /devices/pci0000:00/0000:00:13.1/usb6/6-3 and /dev/bus/usb/006/015, I get a path such as /dev/ttyUSB0 or /dev/serial/by-path/pci-0000:00:13.1-usb-0:...
0
votes
0answers
24 views

lsusb listing the device but not accessible on serial port

I connected a device using USB port. The device drivers are installed. I would like to access it from serial port. Using lsusb it lists the device as: Bus 001 Device 002: ID 106f:0003 ...
0
votes
0answers
24 views

What is the meaning of SYMLINK in udev rules?

I've been trying to write a USB driver for a device, but none of the methods (libhid, libusb-0.1, libusb-1.0) I've tried work. I've written usb drivers before. I can also communicate with the device ...
0
votes
0answers
28 views

How to read GPS device from /dev/gps?

I have a GPS module in my Linux board with Ubuntu 16.04 armhf on it (OrangePi 3G-IoT). I need to read the GPS module's data. It exists in /dev/gps. How can I read the /dev/gps device and get ...
0
votes
0answers
27 views

/dev/tty0 not exist in systemd-nspawn container?

I am trying to run a linux container using systemd-nspawn. Here is my full command: systemd-nspawn --boot \ --machine "virtualdesktop" \ --setenv=DISPLAY=:1 \ --directory /mnt/virtualdesktop I'...
0
votes
0answers
24 views

How to find hid device and detect when inserted/removed?

I'm following this example on reading data from /dev/hidraw : https://elixir.bootlin.com/linux/latest/source/samples/hidraw/hid-example.c It's exactly what I'm looking as a proof of concept. ...
1
vote
1answer
105 views

Understanding /dev folder in linux (android)

I am trying to understand how linux filesystems work, but the only linux system I have is my android phone (rooted) so I am asking on the basis of what I see oin the android phone using adb shell. ...
1
vote
0answers
52 views

Fedora 30 : Ensure No Device Files are Unlabeled by SELinux

While hardening Fedora 30, I encountered this measure on open-scap.org and actually the command : sudo find /dev -context *:device_t:* \( -type c -o -type b \) -printf "%p %Z\n" returns on my system ...
0
votes
1answer
29 views

How do I access a PIO board for writing a driver?

I am studying writing a driver, with the goal of communicating to a simple PIO PCI board from user space. First, I created a sample character driver. The simple text string in memory stuff. Created ...
0
votes
0answers
14 views

USB log / copie operations log

I want to know if there is any way to know each device has been plugged into my Linux box weeks ago// or a way to see If some of my files have been copied from my Linux box to a USB weeks ago.
4
votes
2answers
181 views

Udev and uevent question

So i was just wondering if my explanations of udev and how it works seem correct and my understanding is correct please let me know. SO my understanding of udev is that it is a dynamic device manager ...
2
votes
1answer
34 views

Forwarding device file traffic over ssh to another pc

I have the following situation. DEV1 <---> PC1 <---> PC2 DEV1 is connected over serial to PC1 where a device file is created in /dev/ttyUSB0. PC1 and PC2 are in the same network. I can ...
0
votes
0answers
27 views

The strange behavior of some /dev/sg* files

RHEL 6.4 Why only some fixed /dev/sg* file would randomly change with shift or lose with - for some unknown reason sometimes? Notes: but the corresponding /dev/st* files themselves do not change or ...
0
votes
0answers
50 views

Running Xorg-Server within Docker container on Arch Linux - Keyboard/Mouse input disabled

I want to run a Xorg Server within a container following this guide: https://joshh.info/2016/xserver-inside-docker-container/ But I use Arch therefore. It works fine but I stumple over the mentioned ...
1
vote
0answers
26 views

LLinux Device Driver interfacing

In device driver programming we are using following items: Device driver code Device file Actual physical Hardware (till now not used in my coding) User space application code What I understood is ...
1
vote
0answers
39 views

type string as if it were a keyboard

I have a bunch of unicode symbols in a file and a script to select and copy one of them (dmenuunicode script in this repository which I've forked). But instead pasting them I would like to save one ...
0
votes
0answers
39 views

Skype Linux Mint: no device found when running as user

I have a problem with Skype on my PC with Linux Mint 19. When I run Skype, it doesn't recognize any of my devices anymore whereas it was working perfectly before. I tried to launch Skype as root ...
2
votes
1answer
54 views

Adding entropy to /dev/random

I'm in the process of designing and building a quantum random number generator for high security applications (and potentially data centres). As part of this, I would like to feed the random numbers ...
0
votes
2answers
58 views

How can I blacklist my inbuilt mic

I tried to blacklist my inbuilt mic, I also search on some other web site They showed the command. "cat /proc/asound/modules" I run it and I have the out put of 0 snd_hda_intel 1 snd_hda_intel If ...
0
votes
0answers
21 views

How does gnome-terminal receive information from the pseudo-teletype on X? [duplicate]

I have the following terminal session: [OP@localhost ~]$ tty /dev/pts/2 [OP@localhost ~]$ echo hello > /dev/pts/2 hello My question is how the application gnome-terminal, receives the string "...
1
vote
0answers
98 views

USB Keyboard doesn't work until I manually inspect its device file

So I have a USB Keyboard that I built myself which runs the qmk keyboard firmware. I would preface this by saying that it's possible that this is a bug in the keyboard firmware. However, since the ...
0
votes
0answers
719 views

rm: cannot remove '<Directory name>': Device or resource busy

I know there can be a lot of duplicates. I have gone through almost all of them (like lsof, fuser, etc) and I could not get it resolved. rm: cannot remove 'temp_p/sys': Device or resource busy ...
-1
votes
1answer
93 views

DoS: how to limit access to /dev/random?

One of my users likes to cat /dev/random > /dev/null. This has caused issues with other processes performing poorly because they're blocked waiting for entropy. Is there a way of preventing users ...
3
votes
1answer
92 views

How to make /dev inside linux namespaces

AFAIK the container terminology, what I'm essentially trying to accomplish is to write my own "container runtime". What I'm doing: user@host:~$ mkdir test user@host:~$ cd test user@host:~/test$ ...
0
votes
1answer
78 views

“No partition active” when booting from a USB

I'm not sure if this is a "unix" question, but I'm in dire straits: I'm running Mint 18.1 Serena 64bit. I'm trying to burn a Windows 10 ISO to a USB drive so that I can boot from it via selecting it ...
-3
votes
1answer
112 views

Time and again I forget the meaning of a single hyphen in the end of some utility commands [duplicate]

Time and again I come across old codes and recognize a single hyphen in the command's end: mysqldump -u root -p --all-databases | zip "$drt/db-$date.zip" - or wget ${target_url} -O - | tar -xzv --...
0
votes
0answers
71 views

FreeBSD: how can I check if `/dev/random` is blocking?

So this exact question has been asked many times about Linux's implementation of /dev/random, but I am struggling to find an answer that is FreeBSD specific. From the FreeBSD random(4) man page: ...
0
votes
1answer
86 views

MDADM creates additional block devices

I noticed a strange issue when creating RAID array with mdadm. As far as I see, it creates additional devices of md type. According to the kernel.org documentation, the md device type is Metadisk (...
0
votes
0answers
41 views

Kernel randomly maps storage device to different device file

So this is kind of strange. I was trying to put a screenshot into my Videos/ directory, and while trying to cd where I wanted to go, I was getting I/O errors. For context, I have a storage drive ...
1
vote
1answer
418 views

Jetson TX2 device tree, i2c nodes and camera driver loading

I am a bit confused with behavior of Jetson TX2 when loading drivers for camera. Here is definition of IMX274 in device tree: i2c@3180000 { reg = <0x0 0x3180000 0x0 0x100>; ...
1
vote
0answers
18 views

Automatically remove a device from /dev

I am having keyboard problems, with a laptop built in keyboard. I have an external keyboard, so wish to disable the internal one. So far I have discovered that I can disable within X11 using xinput ...
2
votes
2answers
653 views

How can I disable an input device?

I have a broken laptop built-in keyboard (The shift-button sometimes gets stuck down). I exclusively use an external keyboard, but the internal keyboard interferes with it. (I can not unplug the ...
0
votes
0answers
32 views

Query the target device for installed PCI devices on ubuntu

Is there a way to query the target device for installed PCI devices on ubuntu. I use VideoCapture Card and 8 cameras. Every time /dev/video* changes but I would like to assign a camera to specific /...
0
votes
0answers
32 views

eCSPI with different MOSI, MISO and SCK per spi_device

The manufacturer's device tree setup for ecspi1: &ecspi1 { fsl,spi-num-chipselects = <1>; cs-gpios = <&gpio2 30 0>; pinctrl-names = "default"; pinctrl-0 = <&...
2
votes
1answer
231 views

What is the use of the dummy device?

I am checking the code of the dummy device driver. The dummy_xmit() function destroys the packet. I want to ask what is the real use of the dummy device or is it not useful today and is a legacy ...
4
votes
1answer
43 views

How to I set the permissions necessary to make the ioctl CDROM_SEND_PACKET command run?

I've run into an error stemming from lacking permissions when using the CDIO library to issue an eject command to my USB CD-ROM drive. I always get an error message like this: INFO: ioctl ...
0
votes
1answer
24 views

Sort block devices by most recently connected?

How can I block devices by the most recent added ones? No option in lsblk seems to have that functionality.
0
votes
1answer
55 views

How do I see that a device is mounted with `exec` option using either mount or /proc/mounts?

I've mounted a cdrom device with mount -o exec /dev/sr0 /media/cdrom0, since I couldn't execute files on it, when the drive was initially mounted by the virtual machine. Now, when I run cat /proc/...
13
votes
2answers
2k views

Why are < or > required to use /dev/tcp

When trying to call /dev/tcp/www.google.com/80, by typing /dev/tcp/www.google.com/80 Bash says no such file or directory. When looking at other people's code online, they use syntax such as 3<&...
-1
votes
1answer
53 views

make a pseudo device like /dev/random that outputs primes?

/dev/primes is what I want without writing C code just python which I have known and easily written the program. The device file should be similar to /dev/urandom that outputs primes instead of ...
1
vote
1answer
74 views

How can I check the model of a device connected to a specific COM through a ssh connection

I am trying to access a remote machine through ssh and check the model of a device that it is connected to a specific COM port; I know what port it is. I have tried some commands, but they either don'...
0
votes
1answer
506 views

Partition table & filesystem for a USB flash drive

I've got a USB flash drive I want to use on printers, audio equipment, and other various devices. In my experience, most Linux is very forgiving about what partition table and FS type I use on my ...
2
votes
1answer
92 views

FreeBSD: /dev/dsp exists (“ls -al /dev/dsp”), but does not show in “ls -al /dev”

I'm using FreeBSD-12.0-RELEASE-amd64, when I list all the files in /dev, I don't see /dev/dsp (note there's no output after the first command), but when I list the file by explicitly specifying its ...
0
votes
1answer
56 views

Is there a kind of '/dev/null' to fake output file path?

Let says that I have a CLI which transforms a file_a into a file_b like so: transform --input /path/to/file_a --ouptut /path/to/file_b I have developed a program that use this CLI and need to unit ...
18
votes
1answer
4k views

What are nvme namespaces? How do they work?

I've recently begun supporting Linux installed on devices with built-in nvme ssds. I noticed the device files had an extra number, beyond a number identifying the drive number and the partition number....