Showing posts with label wifi. Show all posts
Showing posts with label wifi. Show all posts

2017/04/24

Lenovo Yoga 2 11" - Fixing Wifi and Bluetooth under Ubuntu 16.04.2

The Lenovo Yoga 2 11" convertible laptop has a compelling form factor and gives a solid impression. Unfortunately it's not a Linux-friendly laptop as far as wireless is concerned. Under Ubuntu 16.04.2 with a very recent 4.8 kernel, the wifi and bluetooth are not working. To add insult to injury, Lenovo has hardcoded the Broadcom wifi and bluetooth card in the UEFI bootloader, so the laptop refuses tot boot with any replacement wifi card I tested.

This post details how I managed to get the Broadcom wifi and bluetooth up and running under Ubuntu 16.04.2. Actually, I'm running KDE Neon which is built on 16.04, but the solution should be the same. I used a simple USB3 ethernet dongle for providing initial wired internet connectivity.

wifi

the following card is installed in my device:
$ lspci -nn | grep -i broad
01:00.0 Network controller [0280]: Broadcom Corporation
BCM43142 802.11b/g/n [14e4:4365] (rev 01)
steps to support the wifi card:
  • deactivate secure boot in the UEFI settings
  • install the following packages (run in a terminal)
sudo apt install bcmwl-kernel-source firmware-b43-installer
reference:  https://askubuntu.com/questions/55868/installing-broadcom-wireless-drivers

bluetooth

The bluetooth device is known in Linux as:
$ lsusb | grep Bluetooth
Bus 001 Device 006: ID 105b:e065 Foxconn International, Inc. BCM43142A0 Bluetooth module
By default, the firmware is missing due to legal concerns:
$ dmesg | grep -i blueto
[    7.060475] Bluetooth: Core ver 2.21
[    7.060503] Bluetooth: HCI device and connection manager initialized
[    7.061584] Bluetooth: HCI socket layer initialized
[    7.061593] Bluetooth: L2CAP socket layer initialized
[    7.061607] Bluetooth: SCO socket layer initialized
[    7.084378] Bluetooth: hci0: BCM: chip id 70
[    7.105106] Bluetooth: hci0: michael-Lenovo-Yoga-2-11
[    7.105112] Bluetooth: hci0: BCM (001.001.011) build 0000
[    7.110415] bluetooth hci0: Direct firmware load for brcm/BCM.hcd failed with error -2
[    7.110423] Bluetooth: hci0: BCM: Patch **brcm/BCM.hcd not found**
There is a Github repository with recent Broadcom bluetooth firmware files, so you don't have manually extract and convert the relevant files from the usb driver.

Install the BCM.hcd file in a terminal:
$ sudo apt install git
$ cd
$ git clone https://github.com/winterheart/broadcom-bt-firmware.git
$ cd broadcom-bt-firmware/brcm
$ ls -l BCM43142A*
Now pick and choose the file that matches the usb device id from the lsusb command above.
$ sudo cp BCM43142A0-105b-e065.hcd /lib/firmware/brcm/BCM.hcd
Finally power off / on your pc -- askubuntu explicitly advises against a simple reboot. In my case a simple modprobe cycle was enough:
$ sudo modprobe -r btusb
$ sudo modprobe btusb
Reference with much more in depth details: https://askubuntu.com/questions/632336/bluetooth-broadcom-43142-isnt-working


2011/10/28

Fixing the RTL8191SE wifi under Ubuntu 11.10

The RTL8191SEvB wifi chipset is still not working under Ubuntu 11.10. Luckily, it's quite easy to add support for it. Please note that the procedure is slightly different from the previous 11.4 steps.
  • Download the latest Linux driver from Realtek. Choose the Linux driver for kernel 2.6.35 and above.
  • Extract all files
  • In a terminal, execute the following commands:
    sudo su
    cd
    make

    make install
    modprobe rtl8192se
  • Wifi should be working now. In order to keep the wifi working after a reboot, add one line with "rtl8192se" to the /etc/modules file.
    gksudo gedit /etc/modules

2011/06/22

Fixing the RTL8191SEvB wifi under Ubuntu 11.4

Remark: If you're running Ubuntu 11.10, please use this new procedure.

Out of the box, Ubuntu 11.4 has no support for the RTL8191SEvB chipset that ships with my Medion Akoya S5612 laptop. Luckily, the manufacturer provides drivers for Linux.

Follow the next steps:

  • First, make sure you uninstall ndiswrapper if you experimented with it (check in synaptic)
  • Download the Linux driver from http://www.wireless-driver.com/realtek-rtl8191se-rtl8192se-wireless-linux-driver-ver0019/ and untar it in your home directory.
  • In a Terminal, execute the following commands (*)
    cd ~/rtl8192se_linux_2.6.0019.1207.2010
    sudo su
    make
    make install
    modprobe r8192se_pci

  • After the modprobe, wifi should work. If everything is OK, you can persist the modprobe command by appending a line with "r8192se_pci" to /etc/modules:
    gksudo gedit /etc/modules

(*) Don't try to sudo every single command as the 'make install' will give strange compilation errors. Those errors vanish with the recommended (in this case) sudo su approach.


background:

2011/06/12

Fixing the rt2860 wifi chipset under Ubuntu 11.4

I have a Medion Akoya MD96888 that ran ubuntu just fine from day 1. Unfortunately, with the latest Ubuntu versions the wifi connection is really unstable, unreliable and very slow. This post explains how to identify the problem and how to resolve it.

