View previous topic :: View next topic |
Author |
Message |
kernelhacker n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 18 Feb 2004 Posts: 27
|
Posted: Mon Aug 25, 2008 9:17 pm Post subject: "/etc/init.d/bluetooth stop" gets called on /dev/r |
|
|
Hi there!
I've got a little problem with bluetooth:
/etc/init.d/bluetooth starts without any problem, hcid gets started, /dev/rfcomm0 seems to be OK. But when writing something to /dev/rfcomm0 the bluetooth init script gets called with the stop parameter.
How can that be and how can i find out, who calls the init script? My workaround atm is simply calling hcid from the console, but a working init script would be nice!
Any help is appreciated!
Thx,
Stefan _________________ signature temporarily disabled |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
kernelhacker n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 18 Feb 2004 Posts: 27
|
Posted: Tue Aug 26, 2008 9:55 am Post subject: Re: "/etc/init.d/bluetooth stop" gets called on /d |
|
|
kernelhacker wrote: | Hi there!
I've got a little problem with bluetooth:
/etc/init.d/bluetooth starts without any problem, hcid gets started, /dev/rfcomm0 seems to be OK. But when writing something to /dev/rfcomm0 the bluetooth init script gets called with the stop parameter.
How can that be and how can i find out, who calls the init script? My workaround atm is simply calling hcid from the console, but a working init script would be nice!
Any help is appreciated!
Thx,
Stefan |
I found out that udev seems to shut down the bluetooth services:
Code: |
Aug 26 11:42:17 turbomobil udevd[1619]: msg_queue_insert: seq 2859 queued, 'add' 'bluetooth'
Aug 26 11:42:17 turbomobil udevd[1619]: udev_event_run: seq 2859 forked, pid [4354], 'add' 'bluetooth', 0 seconds old
Aug 26 11:42:17 turbomobil udevd-event[4354]: wait_for_file: file '/sys/devices/pci0000:00/0000:00:1a.0/usb3/3-2/3-2:1.0/hci0/hci0:41/bus' appeared after 0 loops
Aug 26 11:42:17 turbomobil udevd-event[4354]: run_program: 'bluetooth.sh'
Aug 26 11:42:17 turbomobil hcid[3383]: Unregister path: /org/bluez/hci0
Aug 26 11:42:17 turbomobil hcid[3383]: Cleanup plugins
Aug 26 11:42:17 turbomobil hcid[3383]: /usr/lib64/bluetooth/plugins/input.so
Aug 26 11:42:17 turbomobil hcid[3383]: Unregistered manager path
Aug 26 11:42:17 turbomobil hcid[3383]: /usr/lib64/bluetooth/plugins/serial.so
Aug 26 11:42:17 turbomobil hcid[3383]: /usr/lib64/bluetooth/plugins/audio.so
Aug 26 11:42:17 turbomobil hcid[3383]: Removing record with handle 0x10000
Aug 26 11:42:17 turbomobil hcid[3383]: Service classes 0x18
Aug 26 11:42:17 turbomobil hcid[3383]: Removing record with handle 0x10001
Aug 26 11:42:17 turbomobil hcid[3383]: Service classes 0x18
Aug 26 11:42:17 turbomobil hcid[3383]: Unregistered manager path
Aug 26 11:42:17 turbomobil hcid[3383]: /usr/lib64/bluetooth/plugins/network.so
Aug 26 11:42:17 turbomobil udevd[1619]: msg_queue_insert: seq 2860 queued, 'remove' 'net'
Aug 26 11:42:17 turbomobil udevd[1619]: udev_event_run: seq 2860 forked, pid [4369], 'remove' 'net', 0 seconds old
Aug 26 11:42:17 turbomobil udevd-event[4369]: pass_env_to_socket: passed 139 bytes to socket '/org/freedesktop/hal/udev_event',
Aug 26 11:42:17 turbomobil udevd-event[4369]: run_program: 'net.sh pan0 stop'
Aug 26 11:42:17 turbomobil udevd-event[4369]: run_program: '/lib64/udev/net.sh' returned with status 1
Aug 26 11:42:17 turbomobil udevd-event[4369]: pass_env_to_socket: passed -1 bytes to socket '@/org/kernel/udev/monitor',
Aug 26 11:42:17 turbomobil udevd-event[4369]: udev_event_run: seq 2860 finished with -1
Aug 26 11:42:17 turbomobil udevd[1619]: udev_done: seq 2860, pid [4369] exit with 1, 0 seconds old
Aug 26 11:42:17 turbomobil hcid[3383]: bridge pan0 removed
Aug 26 11:42:17 turbomobil hcid[3383]: Unregistered manager path
Aug 26 11:42:17 turbomobil hcid[3383]: Stopping SDP server
Aug 26 11:42:17 turbomobil hcid[3383]: Releasing agent :1.12, /org/kde/kbluetooth_1234
Aug 26 11:42:17 turbomobil hcid[3383]: Releasing authorization agent :1.12, /org/kde/kbluetooth_auth_1234
Aug 26 11:42:17 turbomobil hcid[3383]: release_services
Aug 26 11:42:17 turbomobil hcid[3383]: Unregistering service object: /org/bluez/service_input
Aug 26 11:42:17 turbomobil hcid[3383]: Unregistering service object: /org/bluez/service_serial
Aug 26 11:42:17 turbomobil hcid[3383]: Unregistering service object: /org/bluez/service_headset
Aug 26 11:42:17 turbomobil hcid[3383]: Unregistering service object: /org/bluez/service_sink
Aug 26 11:42:17 turbomobil hcid[3383]: Unregistering service object: /org/bluez/service_audio
Aug 26 11:42:17 turbomobil hcid[3383]: Unregistering service object: /org/bluez/service_network
Aug 26 11:42:17 turbomobil hcid[3383]: Exit
|
Is there anybody who can give me some hints where to seek for the reasons for this?
Thanks,
Stefan _________________ signature temporarily disabled |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
kernelhacker n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 18 Feb 2004 Posts: 27
|
Posted: Mon Sep 15, 2008 9:38 pm Post subject: Re: "/etc/init.d/bluetooth stop" gets called on /d |
|
|
Bump - nobody with an idea? _________________ signature temporarily disabled |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
jamapii l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
![](images/avatars/170100631249065103292e6.jpg)
Joined: 16 Sep 2004 Posts: 637
|
Posted: Mon Sep 15, 2008 11:03 pm Post subject: Re: "/etc/init.d/bluetooth stop" gets called on /d |
|
|
It looks like the trouble starts here, triggered by bluetooth.sh
kernelhacker wrote: |
Code: |
Aug 26 11:42:17 turbomobil udevd-event[4354]: run_program: 'bluetooth.sh'
Aug 26 11:42:17 turbomobil hcid[3383]: Unregister path: /org/bluez/hci0
|
|
I looked for the file, found one in /lib/udev, and it contains
if [ ! -d $sysfs/class/bluetooth/hci[0-9]* ]; then
this can cause problems, if it doesn't find what it expects.
Put some "logger" commands in the script to determine what really happens. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
kernelhacker n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 18 Feb 2004 Posts: 27
|
Posted: Tue Sep 16, 2008 8:46 am Post subject: Re: "/etc/init.d/bluetooth stop" gets called on /d |
|
|
jamapii wrote: | It looks like the trouble starts here, triggered by bluetooth.sh
kernelhacker wrote: |
Code: |
Aug 26 11:42:17 turbomobil udevd-event[4354]: run_program: 'bluetooth.sh'
Aug 26 11:42:17 turbomobil hcid[3383]: Unregister path: /org/bluez/hci0
|
|
I looked for the file, found one in /lib/udev, and it contains
if [ ! -d $sysfs/class/bluetooth/hci[0-9]* ]; then
this can cause problems, if it doesn't find what it expects.
Put some "logger" commands in the script to determine what really happens. |
Sorry, I forgot to mention, that i found out some new facts:
bluetooth.sh get's started by "etc/udev/rules.d/70-bluetooth.rules":
Code: |
# Start/Stop bluetooth service on device insertion. Gentoo specific.
SUBSYSTEM=="bluetooth", KERNEL=="hci[0-9]*"
#, RUN+="bluetooth.sh"
# So that normal users can dial out.
SUBSYSTEM=="tty", SUBSYSTEMS=="bluetooth", GROUP="uucp"
|
As you can see put the RUN option on comment. The script get's called every time some hci[0-9] device is inserted. The first one (/sys/class/bluetooth/hci0) is the bluetooth dongle itself and the second one seems to be the connected bluetooth device (/sys/class/bluetooth/hci0/hci0:42). As bluetooth.sh simply switches the /etc/init.d/bluetooth init script on/off, bluetooth is turned off as i try to connect to a device, in my case my telephone, which i need to connect to the internet.
I guess the rulesfile needs to be changed, but i'm not sure if something like
Code: |
SUBSYSTEM=="bluetooth", KERNEL=="hci[0-9]/*", RUN+="bluetooth.sh" ^
|
would work. Should i file a bug report or is it just me, who is blind or an idiot and everything is fine here?
thx,
Stefan _________________ signature temporarily disabled |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
jamapii l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
![](images/avatars/170100631249065103292e6.jpg)
Joined: 16 Sep 2004 Posts: 637
|
Posted: Tue Sep 16, 2008 9:15 pm Post subject: |
|
|
My bluetooth.rules is
Code: | # Bluetooth devices:
#
KERNEL=="hci[0-9]*", RUN+="/lib/udev/bluetooth.sh"
|
Activating the RUN looks like a good idea, but there's still the question why the hci[0-9]*/ directory isn't found at least once while the script runs. Maybe $sysfs isn't found, or the directory goes away. The absence of this directory seems to be what leads to the stop command. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|