02-01-2012 02:43 PM - edited 02-01-2012 02:44 PM
Hello everyone,
does anyone know what the Lenovo Hotkey tool on Windows is doing technically behind the scenes to enable Bluetooth and the WWAN card?
Does it connect on serial COM4 to the WWAN card and enter some AT commands to enable it? I hope it is not some kind of secret sauce and Lenovo can share with us the details.
This notebook has no hardware switches to enable those devices, which means it has to be done somehow in software.
Unfortunately I want to run only Ubuntu Linux on this nice device. When I activate BT and WWAN on Windows 7, they stay enabled for 1 reboot on Ubuntu. After a second reboot, they are disabled and cannot be enabled via software on Linux. I have to boot Windows and launch the Hotkeys utility again.
After all what I have been through with this notebook regarding the wireless lan card [1], it would be nice to finally enjoy just working with it ;-)
I'm grateful for any hints.
Best regards,
Jochen
1) Broadcom BCM43224 - unstable latency: sudo iwconfig eth1 power off / http://ubuntuforums.org/showthread.php?t=1608989
Solved! Go to Solution.
02-27-2012 12:13 AM
Hi,
Please refer the below details
Lenovo Hotkey tool on Windows -------- Technical information
The command line control for Wireless switching hot key (Fn+F5) feature. It is available to control the wireless radio using the following command; C:\Program Files\Lenovo\HOTKEY\TpFnF5.exe [PARAMETER]
The following parameters are defined;
/WLON, /WLOFF Turn on/off internal 802.11.
/BTON, /BTOFF Turn on/off internal bluetooth.
/WANON, /WANOFF Turn on/off internal WAN.
/UWBON, /UWBOFF Turn on/off internal UWB.
/ALLON, /ALLOFF Turn on/off any radio at once.
Turning on the WWAN card :
Turning the card onFirst, check whenever the SIM is protected by PIN by sendin g
AT+CPIN?
to /dev/ttyACM1. You can do it with any terminal terminal program like cu or minicom. If the answer is
+CPIN: READY
then the SIM is unlocked. If the answer is
+CPIN: SIM PIN
you need first to unlock it by sending
AT+CPIN="YOUR-PIN"
to /dev/ttyACM1. Now the card can be turned on by sending
AT+CFUN=1
to /dev/ttyACM1. The answer should be
+PACSP0
Don't try to do anything until you see it. To force GSM-only connection, send
AT+CFUN=5
to /dev/ttyACM1. To force WCDMA-only connection, send
AT+CFUN=6
to /dev/ttyACM1.
Turning the card onFirst, check whenever the SIM is protected by PIN by sending
AT+CPIN?
to /dev/ttyACM1. You can do it with any terminal terminal program like cu or minicom. If the answer is
+CPIN: READY
then the SIM is unlocked. If the answer is
+CPIN: SIM PIN
you need first to unlock it by sending
AT+CPIN="YOUR-PIN"
to /dev/ttyACM1. Now the card can be turned on by sending
AT+CFUN=1
to /dev/ttyACM1. The answer should be
+PACSP0
Don't try to do anything until you see it. To force GSM-only connection, send
AT+CFUN=5
to /dev/ttyACM1. To force WCDMA-only connection, send
AT+CFUN=6
to /dev/ttyACM1.
Turning on the Bluetooth :
One can enable Bluetooth by pressing FnF5.
If this doesn't work, you can load the thinkpad-acpi kernel module and run the following command with root privileges:
# echo "enable" > /proc/acpi/ibm/bluetooth
When Bluetooth is enabled, the Bluetooth-logo LED will light up
Toggling the Bluetooth device on/off is very easy on Lenovo Thinkpads
The following commands active and deactivate bluetooth.
$echo "enable" > /proc/acpi/ibm/bluetooth
$echo "disable" > /proc/acpi/ibm/bluetooth
This works for both Fedora and Ubuntu.
I hope this helps
Best Regards
Rakesh
03-03-2012 07:46 AM - edited 03-03-2012 07:48 AM
Hello Rakesh,
at first I would like to thank you for taking time to help me out with this. Here are the results of my tests:
The kernel module thinkpad_acpi was already loaded and I have tried all tests also with the experimental=1 parameter as well.
root@disorder:/proc/acpi/ibm# rfkill list 0: tpacpi_bluetooth_sw: Bluetooth Soft blocked: yes Hard blocked: yes 1: tpacpi_wwan_sw: Wireless WAN Soft blocked: yes Hard blocked: yes 2: brcmwl-0: Wireless LAN Soft blocked: no Hard blocked: no
Pressing Fn+F5 only changes the "Soft blocked" state of Bluetooth, but not the "Hard blocked" state. It also doesn't
change neither the soft nor the hard blocked state of the WWAN card.
root@disorder:/proc/acpi/ibm# rfkill list 0: tpacpi_bluetooth_sw: Bluetooth Soft blocked: no Hard blocked: yes 1: tpacpi_wwan_sw: Wireless WAN Soft blocked: yes Hard blocked: yes 2: brcmwl-0: Wireless LAN Soft blocked: no Hard blocked: no
Trying to enable the hardware via the proc filesystem doesn't work either.
root@disorder:/proc/acpi/ibm# echo "enable" > /proc/acpi/ibm/bluetooth root@disorder:/proc/acpi/ibm# cat /proc/acpi/ibm/bluetooth status: disabled commands: enable, disable root@disorder:/proc/acpi/ibm# echo "enable" > /proc/acpi/ibm/wan root@disorder:/proc/acpi/ibm# cat wan status: disabled commands: enable, disable
"rfkill unblock all" changes the soft blocking state of bluetooth and WWAN, but not the hard state.
root@disorder:/proc/acpi/ibm# rfkill list 0: tpacpi_bluetooth_sw: Bluetooth Soft blocked: no Hard blocked: yes 1: tpacpi_wwan_sw: Wireless WAN Soft blocked: no Hard blocked: yes 2: brcmwl-0: Wireless LAN Soft blocked: no Hard blocked: no
Here are the tests I did regarding the WWAN card (PIN was changed in output):
minicom -D /dev/ttyACM1 AT+CPIN? +CPIN: SIM PIN OK AT+CPIN="1234" OK AT+CFUN=1 ERROR AT+CFUN? +CFUN: 4 OK AT+CFUN=1 ERROR AT+CFUN=? +CFUN: (0,1,4-6),(0,1) OK
I can't set the CFUN state to 1 somehow. I'm sure this isn't a hardware issue and the SIM card is also fine,
because everything works under Windows 7. I've paired the x121e and a mobile phone via Bluetooth and was on
the Internet with the WWAN card. When I connected with Putty on the serial port of the WWAN card, I could
see that CFUN was set to 1 under Windows.
I'm sure there is something else the Hotkey Utility is doing on Windows, which we are missing here.
Thanks again for trying to help me out.
Best regards,
Jochen
03-16-2012 06:51 AM - edited 03-16-2012 06:53 AM
I was finally able to fix the issue with the following two links:
1) https://bbs.archlinux.org/viewtopic.php?pid=1070997#p1070997
2) https://help.ubuntu.com/community/UEFIBooting#Non-Mac_x86_64_UEFI_systems
Since I was already running bios 1.15, I only had to reset the BIOS to it's default settings. After doing that, my boot loader was gone and I had a "Operating system not found" message on the screen.
I have restored the bootloader with the Ubuntu Oneiric x64 alternate installer, the rescue system menu option and the following commands:
mount /boot
mount /boot/efi
grub-probe --target=device /boot/efi/EFI/ubuntu/grubx64.efi
-> Command returned "/dev/sda1"
efibootmgr --create --gpt --disk /dev/sda --part 1 --write-signature --label "GRUB2" --loader '\EFI\ubuntu\grubx64.efi'
The disk device and the partition number can vary, depending on the hardware and the partitioning scheme.
Now I'm able to active Bluetooth and the WWAN card. They are also now listed as hardware unblocked in rfkill.
Time to bug Broadcom to fix the latency issues in their Linux driver ;-)
03-06-2013 10:01 AM
Perfect explanation and doc. It also works for Lenovo ThinkPad E120 Ubuntu 12.04 LTS:
# echo "enable" > /proc/acpi/ibm/bluetooth.
Thanks.
12-19-2013 04:30 AM
Are there any better news about it? Is it known by now - what exactly prevents Linux from enabling and disabling BT/WWAN, without that strange game with BIOS defaults? Thank you