Results 1 to 1 of 1
Hi,
Recently I purchased myself a bluetooth mouse. Installing it was so easy, it took less than a minute. But it's causing problems I had not expected.
Because of the ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 09-26-2007 #1
A question on kernel messages and devices
Hi,
Recently I purchased myself a bluetooth mouse. Installing it was so easy, it took less than a minute. But it's causing problems I had not expected.
Because of the kernels ability to handle bluetooth connections, and because of the HUGE amount of output a mouse provides, the command <dmesg> now only shows mouse output. It's making debugging my system neigh impossible.
I wrote this script to activate my bluetooth mouse upon booth:
It works like a charm, but I need a way to keep the mouse output from cluttering the output of dmesg. Any thoughts?Code:Freston:$ cat /etc/rc.d/rc.bluetoothmouse #!/bin/bash # Bluetoothmouse # Attempt to enable Bluetooth mouse upon boot # Boot with USB-Bluetooth inserted # Defining variables STICK=`lsusb | grep -c Broadcom` MOUSE_ADDRESS=12:12:12:12:12:12 # Functions startscript () { if [ $STICK -gt 0 ] ; then hciconfig hci0 up ; echo 'Bluetooth adaptor up' echo 'Attempting to connect Bluetooth device... waiting' hidd --connect $MOUSE_ADDRESS CONNECTION_STATUS=`hidd --show | grep -c $MOUSE_ADDRESS` if [ $CONNECTION_STATUS -gt 0 ] ; then echo 'Mouse is up' exit 0 else echo 'Connection failed, mouse not found' exit 1 fi else echo 'Bluetooth adaptor not present' exit 0 fi } stopscript () { hidd --killall } # Actual work being done if [ ! $1 ] ; then # assume user sanity, restart stopscript startscript elif [ $1 = 'start' ] ; then startscript elif [ $1 = 'restart' ] ; then stopscript startscript elif [ $1 = 'stop' ] ; then stopscript else echo "$1 is not a valid option, you can install $1 by running <vim $0> from the shell." exit 1 fiCan't tell an OS by it's GUI


Reply With Quote
