How do i create hardware nodes?

The place to post if you need help or advice

Moderators: ChrisThornett, LXF moderators

How do i create hardware nodes?

Postby AJB2K3 » Sun May 22, 2005 8:25 am

How do i create hardware nodes in Mandriva ltd ED
Im trying to create a hardware node Video0 for a tevion
TV7134RF video capture card so i can watch tv.
Can anyone help without ignoring me?
Why cant i log back in to edit my posts or check message? the forums are refusing my id a pasword but i have to valid ids?[/b]
AJB2K3
 

RE: How do i create hardware nodes?

Postby dandnsmith » Sun May 22, 2005 4:45 pm

I only know how to do it in a terminal window, as root

cd /dev
mknod ......

I suggest a quick look at the man page(s) for mknod and anything else related to get the right parameters.
Post again if there's still a problem, giving detail
Derek
dandnsmith
LXF regular
 
Posts: 316
Joined: Fri Apr 15, 2005 10:01 am
Location: Berks, UK

RE: How do i create hardware nodes?

Postby Guest » Sun May 22, 2005 5:59 pm

so i know ive got to do
mknod /dev/Video0 c 4 64
How ever thec 4 64 have to be altered to suit the device, but i dont understand the majour/minor number system.
and i know i need to do something chown for user root&adam, however i lose it her.
can you help?

Um LXF can you do an article on mknod some time please?
Guest
 

RE: How do i create hardware nodes?

Postby dandnsmith » Tue May 24, 2005 11:05 am

After your reply, I just had a quick look myself.
Since I last had occasion to use the mknod command, things have changed. There used to be a script to do it, with enough info to guide you - I cannot see where this is now.
Have a look at the man page for MAKEDEV (put it in CAPS, else it isn't found) and see if that helps at all.
Also devices.txt under /usr/share/doc/MAKEDEV....
Derek
dandnsmith
LXF regular
 
Posts: 316
Joined: Fri Apr 15, 2005 10:01 am
Location: Berks, UK

RE: How do i create hardware nodes?

Postby AJB2K3 » Sun May 29, 2005 12:23 pm

Ive created the node using mknod c 81 0 , whick i am told is for capture devices but when i run xawtv in terminal i get
Code: Select all
[adam@localhost ~]$ xawtv
This is xawtv-3.94, running on Linux/i686 (2.6.11-6mdk-i686-up-4GB)
can't open /dev/video0: No such device
v4l-conf had some trouble, trying to continue anyway
v4l2: open /dev/video0: No such device
v4l2: open /dev/video0: No such device
v4l: open /dev/video0: No such device
no video grabber device available
[adam@localhost ~]$

can anyone help me with this?
/dev/video0 does exist and adam has full access.
AJB2K3
 

RE: How do i create hardware nodes?

Postby nordle » Sun May 29, 2005 3:11 pm

Not quite the same, but may be of use:

#!/bin/sh
# Create device nodes for the Linux DVB API with DVB_API_VERSION 2.
# The devices created are suitable for most current PC DVB cards,
# i.e. cards having one frontend, one demux and optionally one
# MPEG decoder.
# The script creates devices for two cards by default.

if [ -e /dev/.devfsd ]; then
echo "It seems you are using devfs. Good!"
exit 0
fi

# get rid of old DVB API devices; do it twice for good measure...
rm -rf /dev/ost
rm -rf /dev/ost
rm -rf /dev/dvb
rm -rf /dev/dvb

mkdir /dev/dvb
chmod 755 /dev/dvb

for i in `seq 0 1`; do
echo "Creating DVB devices in /dev/dvb/adapter$i"
mkdir /dev/dvb/adapter$i
chmod 755 /dev/dvb/adapter$i
mknod -m 0660 /dev/dvb/adapter$i/video0 c 212 `expr 64 \* $i + 0`
mknod -m 0660 /dev/dvb/adapter$i/audio0 c 212 `expr 64 \* $i + 1`
mknod -m 0660 /dev/dvb/adapter$i/frontend0 c 212 `expr 64 \* $i + 3`
mknod -m 0660 /dev/dvb/adapter$i/demux0 c 212 `expr 64 \* $i + 4`
mknod -m 0660 /dev/dvb/adapter$i/dvr0 c 212 `expr 64 \* $i + 5`
mknod -m 0660 /dev/dvb/adapter$i/ca0 c 212 `expr 64 \* $i + 6`
mknod -m 0660 /dev/dvb/adapter$i/net0 c 212 `expr 64 \* $i + 7`
mknod -m 0660 /dev/dvb/adapter$i/osd0 c 212 `expr 64 \* $i + 8`
chown root.video /dev/dvb/adapter$i/*
done
I think, therefore I compile
User avatar
nordle
LXF regular
 
Posts: 1500
Joined: Fri Apr 08, 2005 9:56 pm

RE: How do i create hardware nodes?

Postby Guest » Mon May 30, 2005 8:59 am

huh i dont under stand ! i posted a terminal output and you post code .
can you explain.
Guest
 


Return to Help!

Who is online

Users browsing this forum: No registered users and 1 guest