Jump to content
Andy Vandijck

Atheros AR813X/AR815X/AR816X/AR817X/E220X driver for Yosemite (based on AtherosE2200)

21 posts in this topic

Recommended Posts

I adapted this driver to make it possible to use it for other cards.

Please test, it should work fine :D

 

Github page:

https://github.com/andyvand/AtherosE2200Ethernet

AtherosE2200Ethernet_AnV.zip

Share this post


Link to post
Share on other sites
Advertisement

Not working for me. With debug kext:

 

 

13.01.2015 19:26:55,000 kernel[0]: Ethernet [AtherosE2200]: Found AR8151 V2.

Share this post


Link to post
Share on other sites

I, too, have the same issue. I have verified that the card is working by using the old AtherosL1cEthernet.kext. The kext was properly removed from my system and the kernel cache was rebuilt. I am loading the AtherosE2200Ethernet.kext from my EFI volume using Clover 3128. The only boot flags I use are -kext-dev-mode=1 and -nvda_drv=1 (for my Nvidia drivers).

 

 

No ethernet interface is present in System Preferences, and there is no option to add one. For testing, I generated the Ethernet interface using the other kext, rebooted, and loaded the E2200 kext to find the interface was present but with a red dot.

 

This is the only relevant debug log:

Feb  4 19:30:24 apollo kernel[0]: getFeatures() ===>
Feb  4 19:30:24 apollo kernel[0]: getFeatures() <===
Feb  4 19:30:24 apollo kernel[0]: createWorkLoop() ===>
Feb  4 19:30:24 apollo kernel[0]: createWorkLoop() <===
Feb  4 19:30:24 apollo kernel[0]: getWorkLoop() ===>
Feb  4 19:30:24 apollo kernel[0]: getWorkLoop() <===
Feb  4 19:30:24 apollo kernel[0]: createOutputQueue() ===>
Feb  4 19:30:24 apollo kernel[0]: createOutputQueue() <===
Feb  4 19:30:24 apollo kernel[0]: getPacketBufferConstraints() ===>
Feb  4 19:30:24 apollo kernel[0]: getPacketBufferConstraints() <===
Feb  4 19:30:24 apollo kernel[0]: Ethernet [AtherosE2200]: Found AR8151 V2.

My card is an AR8151 v2.0, 1969:1083, as others have mentioned. I have one other wifi card, a Broadcom BCM43xx which gives me en1. Thanks for any help!

Share this post


Link to post
Share on other sites

I adapted this driver to make it possible to use it for other cards.

Please test, it should work fine :D

 

Github page:

https://github.com/andyvand/AtherosE2200Ethernet

I want to try this with a Wireless USB card, could it be possible to make it work?

I am actually working in the TL-WN722N using the Atheros AR9271, I created the kext from scratch and it does loads and detects it but nothing else, I don't have any experience programming kext so I am lost there. I would like to use a base code to adapt it.

I uploaded this (unfinnished)work to github today.

Everyone is welcome to help.

 

My github: https://github.com/aaronkish/Atheros-AR9271

Share this post


Link to post
Share on other sites

I want to try this with a Wireless USB card, could it be possible to make it work?

I am actually working in the TL-WN722N using the Atheros AR9271, I created the kext from scratch and it does loads and detects it but nothing else, I don't have any experience programming kext so I am lost there. I would like to use a base code to adapt it.

I uploaded this (unfinnished)work to github today.

Everyone is welcome to help.

 

My github: https://github.com/aaronkish/Atheros-AR9271

But Ethernet driver is not for Wireless USB. What are you going to do?

Share this post


Link to post
Share on other sites

But Ethernet driver is not for Wireless USB. What are you going to do?

Yes, I know that, but I just will try to understand the way to program the driver and adjust it to the USB and Wireless, but this is step by step. I can't run yet.

Share this post


Link to post
Share on other sites

