Bluetooth, wireless switch

Bug #119130 reported by Ante Karamatić
2
Affects Status Importance Assigned to Milestone
acpi-support (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: acpi-support

When I press Fn+F8 on my Toshiba U200, bluetooth gets enabled. So far, so good. Another Fn+F8 gets bluetooth disabled, but it also disables wireless card. This is anoying, cause once I enable bluetooth, I can't disable it again without disabling wireless connection. This laptop has two switches - hardware switch for wireless and keyboard (software switch) for bluetooth (and/or wireless).

Looking at /etc/acpi/tosh-wireless.sh, I see:

toggleAllWirelessStates;

which could be done better. Doing it like this disables wifi if it is working or enables it if it isn't working. After that, we have:

if isAnyWirelessPoweredOn; then
        toshset -bluetooth on
else
        toshset -bluetooth off
fi

this makes impossible to have enabled wireless and disabled bluetooth. For this type of laptop, having only this in /etc/acpi/thosh-wireless.sh:

#!/bin/bash

if `toshset -bluetooth | grep -q off`; then
        toshset -bluetooth on
else
        toshset -bluetooth off
fi

would save the day. But, since some toshiba laptops don't have hardware switch for wifi, this would be better:

#!/bin/bash

. /usr/share/acpi-support/state-funcs

if isAnyWirelessPoweredOn; then
        if `toshset -bluetooth | grep -q attached`; then
                toshset -bluetooth off
                toggleAllWirelessStates
        else
                toshset -bluetooth on
        fi
else
        toggleAllWirelessStates
fi

This way, we would have 3 options: wifi only, wifi and bluetooth and none.

Revision history for this message
Ante Karamatić (ivoks) wrote :

BTW, there isn't toggleWirelessStates function in /usr/share/acpi-support/state-funcs, which is called in /etc/acpi/wireless.sh. There is toggleAllWirelessStates :)

And yes, this bug is valid for Feisty and Gutsy.

Andrew Fenn (andrewfenn)
Changed in acpi-support:
status: Unconfirmed → Confirmed
Matthew Garrett (mjg59)
Changed in acpi-support:
status: Confirmed → Fix Committed
Revision history for this message
Ante Karamatić (ivoks) wrote :

Fixed in Gutsy. Thanks.

Changed in acpi-support:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.