What is a character device?
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO9GURib1T8z7lCwjOGLQaGtrueEthgQ8LO42ZX8cOfTqDK4jvDDpKkLFwf2J49kYCMNW7d4ABih_XCb_2UXdq5fPJDkoyg7-8g_YfRUot-XnaXkNYycsNp7lA5_TW9td0FFpLQ2APzKcZ/s1600/1.jpg)
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYQ0N5W1qAOxLP7t7iOM6O6AzbZnkXUy16s7P_CWfOb5UbTQY_aDsc727chyphenhyphen5W4IppVNernMMQeaUFTB_rFzAd95_CDt-tnwN-nBx6JyUp2duGjPaL5-VgNO41AVsA_vu30EJcipdDG409/s400/Clash+Royale+CLAN+TAG%2523URR8PPP.png)
up vote
7
down vote
favorite
I was trying to make a partition on my USB drive when I came across some files/entities in /dev/
which seemed unfamiliar (such as hidraw2
). When I opened /dev in file manager and looked into their properties, it says that they are character devices
. While searching about them, I came across posts that explain what 'block devices' are, but no such post for character devices so far.
I would like to know what a character device is and what it does. Also I wonder about why they are called devices.
usb files filesystem
add a comment |Â
up vote
7
down vote
favorite
I was trying to make a partition on my USB drive when I came across some files/entities in /dev/
which seemed unfamiliar (such as hidraw2
). When I opened /dev in file manager and looked into their properties, it says that they are character devices
. While searching about them, I came across posts that explain what 'block devices' are, but no such post for character devices so far.
I would like to know what a character device is and what it does. Also I wonder about why they are called devices.
usb files filesystem
1
Also, The hidraw driver provides a raw interface to USB and Bluetooth Human Interface Devices (HIDs).
â AbraCadaver
Apr 2 at 20:30
add a comment |Â
up vote
7
down vote
favorite
up vote
7
down vote
favorite
I was trying to make a partition on my USB drive when I came across some files/entities in /dev/
which seemed unfamiliar (such as hidraw2
). When I opened /dev in file manager and looked into their properties, it says that they are character devices
. While searching about them, I came across posts that explain what 'block devices' are, but no such post for character devices so far.
I would like to know what a character device is and what it does. Also I wonder about why they are called devices.
usb files filesystem
I was trying to make a partition on my USB drive when I came across some files/entities in /dev/
which seemed unfamiliar (such as hidraw2
). When I opened /dev in file manager and looked into their properties, it says that they are character devices
. While searching about them, I came across posts that explain what 'block devices' are, but no such post for character devices so far.
I would like to know what a character device is and what it does. Also I wonder about why they are called devices.
usb files filesystem
usb files filesystem
asked Apr 2 at 18:44
NurShomik
515
515
1
Also, The hidraw driver provides a raw interface to USB and Bluetooth Human Interface Devices (HIDs).
â AbraCadaver
Apr 2 at 20:30
add a comment |Â
1
Also, The hidraw driver provides a raw interface to USB and Bluetooth Human Interface Devices (HIDs).
â AbraCadaver
Apr 2 at 20:30
1
1
Also, The hidraw driver provides a raw interface to USB and Bluetooth Human Interface Devices (HIDs).
â AbraCadaver
Apr 2 at 20:30
Also, The hidraw driver provides a raw interface to USB and Bluetooth Human Interface Devices (HIDs).
â AbraCadaver
Apr 2 at 20:30
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
10
down vote
accepted
This is a simple explanation:
- A Character ('c') Device is one with which the Driver communicates by sending and receiving single characters (bytes, octets).
- A Block ('b') Device is one with which the Driver communicates by sending entire blocks of data.
- Examples for Character Devices: serial ports, parallel ports, sounds cards.
- Examples for Block Devices: hard disks, USB cameras, Disk-On-Key.
- For the user, the type of the Device (block or character) does not matter - you just care that this is a hard disk partition or a sound card.
- Driver programmers, however, do care.
Here is more:
16.1.4.2 Block and Character Devices
A block device is one that is designed to operate in terms of the block I/O supported by Digital UNIX. It is accessed through the buffer cache. A block device has an associated block device driver that performs I/O by using file system block-sized buffers from a buffer cache supplied by the kernel. Block device drivers are particularly well-suited for disk drives, the most common block devices.
A character device is any device that can have streams of characters read from or written to it. A character device has a character device driver associated with it that can be used for a device such as a line printer that handles one character at a time. However, character drivers are not limited to performing I/O a single character at a time (despite the name ``character'' driver). For example, tape drivers frequently perform I/O in 10K chunks. A character device driver can also be used where it is necessary to copy data directly to or from a user process. Because of their flexibility in handling I/O, many drivers are character drivers. Line printers, interactive terminals, and graphics displays are examples of devices that require character device drivers.
Sources:
http://haifux.org/lectures/86-sil/kernel-modules-drivers/node10.html
https://arstechnica.com/civis/viewtopic.php?t=787631
Thanks for response. This clearly explains both block and character devices.
â NurShomik
Apr 2 at 19:59
Your welcome @NurShomik!
â George Udosen
Apr 2 at 20:11
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
10
down vote
accepted
This is a simple explanation:
- A Character ('c') Device is one with which the Driver communicates by sending and receiving single characters (bytes, octets).
- A Block ('b') Device is one with which the Driver communicates by sending entire blocks of data.
- Examples for Character Devices: serial ports, parallel ports, sounds cards.
- Examples for Block Devices: hard disks, USB cameras, Disk-On-Key.
- For the user, the type of the Device (block or character) does not matter - you just care that this is a hard disk partition or a sound card.
- Driver programmers, however, do care.
Here is more:
16.1.4.2 Block and Character Devices
A block device is one that is designed to operate in terms of the block I/O supported by Digital UNIX. It is accessed through the buffer cache. A block device has an associated block device driver that performs I/O by using file system block-sized buffers from a buffer cache supplied by the kernel. Block device drivers are particularly well-suited for disk drives, the most common block devices.
A character device is any device that can have streams of characters read from or written to it. A character device has a character device driver associated with it that can be used for a device such as a line printer that handles one character at a time. However, character drivers are not limited to performing I/O a single character at a time (despite the name ``character'' driver). For example, tape drivers frequently perform I/O in 10K chunks. A character device driver can also be used where it is necessary to copy data directly to or from a user process. Because of their flexibility in handling I/O, many drivers are character drivers. Line printers, interactive terminals, and graphics displays are examples of devices that require character device drivers.
Sources:
http://haifux.org/lectures/86-sil/kernel-modules-drivers/node10.html
https://arstechnica.com/civis/viewtopic.php?t=787631
Thanks for response. This clearly explains both block and character devices.
â NurShomik
Apr 2 at 19:59
Your welcome @NurShomik!
â George Udosen
Apr 2 at 20:11
add a comment |Â
up vote
10
down vote
accepted
This is a simple explanation:
- A Character ('c') Device is one with which the Driver communicates by sending and receiving single characters (bytes, octets).
- A Block ('b') Device is one with which the Driver communicates by sending entire blocks of data.
- Examples for Character Devices: serial ports, parallel ports, sounds cards.
- Examples for Block Devices: hard disks, USB cameras, Disk-On-Key.
- For the user, the type of the Device (block or character) does not matter - you just care that this is a hard disk partition or a sound card.
- Driver programmers, however, do care.
Here is more:
16.1.4.2 Block and Character Devices
A block device is one that is designed to operate in terms of the block I/O supported by Digital UNIX. It is accessed through the buffer cache. A block device has an associated block device driver that performs I/O by using file system block-sized buffers from a buffer cache supplied by the kernel. Block device drivers are particularly well-suited for disk drives, the most common block devices.
A character device is any device that can have streams of characters read from or written to it. A character device has a character device driver associated with it that can be used for a device such as a line printer that handles one character at a time. However, character drivers are not limited to performing I/O a single character at a time (despite the name ``character'' driver). For example, tape drivers frequently perform I/O in 10K chunks. A character device driver can also be used where it is necessary to copy data directly to or from a user process. Because of their flexibility in handling I/O, many drivers are character drivers. Line printers, interactive terminals, and graphics displays are examples of devices that require character device drivers.
Sources:
http://haifux.org/lectures/86-sil/kernel-modules-drivers/node10.html
https://arstechnica.com/civis/viewtopic.php?t=787631
Thanks for response. This clearly explains both block and character devices.
â NurShomik
Apr 2 at 19:59
Your welcome @NurShomik!
â George Udosen
Apr 2 at 20:11
add a comment |Â
up vote
10
down vote
accepted
up vote
10
down vote
accepted
This is a simple explanation:
- A Character ('c') Device is one with which the Driver communicates by sending and receiving single characters (bytes, octets).
- A Block ('b') Device is one with which the Driver communicates by sending entire blocks of data.
- Examples for Character Devices: serial ports, parallel ports, sounds cards.
- Examples for Block Devices: hard disks, USB cameras, Disk-On-Key.
- For the user, the type of the Device (block or character) does not matter - you just care that this is a hard disk partition or a sound card.
- Driver programmers, however, do care.
Here is more:
16.1.4.2 Block and Character Devices
A block device is one that is designed to operate in terms of the block I/O supported by Digital UNIX. It is accessed through the buffer cache. A block device has an associated block device driver that performs I/O by using file system block-sized buffers from a buffer cache supplied by the kernel. Block device drivers are particularly well-suited for disk drives, the most common block devices.
A character device is any device that can have streams of characters read from or written to it. A character device has a character device driver associated with it that can be used for a device such as a line printer that handles one character at a time. However, character drivers are not limited to performing I/O a single character at a time (despite the name ``character'' driver). For example, tape drivers frequently perform I/O in 10K chunks. A character device driver can also be used where it is necessary to copy data directly to or from a user process. Because of their flexibility in handling I/O, many drivers are character drivers. Line printers, interactive terminals, and graphics displays are examples of devices that require character device drivers.
Sources:
http://haifux.org/lectures/86-sil/kernel-modules-drivers/node10.html
https://arstechnica.com/civis/viewtopic.php?t=787631
This is a simple explanation:
- A Character ('c') Device is one with which the Driver communicates by sending and receiving single characters (bytes, octets).
- A Block ('b') Device is one with which the Driver communicates by sending entire blocks of data.
- Examples for Character Devices: serial ports, parallel ports, sounds cards.
- Examples for Block Devices: hard disks, USB cameras, Disk-On-Key.
- For the user, the type of the Device (block or character) does not matter - you just care that this is a hard disk partition or a sound card.
- Driver programmers, however, do care.
Here is more:
16.1.4.2 Block and Character Devices
A block device is one that is designed to operate in terms of the block I/O supported by Digital UNIX. It is accessed through the buffer cache. A block device has an associated block device driver that performs I/O by using file system block-sized buffers from a buffer cache supplied by the kernel. Block device drivers are particularly well-suited for disk drives, the most common block devices.
A character device is any device that can have streams of characters read from or written to it. A character device has a character device driver associated with it that can be used for a device such as a line printer that handles one character at a time. However, character drivers are not limited to performing I/O a single character at a time (despite the name ``character'' driver). For example, tape drivers frequently perform I/O in 10K chunks. A character device driver can also be used where it is necessary to copy data directly to or from a user process. Because of their flexibility in handling I/O, many drivers are character drivers. Line printers, interactive terminals, and graphics displays are examples of devices that require character device drivers.
Sources:
http://haifux.org/lectures/86-sil/kernel-modules-drivers/node10.html
https://arstechnica.com/civis/viewtopic.php?t=787631
edited Apr 2 at 19:37
![](https://i.stack.imgur.com/eVuAv.png?s=32&g=1)
![](https://i.stack.imgur.com/eVuAv.png?s=32&g=1)
wjandrea
7,18342255
7,18342255
answered Apr 2 at 19:01
![](https://i.stack.imgur.com/ElvwO.jpg?s=32&g=1)
![](https://i.stack.imgur.com/ElvwO.jpg?s=32&g=1)
George Udosen
17.2k93761
17.2k93761
Thanks for response. This clearly explains both block and character devices.
â NurShomik
Apr 2 at 19:59
Your welcome @NurShomik!
â George Udosen
Apr 2 at 20:11
add a comment |Â
Thanks for response. This clearly explains both block and character devices.
â NurShomik
Apr 2 at 19:59
Your welcome @NurShomik!
â George Udosen
Apr 2 at 20:11
Thanks for response. This clearly explains both block and character devices.
â NurShomik
Apr 2 at 19:59
Thanks for response. This clearly explains both block and character devices.
â NurShomik
Apr 2 at 19:59
Your welcome @NurShomik!
â George Udosen
Apr 2 at 20:11
Your welcome @NurShomik!
â George Udosen
Apr 2 at 20:11
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1021394%2fwhat-is-a-character-device%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
1
Also, The hidraw driver provides a raw interface to USB and Bluetooth Human Interface Devices (HIDs).
â AbraCadaver
Apr 2 at 20:30