Yes, I know that, but I just will try to understand the way to program the driver and adjust it to the USB and Wireless, but this is step by step. I can't run yet.

I think you have to choose more real task to learn programming. Unreal task will kill you.

Share this post


Link to post
Share on other sites

You can use IOEthernetAdapter for the physical adapter but for the WiFi components you will then have to make an IOUserClient doing all of that.

Stuff like connection to network and so...

Also security...

It's not an easy task...

Share this post


Link to post
Share on other sites

Not working for me. With debug kext:

 

Well, the expected behavior because the underlying Linux code doesn't support AR813x and AR815x.

 

@Andy Vandijck: Please contact me before you start modifying my drivers. I would love to l help you to do it properly. I would suggest to create a new driver just for AR813x and AR815x. Take my code as a base and remove all the AR816x, AR817x and Killer specific stuff, in particular the linux code, and replace it with code from the linux driver for AR813x and AR815x. You'll get much cleaner code which will work the way it should.

 

Mieze

Share this post


Link to post
Share on other sites

You can use IOEthernetAdapter for the physical adapter but for the WiFi components you will then have to make an IOUserClient doing all of that.

Stuff like connection to network and so...

Also security...

It's not an easy task...

I created a IOKit Driver project and so far I manage to ID de device but can't find the way to identify the interface using kernel space. Every time I try to use like IOIteratorNext() and IOUSBLib.h it steps out of the kernel space and stops me. I re-created the implementations for functions like:

 

IOIteratorNext()

IOCreatePlugInInterfaceForService()

QueryInterface()

 

all to create a plugin interface and get the values I think I need to carry on, but it appears as not found symbols, so..dead end so far.

Also I have to re-organize my programming, trying to understand how this works have made my code a mess, you wouldn't like to see it. 

 

On the other hand, I used an example project as base (console) that uses IOKit and CoreFoundation, I do manage to ID my device, find the Interface and pipes (what I was trying to do in kernel space), it even configures it and sets values as the max-current which appeared as "unconfigured" in the USB device in system properties. But then I don't find a way to use a USBDevice object, and then I find the I can't add IOUSBDevice because it belongs to kernel space.

 

So far, with a new beginning I am trying to stablish an skeleton of what it should be done in the driver to reprogram it.

Getting knowledge(maybe) from the examples I get, I don't know what "Anchor Address" or "Anchor Device" is, I don't know why I should write something to my device. I just know that when I use this code:

 

#define    k8051_USBCS        0x7f92

kern_return_t        kr;

IOUSBDeviceInterface245 **dev

///(...)

 

///This return success and it configures the device (///GetNumberOfConfigurations ///GetConfigurationDescriptorPtr ///SetConfiguration)

kr = ConfigureAnchorDevice(dev);  

 

///This involves the functions bellow

kr = DownloadToAnchorDevice(dev); 

{

    kr = AnchorWrite(dev, k8051_USBCS, 1, &writeVal);    ///This returns failure

    kr = AnchorWrite(dev, bulktest.Address, bulktest.Length, bulktest.Data);    ///This returns failure

}

 

///This Finds the interfaces and ID the pipes and its properties correctly. Maybe I don't need the previews step if this one works fine, do I?

kr = FindInterfaces(dev);

 

I don't know if k8051_USBCS as a fixed value of 0x7f92 is common for every device, I don't think so, but I don't find an explanation for it, or where to get the proper value for my own device(in case I need one)

The card I am working on (TL-WN722N) requires a firmware in the linux driver, I suppose here I have to write it in too, and maybe that's what the AnchorWrite() does, but I don't know it yet. The way this people use to write the firmware is using a HEX code, the firmware I have is a binary.

 

My first goal is to make my driver show the device in the Preferences window. Whats the option to make it happen? and I will get there. Then I will worry about harder stuff.

 

ANY help is/will be GREATLY appreciated. Thanks for the replies to my comment.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×