Jump to content


Photo

[ET 9000] and udev didn't start automatically !


  • Please log in to reply
12 replies to this topic

#1 Pike_Bishop

  • Senior Member
  • 1,138 posts

+74
Good

Posted 12 March 2014 - 18:50

Hi,

 

i have installed udev on my box and maked a udev.rules

if i make;

/etc/init.d/udev restart

then my rules worked

but if i reboot my box udev didn't start automatically but why ?

 

the init script is here with name udev in /etc/init.d

and it's linked to /etc/scS.d/S04udev

but udev didn't start automatically

 

and also if i make;

/etc/init.d/udev stop

it comes the following output;

Starting udev

what's that, is the udev init script wrong ?

 

as i sayed, if i make then manually;

/etc/init.d/udev restart

my rules is created and works perfect

 

 

here the udev init script;

#!/bin/sh

### BEGIN INIT INFO
# Provides:          udev
# Required-Start:    mountvirtfs
# Required-Stop:     
# Default-Start:     S
# Default-Stop:
# Short-Description: Start udevd, populate /dev (symlinks only) and load drivers.
### END INIT INFO

export TZ=/etc/localtime

[ -d /sys/class ] || exit 1
[ -r /proc/mounts ] || exit 1
[ -x /lib/udev/udevd ] || exit 1
[ -f /etc/default/udev ] && . /etc/default/udev
[ -f /etc/udev/udev.conf ] && . /etc/udev/udev.conf

kill_udevd() {
        pid=`pidof -x udevd`
        [ -n "$pid" ] && kill $pid
}

export ACTION=add

echo "Starting udev"

if [ ! -e "/lib/modules/$(uname -r)"/modules.dep ] ; then
	mkdir -p /lib/modules/$(uname -r)
	depmod -ae
fi

# make_extra_nodes
kill_udevd > "/dev/null" 2>&1

# trigger the sorted events
echo -e '\000\000\000\000' > /proc/sys/kernel/hotplug
/lib/udev/udevd -d

/usr/bin/udevadm control --env STARTUP=1
/usr/bin/udevadm trigger --action=add
#/usr/bin/udevadm settle

exit 0

 

regards

Biki3


Edited by Biki3, 12 March 2014 - 18:52.

Receiver: VU Ultimo 4K, Octagon SF8008 4K, Gigablue Quad 4K

Image: OpenPLI-8.3


Re: [ET 9000] and udev didn't start automatically ! #2 betacentauri

  • PLi® Core member
  • 7,185 posts

+323
Excellent

Posted 12 March 2014 - 19:28

Hi biki3,

 

start udev later. That seems to work (but I didn't test with OpenPli image).

So try

mv /etc/scS.d/S04udev /etc/scS.d/S56udev

Xtrend ET-9200, ET-8000, ET-10000, OpenPliPC on Ubuntu 12.04

Re: [ET 9000] and udev didn't start automatically ! #3 Pike_Bishop

  • Senior Member
  • 1,138 posts

+74
Good

Posted 12 March 2014 - 21:24

Hi betacentauri,

 

ok - thanks a lot, i will try it. :)

 

regards

Biki3


Receiver: VU Ultimo 4K, Octagon SF8008 4K, Gigablue Quad 4K

Image: OpenPLI-8.3


Re: [ET 9000] and udev didn't start automatically ! #4 MiLo

  • PLi® Core member
  • 14,048 posts

+298
Excellent

Posted 13 March 2014 - 16:55

I'd expect udev to conflict horribly with the pre-installed mdev which is already managing hardware devices. I'm surprised your box actually still boots after installing it.
Real musicians never die - they just decompose

Re: [ET 9000] and udev didn't start automatically ! #5 betacentauri

  • PLi® Core member
  • 7,185 posts

+323
Excellent

Posted 13 March 2014 - 18:48

Yes, it boots. But I don't know whether udev really works. I only see the processes running...
Xtrend ET-9200, ET-8000, ET-10000, OpenPliPC on Ubuntu 12.04

Re: [ET 9000] and udev didn't start automatically ! #6 MiLo

  • PLi® Core member
  • 14,048 posts

+298
Excellent

Posted 14 March 2014 - 10:22

What do you need udev for?
Real musicians never die - they just decompose

