Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Using the Airport Extreme in Linux (via MOL)
View unanswered posts
View posts from last 24 hours

Goto page 1, 2, 3, 4, 5, 6  Next  
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC
View previous topic :: View next topic  
Author Message
JoseJX
Retired Dev
Retired Dev


Joined: 28 Apr 2002
Posts: 2774

PostPosted: Mon Aug 01, 2005 4:12 pm    Post subject: Using the Airport Extreme in Linux (via MOL) Reply with quote

For more details on the native AE driver's progress, please see: http://bcm43xx.berlios.de
The reverse engineering project is located at: http://linux-bcom4301.sf.net and our spec sheets are located at http://bcm-specs.sipsolutions.net

WARNING: This is still experimental!

Okay, warnings out of the way, here is a workaround so you can use your Airport Extreme in Linux.

1. Make sure you have TUN support in your kernel, if MOL networking is already working, you should be okay.
2. Install the latest ~ppc version of MOL (0.9.71_pre5) with the pci use flag set. The pci use flag enables PCI proxy support for MOL. Users running a stable profile will need to tell portage to install the ~ppc version:
Code:
# echo "app-emulation/mol ~ppc" >> /etc/portage/package.keywords

3. Download the aepatch tool and apply the patch to the driver:
WARNING: Please back up the driver before applying the patch!
Code:
# wget http://dev.gentoo.org/~josejx/aepatch
# aepatch --patch /path/to/AppleAirport2

Note, the driver is usually located in /System/Library/Extensions/AppleAirport2.kext/Contents/MacOS/AppleAirPort2
from your OSX root. If the patch fails, proceed to step 4, otherwise skip to step 5.
4. If the patch fails, you've probably got the latest Airport Extreme driver installed on OSX. Unfortunately, with this version, Apple/Broadcom have removed the code that we need to get this working, so you'll need to get an earlier version from your OSX install discs. From OSX:
Code:
# gunzip -c $MEDIA/System/Installation/Packages/Essentials.pkg/Contents/Archive.pax.gz | pax -r ./System/Library/Extensions/AppleAirPort2.kext

Once you have extracted the module, patch it as in step 3.
5. Turn on PCI proxying in /etc/mol/molrc.osx and make sure that the PCI address is pointing to your AE:
Code:
# nano -w /etc/mol/molrc.osx
enable_pciproxy: yes
pci_proxy_device: 0001:10:12.0

6. You should be ready to start MOL and connect to a wireless network! Test it out. If you do quit MOL, make sure that you disable the AE first, otherwise the hardware is left in an unknown state and can cause problems.
7. To use this connection from Linux, use the internet connection sharing tool in OSX to share your AE over the TUN device (probably en2).
8. In Linux:
Code:
# ln -s /etc/init.d/net.eth0 /etc/init.d/net.tun1
# echo "iface_tun1="dhcp" >> /etc/conf.d/net
# /etc/init.d/net.tun1 start

9. Enjoy wireless and Linux on your Apple laptop!

Thanks to Stu for testing the directions, Kito for the one liner to extract the .kext and thanks to Mattias Nissler and Johannes Berg for getting this working.
_________________
Gentoo PPC FAQ: http://www.gentoo.org/doc/en/gentoo-ppc-faq.xml


Last edited by JoseJX on Mon Jan 09, 2006 9:28 pm; edited 4 times in total
Back to top
View user's profile Send private message
SmasSive
n00b
n00b


Joined: 22 May 2003
Posts: 21

PostPosted: Tue Aug 02, 2005 6:59 pm    Post subject: Reply with quote

It works!

After reinstalling mac os for a little problem with hfsplus, I get working wireless on my gentoo!
But it seems that the module of network it's powering on/off, I don't know why, but I'm taking a look.

Good job guys! And thanks!
Back to top
View user's profile Send private message
mikegpitt
Advocate
Advocate


Joined: 22 May 2004
Posts: 3216

PostPosted: Thu Aug 04, 2005 2:51 pm    Post subject: Reply with quote

One thing I'm not 100% clear on (since I have never used MOL). Do I need to install and run OSX using MOL to make this work?

I'm basically just wondering if I need to run 2 OS's to get the wireless to work.
Back to top
View user's profile Send private message
JoseJX
Retired Dev
Retired Dev


Joined: 28 Apr 2002
Posts: 2774

PostPosted: Thu Aug 04, 2005 3:06 pm    Post subject: Reply with quote

Yes, the driver is run from within OSX, so you do need to have a working copy of OSX to use with MOL. If you already dual boot, then you can use the existing install.
_________________
Gentoo PPC FAQ: http://www.gentoo.org/doc/en/gentoo-ppc-faq.xml
Back to top
View user's profile Send private message
quatsch
Tux's lil' helper
Tux's lil' helper


