You are not logged in.

#1 2007-09-24 17:16:05

ssl6
Member
From: Ottawa, ON, CA
Registered: 2007-08-30
Posts: 594

bluetooth issue

well guys, i'm having a bit of a problem with my bluetooth mouse here on both my desktop and laptop, i have a bluetooth mouse for each. now on my desktop i wasn't having this problem frequently that i can remember until i updated yesterday. and my laptop was just setup with arch a few days ago and was updated the minute i installed it. not sure if that has anything to do with it, but thats always usefull info

now the problem, i can connect the bluetooth mice, i used pretty much the same configuration i had in ubuntu on my laptop, aside from the bluetooth configuration files being a little different between arch and ubuntu. but the mouse/mice get disconnected after sitting idle for a bit and they dont reconnect on restart. it did reconnect after a reboot on my desktop until i updated

so i don't know if its something i'm missing, but here's the bluetooth config file, if someone can shed some light that would be great

#!/bin/sh
#
# Start/stop the Bluetooth daemons
#

. /etc/rc.conf
. /etc/rc.d/functions

DAEMON_NAME="hcid"
HID2HCI_NAME="hid2hci"
SDPD_NAME="sdpd"
HIDD_NAME="hidd"
RFCOMM_NAME="rfcomm"
PAND_NAME="pand"
DUND_NAME="dund"

DAEMON_EXEC="/usr/sbin/hcid"
HID2HCI_EXEC="/usr/sbin/hid2hci"
SDPD_EXEC="/usr/sbin/sdpd"
HIDD_EXEC="/usr/bin/hidd"
RFCOMM_EXEC="/usr/bin/rfcomm"
PAND_EXEC="/usr/bin/pand"
DUND_EXEC="/usr/bin/dund"

DAEMON_ENABLE="true"
HID2HCI_ENABLE="false"
SDPD_ENABLE="false"
HIDD_ENABLE="false"
RFCOMM_ENABLE="false"
DUND_ENABLE="false"
PAND_ENABLE="false"

DAEMON_CONFIG="/etc/bluetooth/hcid.conf"
RFCOMM_CONFIG="/etc/bluetooth/rfcomm.conf"

HIDD_OPTIONS=""
DUND_OPTIONS=""
PAND_OPTIONS=""

[ -f /etc/conf.d/bluetooth ] && . /etc/conf.d/bluetooth

case "$1" in
  start)
    stat_busy "Starting bluetooth subsystem:"
    if [ "$DAEMON_ENABLE" = "true" -a -x "$DAEMON_EXEC" -a -f "$DAEMON_CONFIG" ] ; then
      stat_append " $DAEMON_NAME"
      if [ "$SDPD_ENABLE" = "true" ]; then
        $DAEMON_EXEC -f $DAEMON_CONFIG
      else
        $DAEMON_EXEC -s -f $DAEMON_CONFIG
      fi
    fi
    if [ "$HID2HCI_ENABLE" = "true" -a -x "$HID2HCI_EXEC" ] ; then
      stat_append " $HID2HCI_NAME"
      $HID2HCI_EXEC --tohci > /dev/null 2>&1 || true
    fi
    if [ "$SDPD_ENABLE" = "true" -a -x "$SDPD_EXEC" ] ; then
      stat_append " $SDPD_NAME"
      $SDPD_EXEC
    fi
    if [ "$HIDD_ENABLE" = "true" -a -x "$HIDD_EXEC" ]; then
      stat_append " $HIDD_NAME"
      $HIDD_EXEC $HIDD_OPTIONS --server
    fi
    if [ "$RFCOMM_ENABLE" = "true" -a -x "$RFCOMM_EXEC" -a -f "$RFCOMM_CONFIG" ]; then
      stat_append " $RFCOMM_NAME"
      $RFCOMM_EXEC -f $RFCOMM_CONFIG bind all
    fi
    if [ "$DUND_ENABLE" = "true" -a -x "$DUND_EXEC" -a -n "$DUND_OPTIONS" ]; then
      stat_append " $DUND_NAME"
      $DUND_EXEC $DUND_OPTIONS
    fi
    if [ "$PAND_ENABLE" = "true" -a -x "$PAND_EXEC" -a -n "$PAND_OPTIONS" ]; then
      stat_append " $PAND_NAME"
      $PAND_EXEC $PAND_OPTIONS
    fi
    stat_done
    ;;
  stop)
    stat_busy "Stopping bluetooth subsystem:"

    stat_append " $PAND_NAME"
    killall $PAND_NAME >/dev/null 2>&1

    stat_append " $DUND_NAME"
    killall $DUND_NAME >/dev/null 2>&1

    if [ -x "$RFCOMM_EXEC" ]; then
      stat_append " $RFCOMM_NAME"
      $RFCOMM_EXEC release all >/dev/null 2>&1
    fi

    stat_append " $HIDD_NAME"
    killall $HIDD_NAME >/dev/null 2>&1

    stat_append " $SDPD_NAME"
    killall $SDPD_NAME >/dev/null 2>&1

    stat_append " $DAEMON_NAME"
    killall $DAEMON_NAME >/dev/null 2>&1

    stat_done
    ;;
  restart)
    $0 stop
    sleep 1
    $0 start
    ;;
  *)
    echo "usage: $0 {start|stop|restart}"  
