Well, I would try this:
- Open a shell (bash, sh, ksh) and type:
set -e (enables errorhandling)
- Insert Your BT- device
You should get a number larger than 0, which is an errorcode. Depending on which shell you use, there might be set some environment variables:
- ERL=Linenumber if trap was detected in a script.
- $?=0 then there is no errorcode, and U dont need to read further.
Write a script, or test by hand:
trap 'ERR=$?;errorhandler' listofcodes
errorhandler is the script that decides what todo when any of the listofcodes occur.
The list could be 1 10 14 15 (17 18 ...) or just 1 number, the one you want to catch.
# script errorhandler
case $ERR in
# here U can take action or perhaps just ignore
# action if errorcode was different from 1
You would place line 1-4 in
/etc/profile or similar to make it systemwide.
/etc there should be an
init.d containg start and stop scripts related to boot and change in runstate. There should be a scriptfile for your BT device, check it out, but don't change content unless ...
If the errorcode in line 2 is zero then you must dig deeper.