WiFi on Macbook Air 5-2 (13", 2012) not working

119 risposte [Ultimo contenuto]
matt
Offline
Iscritto: 06/24/2013

Wohoo! You did it :D

It's working now. I can connect the TL-WN772N adapter anytime I want and connect to the world wide web.

The throughput is not optimal but I really don't care about that right now.

Thank you very much for your help @mYself!

In case Triquel updates the kernel sometimes later (but to a version < 3.5) will it downgrade my installation so that I'd have to install this again?

lembas
Offline
Iscritto: 05/13/2010

Congrats!

>In case Triquel updates the kernel sometimes later (but to a version < 3.5) will it downgrade my installation so that I'd have to install this again?

I believe the kernel with the largest version number is the default choice, so no.

matt
Offline
Iscritto: 06/24/2013

That's good. Thanks!

mYself
Offline
Iscritto: 01/18/2012

The requirements for making your computer able to connect into your wireless network are the following:

  • you need to download and put the htc_7010.fw (optional but recommended, since future devices might require it) and htc_9271.fw firmware files into the /lib/firmware folder. Make sure you're download them from a trusted source (only those after the firmware source code was released, because we cannot know what those previous binary files are really doing, besides allowing you to connect into your wireless network), like jxself's site, or from my driver package. You can also download and compile it yourself, using the instructions found on the open-ath9k-htc-firmware GitHub page (the build-fw.sh script contained within my self-created ath9k_htc driver package needs to be updated, since the recent changes in the building system caused that it is no longer functional, and so don't use it until I release an update).
  • you need to install a 3.5 or later Linux-based kernel in order to make the adapter operable (no idea what is precisely causing the issue, probably some bug or unimplemented feature). To make the kernel always up-to-date, you also need to install the linux-image-generic-lts-belenos package after you get the wireless working.
matt
Offline
Iscritto: 06/24/2013

Thank you for this guide. I'll copy this directly into my "Setup Trisquel.odt". :P

Why do I need the htc_9271.fw firmware, though? I did not have it installed but got Wi-Fi working by upgrading the kernel.

mYself
Offline
Iscritto: 01/18/2012

Not installed? The ath9k_htc_linux_driver package install script copied both the htc_7010.fw and htc_9271.fw firmware files after the execution into the /lib/firmware folder, so are you sure?? The output of the ls /lib/firmware also showed that both of the files were in-place.

The README file on the open-ath9k-htc-firmware GitHub page describes what are those AR7010/AR9271 NICs. The system needs the driver, which in turn requires the firmware for the respective chip in order to be able to communicate with it and make the device operational.

The reason to keep them both installed is to be able to use all of the ath9k_htc compatible wireless adapters, which are using different chipsets (a combination of one or two different chips), typically in a three different configurations:

  • Atheros AR9271 alone
  • Atheros AR7010+AR9280
  • Atheros AR7010+AR9287
matt
Offline
Iscritto: 06/24/2013

You were right, I need the ath9k driver package.

I did something wrong during the first fresh re-install. I first updated to the new kernel, and then I tried to run your install.sh script. This failed with some error because a file was not available. (I forgot to write it down...)

In an overreaction I did not manually copy the files to the /lib/fw directory but re-installed the Trisquel again.

This time I first copied the firmware files and then updated the kernel. I did not run the install.sh script. Everything worked fine and I restarted the computer.

- Now, I pull the latest Trisquel updates and restart the computer again.
- After that I ran 'sudo apt-get install linux-image-generic-lts-belenos' which executed without trouble.
- After that I ran 'sudo apt-get remove linux-image-generic linux-image-3.2*' which prompted me again to free *445 MB*. This time I halted the command.

Here's a screenshot: http://cl.ly/image/1i2i2e1n2s0k

It's German and says that the mentioned packages will be removed:
linux-image-3.2.0-38-generic
linux-image-3.2.0-48-generic
linux-image-3.5.0-34 generic
linux-image-generic
linux-image-generic-lts-belenos

linux-image-3.5.0-34 is my currently used kernel, so that's the problem.

(Good night, I'll be back tomorrow)

mYself
Offline
Iscritto: 01/18/2012

I have now found the source of the problem. Since both of my laptop computers have some hardware issues that doesn't allow me to properly test every command I'm posting here, its mainly done from my memory, and mistakes can happen. The key to solve the problem is just in the removal of the last "star" character from the command, so it should be

sudo apt-get remove linux-image-generic linux-image-3.2

and not

sudo apt-get remove linux-image-generic linux-image-3.2*

I also noticed that you installed the linux-image-3.2.0-48-generic package, but because you need a newer kernel series, it's just a waste of bandwidth and time to do so. Everything you need to do if you want to have a working network connection is summarized in my previous post.

EDIT: I noticed on your screen-shot, that you're using a name@operating_system alias. Just to make it clear (if you doesn't already know), the operating system is called GNU (a composition of various software packages, many of them under the GNU branch), while one of the kernels (besides k*BSD, Hurd, kDarwin, kMINIX, and many more), that this system can utilize, and require to be fully operational/complete, is called Linux (a package of various drivers, firmwares, and everything that is required for the operating system to be able to communicate with your hardware). This is a common mistake people make, because they doesn't know the history, and reason why this system was developed. One of the other popular operating system, currently developed by Google, and widely used in the mobile phone sphere, is called Android, and also makes use of the Linux-kernel, to be able to communicate with the internal hardware.

matt
Offline
Iscritto: 06/24/2013

Yep, that one character made all the difference. :)

This time I was prompted that 144 MB would be freed. Still more than I had expected (I mean, this is X times the download size of the new kernel), but this time everything worked out fine.

-- the operating system is called GNU
Yes, I was academically aware of that. I named it linux in the way that the colloquial language has adopted to call any operating system with a linux kernel. But I will make sure to endorse the words GNU operating system in the future! :-)

mYself
Offline
Iscritto: 01/18/2012

144MB is correct. I tested the command this time properly within a virtual machine, and I was prompted with a removal of three packages (linux-image-3.2.0-38 linux-image-3.2.0-48, and linux-image-generic), in a total of 144MB. Since the Linux-Libre kernel is a big package, even bigger when it's installed/decompressed, and much bigger if there are two of them .

mYself
Offline
Iscritto: 01/18/2012

I'm glad that it worked, but were not finished now. Both of the kernels I proposed you to install comes from the official Trisquel repositories. Now that you have got a working wireless connection, open up a new Terminal window, then type:

sudo apt-get install linux-image-generic-lts-belenos
sudo apt-get remove linux-image-generic linux-image-3.2*

The first command installs a meta-package for the 3.5 kernel series, that will ensure the installation of future kernel updates. The second one removes this functionality for the older 3.2 kernel series, and also the kernel itself, since you doesn't require it anymore, and because of the non-functional network connection, it is useless anyway.

matt
Offline
Iscritto: 06/24/2013

When I apply the second command I am informed by the terminal that 445 MB of diskspace will be freed.

Isn't that a bit much? I just want to re-check and make sure that the second command is right.

mYself
Offline
Iscritto: 01/18/2012

Post here some screenshot/output.

matt
Offline
Iscritto: 06/24/2013

Too late, I was impatient and continued. Now the GRUB doesn't show any linux kernel anymore. Only my OSX installation. :/

mYself
Offline
Iscritto: 01/18/2012

Sh**. Wait a little, and don't do anything...

matt
Offline
Iscritto: 06/24/2013

It's fine. I can do a radical makeover (tomorrow, it's late already) and install again from scratch. All my important data is on a shared partition anyway.

This time I'll follow straight your instructions from this comment: https://trisquel.info/de/forum/wifi-macbook-air-5-2-13-2012-not-working?page=1#comment-38704

mYself
Offline
Iscritto: 01/18/2012

I can guide you to recover your system if you want, but it is too complex. What happened?

matt
Offline
Iscritto: 06/24/2013

No need, I will do a reinstall then tomorrow. And then only apply the first of the two commands, right?

What happened?
No much really. There weren't really any error messages. But lots of stuff got 'removed'.
The last two lines said something like "you may have to update grub.cfg".

mYself
Offline
Iscritto: 01/18/2012

I actually tested those commands before posting them, and they just worked fine. It looks that the GRUB configuration was not refreshed after the older kernels was removed from the system. In the future, you can use the following command after fiddling with your Linux kernel:

sudo update-grub

If you want, I can post here the instructions on how to chroot into your system using your Trisquel formatted USB key. It's just a matter of some commands...