Diagnosis
The following commands will identify which driver ubuntu uses for your wifi card:
nm-tool
...
- Device: wlan0 ----------------------------------------------------------------
Type: 802.11 WiFi
Driver: rt2800pci
State: disconnected
Default: no
HW Address: 00:22:43:13:7F:7B

Capabilities:

Wireless Properties
WEP Encryption: yes
WPA Encryption: yes
WPA2 Encryption: yes ...

 lsmod | grep rt2800pci
rt2800pci 18159 0
rt2800lib 43824 1 rt2800pci
rt2x00pci 13986 1 rt2800pci
rt2x00lib 39075 3 rt2800pci,rt2800lib,rt2x00pci
eeprom_93cx6 12653 1 rt2800pci

sudo lshw -C network
*-network
description: Ethernet interface
product: RTL8101E/RTL8102E PCI Express Fast Ethernet controller
vendor: Realtek Semiconductor Co., Ltd.
physical id: 0
bus info: pci@0000:01:00.0
logical name: eth0
version: 02
serial: 00:21:85:4c:75:cc
size: 100Mbit/s
capacity: 100Mbit/s
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress msix vpd bus_master cap_list rom ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full ip=192.168.1.60 latency=0 link=yes multicast=yes port=MII speed=100Mbit/s
resources: irq:42 ioport:d000(size=256) memory:ffd10000-ffd10fff memory:ffd00000-ffd0ffff memory:dfd00000-dfd0ffff
*-network
description: Wireless interface
product: RT2860
vendor: Ralink corp.
physical id: 0
bus info: pci@0000:02:00.0
logical name: wlan0
Conclusion: ubuntu uses the rt2800pci driver for accessing the RT2860 wifi chipset. This driver causes the instability.

Solution
Currently the only solution is to download the driver directly from Ralink and manually compiling and installing it. Although the command line steps are quite tedious, I did get a stable wifi back. The following steps are copied and slightly updated from http://ubuntuforums.org/showthread.php?t=1592731.

  1. Download latest RT2860 driver source code from Ralink at http://www.ralinktech.com/support.php?s=2. The driver is tagged RT2860PCI/mPCI/CB/PCIe(RT2760/RT2790/RT2860/RT2890). Put the tar into your home directory.

  2. Extract the tar file and go to the expanded directory (ignore the bz2 extensions, bunzip2 won't work):
    tar -xvf ~/2010*
    cd ~/2010*
  3. Edit the config.mk file:
    gedit ./os/linux/config.mk 
    Find the following lines (by default set to "n") and set them to be "y":
    HAS_WPA_SUPPLICANT=y
    HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=y
    Save and close the file.

  4. Back in the terminal window perform the following command
    gedit ./common/cmm_wpa.c
    For the warning message choose "Western" then "Retry".

    Use the find command to locate "MIX_CIPHER_NOTUSE". Replace the entire line with this code:
    WPA_MIX_PAIR_CIPHER FlexibleCipher = WPA_TKIPAES_WPA2_TKIPAES;
    Save and close the file.

  5. Make sure gcc is installed (usually is by default but if not install it via synaptic) then from the terminal window perform the following commands:
    sudo make
    sudo make install
    sudo ifconfig wlan0 down (on some hardware it is ra0)
    sudo rmmod rt2860sta
    sudo mv /lib/modules/$(uname -r)/kernel/drivers/staging/rt2860/rt2860sta.ko /lib/modules/$(uname -r)/kernel/drivers/staging/rt2860/rt2860sta.ko.dist
  6. Still in the terminal window perform the following commands:
    sudo depmod -a
    sudo modprobe rt2860sta
    sudo ifconfig wlan0 up (on some hardware it is ra0)
  7. Check that network manager can now select networks and connect to them.

  8. Back in the terminal window perform the following command:
    sudo cp ./os/linux/rt2860sta.ko /lib/modules/$(uname -r)/kernel/drivers/staging/rt2860/
  9. In the terminal window perform the following command:
    gksudo gedit /etc/modules
    Add "rt2860sta" on a line at the end of the file then save and close it.

  10. Reboot and check that wifi still works


2009/12/14

The Realtek 8191/8192SE under Ubuntu

I have a Realtek 8191/8192SE wifi card embedded in my Medion Akoya S5612. As usual for Realtek, this card has only support for Windows. I had to use ndiswrapper to get the card working under Ubuntu 9.10. Steps:
  • download the Realtek 8192SE driver
  • from Synaptic, install the ndisgtk package (dependencies are automatically selected)
  • now, in System / Administration / Window Wireless Drivers you can install the windows driver. Select the Win2K driver.
That's all. :-)

2008/12/19

Getting the Realtek RTL8187b WiFi stable under Ubuntu

The latest Ubuntu 8.10 with its Linux 2.6.27 kernel supports the Realtek Rtl8187b wifi chipset (USB) natively. In prior versions of Ubuntu, I had to use ndiswrapper to get the integrated WiFi going on my Medion MD96290 laptop. This is not needed anymore, so I removed the ndiswrapper call from /etc/modules.

Unfortunately, the native rtl8187 module proves very unstable with the Rtl8187B: although the connection appears fine in the menu bar, the wifi interrupts its connection or is suddenly very slow.

After some investigation I found a workaround: http://ubuntuforums.org/showthread.php?t=792092
  • gksudo gedit /etc/rc.local
  • add at the end, before the exit 0 command:
    iwconfig wlan0 rate 5.5M
Nice to have my wifi up again!