Re: [ET 9000] and udev didn't start automatically ! #7 betacentauri

  • PLi® Core member
  • 7,185 posts

+323
Excellent

Posted 14 March 2014 - 10:51

I don't use it. I only tested it for biki3. As far as I understood (we spoke via pm) he wants to use a smargo and uses a udev.rule to get it working. But better he answers ;-)


Xtrend ET-9200, ET-8000, ET-10000, OpenPliPC on Ubuntu 12.04

Re: [ET 9000] and udev didn't start automatically ! #8 Pike_Bishop

  • Senior Member
  • 1,138 posts

+74
Good

Posted 14 March 2014 - 21:40

Hi MiLo,

 

yes @betacentauri is right i need udev.

it has to do with a et9500 and a sky card S02 in a Smargo V2 reader with oscam.

the internal readers of the et9500 are not so good and didn't read the sky card with oscam, therefore i bought a Smargo V2 reader

and wan't use it with oscam in smartreader or smargo mode.

for this i need the serial from the Smargo V2 to make a device per udev as example named /dev/SmargoV2

and then it works with oscam if i have this;

device = /dev/SmargoV2

in oscam.server

 

so that this is working i need also udev and a udev.rules as following;

## Smargo Smartreader+ rules
SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", ATTRS{idProduct}=="6001", ATTRS{serial}=="RKABD247", SYMLINK+="SmargoV2", MODE="660"

this udev.rules i named 52-smargo.rules

 

is there a way to make the same also with mdev ?

 

 

regards

Biki3


Receiver: VU Ultimo 4K, Octagon SF8008 4K, Gigablue Quad 4K

Image: OpenPLI-8.3


Re: [ET 9000] and udev didn't start automatically ! #9 MiLo

  • PLi® Core member
  • 14,048 posts

+298
Excellent

Posted 15 March 2014 - 13:16

is there a way to make the same also with mdev ?

Yes.

But I know nothing about smargo, nor about udev.

It looks like a usb-to-serial, that should just work without any changes.
Real musicians never die - they just decompose

Re: [ET 9000] and udev didn't start automatically ! #10 Pike_Bishop

  • Senior Member
  • 1,138 posts

+74
Good

Posted 16 March 2014 - 16:51

Hi MiLo,

 

thanks for your reply !

 

It looks like a usb-to-serial, that should just work without any changes.

 

it's a external cardreader which is needed the module usbserial and ftdi_sio.

if this modules are loaded then the smargo is identified as /dev/ttyUSB0 if we have only one Smargo on the box

and so the smargo is working with oscam in mouse mode and it's enough to make in the oscam.server an entry as;

device = /dev/ttyUSB0