esac
exit 0

this is a signature

Offline

#2 2007-09-24 17:25:10

ssl6
Member
From: Ottawa, ON, CA
Registered: 2007-08-30
Posts: 594

Re: bluetooth issue

well, here's a good example, when i came back to my pc to post this, i had to manually connect my mouse with the HID command. then i left for 5 minutes to go out to my garage, now that i've come back, the mouse is disconnected again


this is a signature

Offline

#3 2007-09-24 18:05:48

TheSaint
Member
From: my computer
Registered: 2007-08-19
Posts: 1,523

Re: bluetooth issue

Same problem, but no BT mouse.
As I got bluez 3.19 no way to have something working. Latest working version was 3.12 but when the developers changed the system to dialog via d-bus then all got messy.
I suggest you to downgrade and wait for some fix.
For me I can't get the 3.12 version, any idea to go back to that version?

See my other post regarding bluetooth.

Last edited by TheSaint (2007-09-24 18:06:18)


do it good first, it will be faster than do it twice the saint wink

Offline

#4 2007-09-24 18:42:50

ssl6
Member
From: Ottawa, ON, CA
Registered: 2007-08-30
Posts: 594

Re: bluetooth issue

so im not the only one then. i might still have the old version in my pacman cache here, for 64 bit at least. i dont know if i have a 32bit laying around though


this is a signature

Offline

#5 2007-09-24 20:12:12

b100dian
Member
Registered: 2007-06-09
Posts: 19

Re: bluetooth issue

Here too - mouse was working until this last update of bluez (3.19)... I  am trying a rollback to see if this is the real problem, but I couldn't find a changelog for bluez...

Offline

#6 2007-09-24 21:22:54

ssl6
Member
From: Ottawa, ON, CA
Registered: 2007-08-30
Posts: 594

Re: bluetooth issue

so i guess we've got a bit of a trending issue here?


this is a signature

Offline

#7 2007-09-24 22:02:11

b100dian
Member
Registered: 2007-06-09
Posts: 19

Re: bluetooth issue

edited to be more clear
First, I found this thread and it seemed to me that I am not the only one with problems after the last bluez-* update.

Then, I found the solution for my problem: it was probably and xorg update! I thought to share it, either way.

I used to have only the synaptic driver as input device for the mouse, and it worked, now I had to add 2 input devices:

So my problem was solved by modifying the xorg.conf (that supposely was replaced?) ;

I  had this:

Section "InputDevice"
        Driver          "synaptics"
        Identifier      "Mouse"
        Option  "Device"        "/dev/input/mice"
        Option  "Protocol"      "auto-dev"
        Option  "LeftEdge"      "1700"
        Option  "RightEdge"     "5300"
        Option  "TopEdge"       "1700"
        Option  "BottomEdge"    "4200"
        Option  "FingerLow"     "25"
        Option  "FingerHigh"    "30"
        Option  "MaxTapTime"    "180"
        Option  "MaxTapMove"    "220"
        Option  "VertScrollDelta" "100"
        Option  "MinSpeed"      "0.06"
        Option  "MaxSpeed"      "0.12"
        Option  "AccelFactor" "0.0010"
        Option  "SHMConfig"     "on"
        #  Option       "Repeater"      "/dev/ps2mouse"
    EndSection

and it worked perfectly IIRC, and I added

InputDevice "BluetoothMouse" "SendCoreEvents"

to ServerLayout section,
and then the next section too:

Section "InputDevice"
        Driver        "mouse"
        Identifier    "BluetoothMouse"
        Option  "Protocol"    "IMPS/2"
        Option  "Device"    "/dev/input/mice"
        Option  "Buttons"    "5"
        Option  "ZAxisMapping"    "4 5"
    EndSection

This all was done after observing that #gpm -m /dev/input/mice -t imps2 worked flawlessly! (that is, my bluetooth mouse was working all this time with the bluez configuraton.

Hope it's more clear..

Last edited by b100dian (2007-09-25 18:08:19)

Offline

#8 2007-09-24 22:22:29

ssl6
Member
From: Ottawa, ON, CA
Registered: 2007-08-30
Posts: 594

Re: bluetooth issue

if i understood anything you just said, i would be quite apt to try it. i guess ill have to look at it later which might help since im at work right now

Last edited by ssl6 (2007-09-24 22:42:04)


this is a signature

Offline

#9 2007-09-25 18:17:38

b100dian
Member
Registered: 2007-06-09
Posts: 19

Re: bluetooth issue

Sorry ssl, I edited the above post.

Now back at bluetooth: I use a Logitech V270 mouse; For it to work in ArchLinux I did the following: (i don't use a PIN)
In /etc/bluetooth/hcid.conf (general configuration for input devices?) I have:

options {
        # Automatically initialize new devices
        autoinit yes;

        # Security Manager mode
        #   none - Security manager disabled
        #   auto - Use local PIN for incoming connections
        #   user - Always ask user for a PIN
        #
        security none;

        # Pairing mode
        #   none  - Pairing disabled
        #   multi - Allow pairing with already paired devices
        #   once  - Pair once and deny successive attempts
        pairing multi;

        # Default PIN code for incoming connections
        passkey "xxxx"; #seems not to be used for my mouse, after all
}

# Default settings for HCI devices
device {
        # Local device name
        #   %d - device id
        #   %h - host name
        name "BlueZ (%d)";

        # Local device class
        class 0x3e0100;

        # Default packet type
        #pkt_type DH1,DM1,HV1;

        # Inquiry and Page scan
        iscan enable; pscan enable;

        # Default link mode
        #   none   - no specific policy
        #   accept - always accept incoming connections
        #   master - become master on incoming connections,
        #            deny role switch on outgoing connections
        lm accept;
        # Default link policy
        #   none    - no specific policy
        #   rswitch - allow role switch
        #   hold    - allow hold mode
        #   sniff   - allow sniff mode
        #   park    - allow park mode
        lp rswitch,hold,sniff,park;

        discovto 0;
}

My /etc/conf.d/bluetoothp reads

# Bluetooth configuraton file

# Run hid2hci (allowed values are "true" and "false")
HID2HCI_ENABLE=true

HCID_ENABLE=true
HIDD_ENABLE=true

HIDD_ENABLED=1

because I found both HIDD_ENABLED and HIDD_ENABLE 'on the web'

And now, for the actual hidd daemon, I have in my /etc/rc.local the following:

/usr/bin/hidd --connect 00:07:61:83:53:ed --server

My Dell laptop needs a 'reset' of the Bluetooth device for this to work: either you put /usr/sbin/hciconfig hci0 reset in your rc.local, or (as I did) put this line in /etc/modprobe.conf:

options hci_usb reset=1

That is, on each module (re)load the device is reset.

I am using bluez-libs and bluez-utils 3.19; I hope a comparison of the configuration files wouldn't hurt;)

Offline

#10 2007-09-28 02:42:36

ssl6
Member
From: Ottawa, ON, CA
Registered: 2007-08-30
Posts: 594

Re: bluetooth issue

well, i never got around to having a look at it the other night or while i was on my days off. hopefully ill get a chance to look at it tonight and see if i can get it working the way it should. thanks for the info

once i get that fixed i might have to look at getting my touch pad working on my laptop and the side scroll working on my intellimouse


this is a signature

Offline

#11 2007-09-28 07:13:21

ssl6
Member
From: Ottawa, ON, CA
Registered: 2007-08-30
Posts: 594

Re: bluetooth issue

well, i just set it up on my desktop, it reconnected on reboot, i guess ill find out soon whether or not it gets disconnected from sittle idle

i guess now im just wondering if anyones managed to get any mouse with the horizontal scroll buttons to work?


this is a signature

Offline

Board footer

Powered by FluxBB