Questions tagged [character-device]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
35 views

Concurrent write access to character device file

I am wondering what happens when two processes write to a character device file at the same time. Currently, I am mostly worried about /dev/spidev0.0 on a Raspberry pi. If I assume correctly that it's ...
1
vote
0answers
46 views

MITM / Proxy for Character devices

I have a character devices file, say /dev/X and I would like to capture every interaction which goes in and out of /dev/X. I'm looking for a way to create some kind of MITM/Proxy to that file. Edit: ...
0
votes
0answers
18 views

Raw Device in Red Hat 8.3

I have an issue with the creation of raw devices in Red Hat 8.3. On the Red Hat website, I found only the procedure for Red Hat 7 and no indication for Red Hat 8. Is it the same procedure? I need to ...
1
vote
0answers
29 views

May a character device only handle blocking I/O?

Let's consider the following (imaginary) device: a clock which takes 1 second to query, then returns the current time. We want to write a character device driver for it, which supports read operations ...
0
votes
1answer
53 views

How are the TTY and serial_core related?

I need to write a new character device file for the UART, which allows a few more file operations than usually allowed (not just open, write, etc..) I'm on an embedded mainline linux kernel (v 5.4). I ...
0
votes
0answers
5 views

NVRAM SPI character driver

I have NVRAM device FM25CL64B-G on a board. The device is controlled by SPI. I write on the device through SPI device file. I write a program to do this. But I want to use NVRAM directly as character ...
0
votes
0answers
26 views

Are /dev/i2c-1 and /dev/mem colliding?

I write a program which should handle a motion sensor and an ultrasonic sensor at the same time. I'm using a Jetson Nano with 40 GPIO-pins. The first one uses I2C interface and thus accesses /dev/i2c-...
0
votes
2answers
152 views

Is keyboard driver a character device driver?

I am learning device drivers and I got this doubt , is keyboard driver a character device driver in Linux?
1
vote
1answer
50 views

what will the kernel do when an USB mouse inserted in Linux PC?

I am trying to write a kernel module which loads upon detection of USB Mouse. I am new to this stuff, I googled for this issue but couldn't find any appropriate solution. can anyone please explain ...
1
vote
1answer
209 views

Kernel throws error while writing to the character device file in 4.9.82-ti-r102 debian 9.3

I created the device file under /dev folder successfully, but writing to that device file makes kernel to throw following error messages. Message from syslogd@beaglebone at Feb 26 15:40:10 ... kernel:...
1
vote
0answers
2k views

Nvme not showing up in /dev on Ubuntu 19.04 (5.0.0-13)

I have an Ubuntu 19.04 on a machine with an nvme drive. However, the drive is not found in /dev/nvme*. cat /proc/devices shows that nvme is loaded as a character device and not a block device and ...
-1
votes
1answer
125 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 ...
0
votes
1answer
123 views

Send Shift PgUp to the console

With a little help from an answer found here I was able to use below script to send keystrokes to the VGA console /dev/tty1 #!/usr/bin/perl use warnings; use strict; open( my $TTY1 , '>' , '/dev/...
0
votes
0answers
142 views

How to create a new character device under /proc/device file?

I am trying to create a node with mknod /tmp/ttyACM0 c 166 0 command but then No such device or address error returns when I try to open serial port with ttyACM0 because there is no device in proc/...
-2
votes
1answer
190 views

Does the virtual filesystem work on top of character devices and network subsystems?

Does the virtual filesystem work on top of character devices and network subsystems, or just on top of filesystems and block devices? Could you also explain a bit about in what sense "the VFS is ...
3
votes
1answer
1k views

Is a device being a block or character device determined purely by hardware?

From https://unix.stackexchange.com/a/472920/674 A "character device" and "block device" are abstractions, usually used in Unix-style systems in classifying various devices. Is a device being a ...
-2
votes
1answer
147 views

Why is the transfer unit of block devices block not page?

Operating System Concepts says A character-stream device transfers bytes one by one, whereas a block device transfers a block of bytes as a unit. But I heard that the unit of transfer between main ...
1
vote
2answers
580 views

Do “serial ports” or “parallel ports” apply to character devices only, but not to block devices?

From http://haifux.org/lectures/86-sil/kernel-modules-drivers/node10.html A Character ('c') Device is one with which the Driver communicates by sending and receiving single characters (bytes, ...
-3
votes
1answer
228 views

Are there implications between block/character device and random/sequential access? [closed]

Operating System Concepts says: Devices vary on many dimensions, as illustrated in Figure 13.7. • Character-stream or block. A character-stream device transfers bytes one by one, whereas a block ...
0
votes
1answer
1k views

Can filesystems be created only on block devices, but not on character devices?

Can filesystems be created only on block devices, but not on character devices? Can a filesystem be viewed as a block device itself (for example, when programming to use a file system)? My guess is ...