Joined: 24 Apr 2005
Posts: 104
Location: New York, NY

PostPosted: Fri Aug 05, 2005 12:55 am    Post subject: Reply with quote

cool!!!! works like a charm :D
.
any reason why the tip says to create /etc/init.d/net.tun1 by copying net.eth0 rather than symlinking it to net.eth0?

BTW, the ebuild for mol put the mol.ko in the wrong directory. I have two kernels on my system: 26.12 and 2.6.12my. I usually run 2.6.12 (the other thing is an experimental thing with various things broken...) but the mol installer put the module in the directory for 2.6.12my. And the tun.ko still appears in the wrong place (not sure if it has something to do with my particular setup though I don't think I have anything exotic). Both are no biggies - just look at the messages and it's clear what to do.

thanks for the work!!
Back to top
View user's profile Send private message
JoseJX
Retired Dev
Retired Dev


Joined: 28 Apr 2002
Posts: 2774

PostPosted: Fri Aug 05, 2005 2:49 am    Post subject: Reply with quote

Yeah, you're right, that should be a symlink, fixed. :) I haven't figured out why it screws up when your kernel has a name at the end, but it does it here sometimes too. I'm looking into it. Glad to hear that it worked for you.
_________________
Gentoo PPC FAQ: http://www.gentoo.org/doc/en/gentoo-ppc-faq.xml
Back to top
View user's profile Send private message
quatsch
Tux's lil' helper
Tux's lil' helper


Joined: 24 Apr 2005
Posts: 104
Location: New York, NY

PostPosted: Fri Aug 05, 2005 4:40 am    Post subject: Reply with quote

Am I right that sleep doesn't work when the AE is up in mol? I tried to put my ibook (g4 12inch 1.2 ghz) to sleep but it fails to wake. When AE is turned off before going to sleep, it wakes up fine and AE can be activated again in mol.

Is there a way to start osx using mol without the whole gui? If there is, once I figure out how to activate the network from the command line on mac (I assume it won't be too hard) things would be a lot easier and less wasteful. I could just administer the whole thing using ssh.

Not having to use a usb dongle is a bliss!! thanks again!


PS: actually, the activation of AE from the osx command line seems to be only
ifconfig en1 up
deactivation is
ifconfig en1 down
simple ;)
Back to top
View user's profile Send private message
mikegpitt
Advocate
Advocate


Joined: 22 May 2004
Posts: 3216

PostPosted: Fri Aug 05, 2005 1:14 pm    Post subject: Reply with quote

quatsch wrote:

BTW, the ebuild for mol put the mol.ko in the wrong directory. I have two kernels on my system: 26.12 and 2.6.12my. I usually run 2.6.12 (the other thing is an experimental thing with various things broken...) but the mol installer put the module in the directory for 2.6.12my. And the tun.ko still appears in the wrong place (not sure if it has something to do with my particular setup though I don't think I have anything exotic).

Are you sure the sumlink /usr/src/linux isn't pointing to your experimental kernel? Typically things that mess with the kernel use that symlink to access the kernel source.
Back to top
View user's profile Send private message
quatsch
Tux's lil' helper
Tux's lil' helper


Joined: 24 Apr 2005
Posts: 104
Location: New York, NY

PostPosted: Sat Aug 06, 2005 5:32 am    Post subject: Reply with quote

Quote:
Are you sure the sumlink /usr/src/linux isn't pointing to your experimental kernel? Typically things that mess with the kernel use that symlink to access the kernel source.


yeah, the symlink points to the right source tree (I never change it until I switch the kernel I use as the default one).
Back to top
View user's profile Send private message
KaOS-bEat
n00b
n00b


Joined: 07 Aug 2005
Posts: 1

PostPosted: Sun Aug 07, 2005 8:11 pm    Post subject: the tun device... Reply with quote

Whaoow

after patching the old driver I extracted from the cd I do have airport up in OSX! but I had a system freeze (garbled display, like when experiencing a crashed sleep attempt) after restarting mol...
Also the penguin embracing the apple was interupted by the "You need to restart your computer, hold the power button for x seconds" in thirteen languages...

anyway writing this email in osx on mol so in the end everything is fine. But my tun device in linux is in trouble.
Although i do not autoload tun the device is created somehow (even after remove it).
when starting mol I get :

"Creating the /dev/net/tun device node"
"Loading the tun driver kernel module"
/usr/lib/mol/0.9.71/modules/2.6.12-gentoo-r6/tun.ko
insmod: error inserting '/usr/lib/mol/0.9.71/modules/2.6.12-gentoo-r6/tun.ko' :- 1 file exists


this is happening since I upgraded to mol 0.9.71 to get this AE-thing working, before that I had a working tunnel... ideas?

--UPDATE
I got it working now, but I don't know what did it, I removed the tun module from the autoload list and modprobed tun before starting mol... but this trick didn't work before.

Anyway it WORKS great!!!


K.
Back to top
View user's profile Send private message
Sodki
Guru
Guru


Joined: 11 Aug 2003
Posts: 419
Location: London, U.K. & Lisbon, Portugal

PostPosted: Fri Aug 12, 2005 12:38 am    Post subject: Reply with quote

This is great news! Unfortunately, I can't make this work, after following all the steps and. I can make my MOLed MacOSX use the Airport Extreme and make my GNU/Linux ping the MOLed MacOSX, but it doesn't connect to the Internet. I believe, since GNU/Linux get's it's IP from MacOSX, that the hardest part is done, but i'm not sure.

Maybe I'm being too dumb sharing the Internet connection on MacOSX? Isn't it System Preferences -> Sharing -> Internet -> Share your connection from: AirPort -> To computers using: Ethernet Adaptor (en2) -> Start -> Start? Am I missing something?
Back to top
View user's profile Send private message
nix_newb
n00b
n00b


Joined: 01 Apr 2004
Posts: 72

PostPosted: Sun Aug 21, 2005 9:01 pm    Post subject: Reply with quote

IT WORKS! And I'm amazed at how well it works!

A couple tips for anyone else that gets it to work:
Disable the Screen Saver in mac OS X - it will cause (alot of) unnecessray cpu usage
Disable sleep under mac OS X - if it's on, the connection will go down every time the emulated machine goes to sleep

This is really great. Really, really great...
Back to top
View user's profile Send private message
e-ipi
Apprentice
Apprentice


Joined: 23 Aug 2005
Posts: 192

PostPosted: Thu Aug 25, 2005 4:15 am    Post subject: Reply with quote

Hmm... I used the driver that came off the 10.4 disk that came with my Powerbook 6,8. Unfortunately, I couldn't get MOL to find the Airport2 card. OS X kept telling me that the hardware couldn't be found. The card worked while running Mac OS X natively, but on the second boot into OS X it disappeared again. I had to use Startup Disk and reboot for Mac OS X to find it. Thinking I had copied the wrong files or made some other stupid mistake, I tried it again. I got exactly the same results and again, only Startup Disk could revive the card.
Back to top
View user's profile Send private message
servobf
Apprentice
Apprentice


Joined: 03 Jun 2004
Posts: 160

PostPosted: Sat Aug 27, 2005 9:03 pm    Post subject: You're awesome! Reply with quote

Thank you so much to everyone who's working on this! I upgraded from my G3 to a G4 about a year ago, and have been anxiously waiting for AE support!

You're awesome!

Michael
Back to top
View user's profile Send private message
Polymira
n00b
n00b


Joined: 28 Aug 2005
Posts: 2

PostPosted: Sun Aug 28, 2005 1:51 am    Post subject: Reply with quote

Alright, now KisMac has a driver for the airport extreme that allows rfmon (passive mode). I took a peek, and i'm not sure if this is a full driver, a patch for the official. But it may be something to look at ....

Just go to http://kismac.binaervarianz.de/download.php and check out subversion access.
Back to top
View user's profile Send private message
tanawana
n00b
n00b


Joined: 03 Nov 2004
Posts: 8
Location: youngstown, OH

PostPosted: Tue Aug 30, 2005 2:43 am    Post subject: Reply with quote

I am having trouble making this work and don't know what I am doing wrong.

>>After using
'aepatch --patch ./System/Library/Extensions/AppleAirPort2.kext/Contents/MacOS/AppleAirPort2 '
>>I end up with the message:
Checking for compatible driver ...failed.
*** Sorry your driver does not support PIO mode. Please try another version.

This is after using the Installation CD with:
gunzip -c /Volumes/PowerBook\ G4\ Software/System/Installation/Packages/Essentials.pkg/Contents/Archive.pax.gz | pax -r ./System/Library/Extensions/AppleAirPort2.kext

It is a MacOSX Version 10.3 DVD install disk that came with the computer.
Back to top
View user's profile Send private message
Cenrim
Tux's lil' helper
Tux's lil' helper


Joined: 04 Dec 2004
Posts: 142
Location: Germany

PostPosted: Thu Sep 01, 2005 11:45 am    Post subject: Reply with quote

did you copy the driver from $PWD/System/Library/Extensions/AppleAirPort2.kext to (OS X' /;)) /System/Library/Extensions/AppleAirPort2.kext after you extracted is from the CD?
I almost forgot it ;)



soo, works for me... cool.. but my connection is this ****ing unstable, I gotta change back to Mol every few minutes to reconnect and for some strange reason I can ping from gentoo through MOL into the net, but nothing else :(^2
Back to top
View user's profile Send private message
Sodki
Guru
Guru


Joined: 11 Aug 2003
Posts: 419
Location: London, U.K. & Lisbon, Portugal

PostPosted: Thu Sep 01, 2005 6:15 pm    Post subject: Reply with quote

Cenrim wrote:
soo, works for me... cool.. but my connection is this ****ing unstable, I gotta change back to Mol every few minutes to reconnect and for some strange reason I can ping from gentoo through MOL into the net, but nothing else :(^2

You mean you can ping to the outside world, but can't access websites? Did you activate "Personal Web Sharing" in System Preferences -> Sharing -> Services? Or is your firewall blocking it?

Unfortunately, I can ping MacOSX from Gentoo and vice versa, but from Gentoo through MOL I can't even ping the outside world. :cry:
Back to top
View user's profile Send private message
echo6
Guru
Guru


Joined: 04 Jan 2003
Posts: 587

PostPosted: Thu Sep 01, 2005 6:25 pm    Post subject: Reply with quote

Followed all the steps, enabled internet connection sharing in OSX ran startmol followed by /etc/init.d/net.tunl and got
Code:
tunl does not exist
Where to go from here?
Back to top
View user's profile Send private message
Sodki
Guru
Guru


Joined: 11 Aug 2003
Posts: 419
Location: London, U.K. & Lisbon, Portugal

PostPosted: Thu Sep 01, 2005 6:35 pm    Post subject: Reply with quote

echo6 wrote:
Followed all the steps, enabled internet connection sharing in OSX ran startmol followed by /etc/init.d/net.tunl and got
Code:
tunl does not exist
Where to go from here?

It's tun1, not tunl.
Back to top
View user's profile Send private message
echo6
Guru
Guru


Joined: 04 Jan 2003
Posts: 587

PostPosted: Thu Sep 01, 2005 6:39 pm    Post subject: Reply with quote

I have mac osx running now in a window but with no airport interface, /etc/init.d/net.tun1 start works but is unable to get a dhcp address.
Back to top
View user's profile Send private message
echo6
Guru
Guru


Joined: 04 Jan 2003
Posts: 587

PostPosted: Thu Sep 01, 2005 9:46 pm    Post subject: Reply with quote

e-ipi wrote:
I had to use Startup Disk and reboot for Mac OS X to find it.
How do you do this?

My AE interface has also dissappeared :-( Under Network it is shown as off red with no way of re-enabling it!!! Looking at dmesg I have an error
Code:
Couldn't alloc class "AirPortPCI_MM"
Back to top
View user's profile Send private message
e-ipi
Apprentice
Apprentice


Joined: 23 Aug 2005
Posts: 192

PostPosted: Fri Sep 02, 2005 3:16 am    Post subject: Reply with quote

echo6 wrote:
e-ipi wrote:
I had to use Startup Disk and reboot for Mac OS X to find it.
How do you do this?

My AE interface has also dissappeared :-( Under Network it is shown as off red with no way of re-enabling it!!! Looking at dmesg I have an error
Code:
Couldn't alloc class "AirPortPCI_MM"


I booted off the OS X Install DVD. Running Startup Disk wipes out your yaboot partition, but it's easy enough to boot into Linux by holding down the Option key while the machine starts up and then selecting the Linux disk.

Just out of curiosity, what Powerbook/version of OS X are you running?
Back to top
View user's profile Send private message
echo6
Guru
Guru


Joined: 04 Jan 2003
Posts: 587

PostPosted: Fri Sep 02, 2005 6:38 am    Post subject: Reply with quote

I tried that earlier and it didn't work, I ended up with that error.

I have 10.4 Tiger, I've had to re-install X and I'm now in the process of blessing the boot partition to get my dual boot back.

It's taking me a while to get used to Yaboot on openfirmware partitions!
Back to top
View user's profile Send private message
e-ipi
Apprentice
Apprentice


Joined: 23 Aug 2005
Posts: 192

PostPosted: Fri Sep 02, 2005 6:45 pm    Post subject: Reply with quote

echo6 wrote:
I tried that earlier and it didn't work, I ended up with that error.

I have 10.4 Tiger, I've had to re-install X and I'm now in the process of blessing the boot partition to get my dual boot back.

It's taking me a while to get used to Yaboot on openfirmware partitions!


It worked for me twice, but I just had to reinstall OS X, too. Aargh!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC All times are GMT
Goto page 1, 2, 3, 4, 5, 6  Next
Page 1 of 6

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum