You are not logged in.

#1 2011-04-22 14:36:29

sione
Member
Registered: 2011-04-22
Posts: 4

logitech dinovo keyboard and bluetooth at startup

Hello, after months of being an indepandant archlinux user I finaly registered at the forum, I prefer searching 'til I found answers but this time I got nothing.

So, let me explain the situation ; "hidd --connect xx:xx:xx:xx:xx" works - but I need to click on the "connect" button on the keyboard before. But I want to connect to the keyboard at startup, I use an HP pavillon dv2000 laptop.


uname -a
Linux arch 2.6.38-ARCH #1 SMP PREEMPT Sun Apr 17 15:18:58 CEST 2011 x86_64 AMD Turion(tm) 64 X2 TL-62 AuthenticAMD GNU/Linux
rfkill list
0: phy0: Wireless LAN
    Soft blocked: no
    Hard blocked: no
1: hp-wifi: Wireless LAN
    Soft blocked: no
    Hard blocked: no
2: hp-bluetooth: Bluetooth
    Soft blocked: no
    Hard blocked: no
3: hci0: Bluetooth
    Soft blocked: no
    Hard blocked: no
cat /etc/rc.conf | grep DAEMONS=
DAEMONS=( ... dbus bluetooth ... )
cat /etc/rc.d/bluetooth
#!/bin/bash
#
# Start/stop the Bluetooth daemons
#

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

DAEMON_NAME="bluetoothd"
HIDD_NAME="hidd"
RFCOMM_NAME="rfcomm"
PAND_NAME="pand"
DUND_NAME="dund"

DAEMON_EXEC="/usr/sbin/bluetoothd"
HIDD_EXEC="/usr/bin/hidd"
RFCOMM_EXEC="/usr/bin/rfcomm"
PAND_EXEC="/usr/bin/pand"
DUND_EXEC="/usr/bin/dund"

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

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

HIDD_OPTIONS="--master --connect 00:07:61:75:6D:09 --server"
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" ] ; then
      stat_append " $DAEMON_NAME"
      $DAEMON_EXEC
      sleep 1
    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
    add_daemon bluetooth
    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

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

Its rare that I use forums, so if you guys need more info plz let me know... I hope to finaly make it working.

Excuse for bad english:P


===== Edit =====

I think this one can be usefull too

/etc/rc.d/bluetooth restart
:: Stopping bluetooth subsystem:    [BUSY]  pand dund rfcomm hidd  bluetoothd   [DONE] 
:: Starting bluetooth subsystem:    [BUSY]  bluetoothd hidd   [DONE] 

Last edited by sione (2011-04-22 14:50:28)

Offline

#2 2011-04-23 15:11:12

sione
Member
Registered: 2011-04-22
Posts: 4

Re: logitech dinovo keyboard and bluetooth at startup

Up !

Offline

#3 2011-04-26 14:34:16

sione
Member
Registered: 2011-04-22
Posts: 4

Re: logitech dinovo keyboard and bluetooth at startup

Can someone plz help me ?

Offline

Board footer

Powered by FluxBB