but much better (and if we have more then one smargo on the box it's necessary) to use the smargo instead in the mouse mode in smargo or smartreader mode

otherwise it is possible that the devices on the box as example for two smargos  /dev/ttyUSB0 and /dev/ttyUSB1 are changed after a reboot.

 

to solve this problem we can use the smargo in smargo or smartreader mode but for this we must link the smargo with his serial

to a special device as example /devSmargoV2 and i know the way for that with udev, but i didn't know this way with mdev.

 

for udev it's easy i need only the output from the following command in telnet;

udevadm info --name=/dev/ttyUSB0 --attribute-walk

now the important detail from the output to this command;

  looking at device '/devices/platform/ehci-brcm.1/usb2/2-1/2-1.1/2-1.1:1.0/ttyU
SB0/tty/ttyUSB0':
	KERNEL=="ttyUSB0"
	SUBSYSTEM=="tty"
	DRIVER==""

  looking at parent device '/devices/platform/ehci-brcm.1/usb2/2-1/2-1.1/2-1.1:1
.0/ttyUSB0':
	KERNELS=="ttyUSB0"
	SUBSYSTEMS=="usb-serial"
	DRIVERS=="ftdi_sio"
	ATTRS{port_number}=="0"
	ATTRS{latency_timer}=="1"

  looking at parent device '/devices/platform/ehci-brcm.1/usb2/2-1/2-1.1/2-1.1:1
.0':
	KERNELS=="2-1.1:1.0"
	SUBSYSTEMS=="usb"
	DRIVERS=="ftdi_sio"
	ATTRS{bInterfaceClass}=="ff"
	ATTRS{bInterfaceSubClass}=="ff"
	ATTRS{bInterfaceProtocol}=="ff"
	ATTRS{bNumEndpoints}=="02"
	ATTRS{supports_autosuspend}=="1"
	ATTRS{bAlternateSetting}==" 0"
	ATTRS{bInterfaceNumber}=="00"
	ATTRS{interface}=="Smartreader2 plus"

  looking at parent device '/devices/platform/ehci-brcm.1/usb2/2-1/2-1.1':
	KERNELS=="2-1.1"
	SUBSYSTEMS=="usb"
	DRIVERS=="usb"
	ATTRS{bDeviceSubClass}=="00"
	ATTRS{bDeviceProtocol}=="00"
	ATTRS{devpath}=="1.1"
	ATTRS{idVendor}=="0403"
	ATTRS{speed}=="12"
	ATTRS{bNumInterfaces}==" 1"
	ATTRS{bConfigurationValue}=="1"
	ATTRS{bMaxPacketSize0}=="64"
	ATTRS{busnum}=="2"
	ATTRS{devnum}=="3"
	ATTRS{configuration}==""
	ATTRS{bMaxPower}=="100mA"
	ATTRS{authorized}=="1"
	ATTRS{bmAttributes}=="a0"
	ATTRS{bNumConfigurations}=="1"
	ATTRS{maxchild}=="0"
	ATTRS{bcdDevice}=="0500"
	ATTRS{avoid_reset_quirk}=="0"
	ATTRS{quirks}=="0x0"
	ATTRS{serial}=="RKABD247"
	ATTRS{version}==" 2.00"
	ATTRS{urbnum}=="98666"
	ATTRS{ltm_capable}=="no"
	ATTRS{manufacturer}=="Argolis BV"
	ATTRS{removable}=="unknown"
	ATTRS{idProduct}=="6001"
	ATTRS{bDeviceClass}=="00"
	ATTRS{product}=="Smartreader2 plus"


and with that output i can generate the 52-smargo.rules which looks then as following;

## Smargo Smartreader+ rules
SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", ATTRS{idProduct}=="6001", ATTRS{serial}=="RKABD247", SYMLINK+="SmargoV2", MODE="660"

that's very easy and works perfectly but if i can make the same with mdev then that's better because pli use out of the box mdev

and you wrote the following;

I'd expect udev to conflict horribly with the pre-installed mdev which is already managing hardware devices. I'm surprised your box actually still boots after installing it.

so i'am now unsure to use udev in pli and i would much rather to use mdev for that.

 

 

regards

Biki3


Receiver: VU Ultimo 4K, Octagon SF8008 4K, Gigablue Quad 4K

Image: OpenPLI-8.3


Re: [ET 9000] and udev didn't start automatically ! #11 MiLo

  • PLi® Core member
  • 14,048 posts

+298
Excellent

Posted 16 March 2014 - 18:26

http://git.busybox.n...n/docs/mdev.txt

 

If you plug in the board, mdev will match the device in /etc/mdev.conf. By default it will only create the "ttyUSB0" nodes.

 

There's a line "tty.*" which matches any tty device. Add a line above that, ttyUSB[0-9] that will match sooner than the generic case.

 

you can call a script from there, by adding a "*" entry, start by creating a hello world style script that just writes interesting things to a file in /tmp/ (because you won't see your script's output).

 

Look at /etc/mdev/ for an example script.


Real musicians never die - they just decompose

Re: [ET 9000] and udev didn't start automatically ! #12 Pike_Bishop

  • Senior Member
  • 1,138 posts

+74
Good

Posted 16 March 2014 - 18:35

Hi MiLo,

 

thanks a lot :)  i think that helps me.

 

regards

Biki3


Receiver: VU Ultimo 4K, Octagon SF8008 4K, Gigablue Quad 4K

Image: OpenPLI-8.3


Re: [ET 9000] and udev didn't start automatically ! #13 Pizdaria

  • Member
  • 8 posts

0
Neutral

Posted 24 March 2014 - 21:43

Hi,

I too have the same problem when you restart the box et9x00 image openPli 4.0
 

connected an Arduino installing DRIVERS = "ftdi_sio" and the device is identified as ttyUSB0.
Who can help me to create a rule so that there are no problems when you reboot the box ?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users