haikuware bounty

Almost, but not there yet

Blog post by axeld on Tue, 2010-12-14 22:08

As you might have noticed, the WiFi encryption bounty ends tomorrow. Obviously, this is a good time to give an overview over what I did in the past weeks. Unfortunately, and hopefully before I got you excited, the most interesting thing of the bounty, the wpa_supplicant, does not work yet. I've ported it to Haiku, but so far it has resisted my attempts to find out where the problem is located -- well, in the hours I put into debugging I've found a couple of potential causes, but there is at least one more to be found, and fixed.

WPA encryption progress

Blog post by axeld on Wed, 2010-10-13 21:03

I've been working on getting WPA encryption to work on Haiku. While I haven't been able to invest as much time as I hoped for before, I made a bit of progress that at least justifies a small status update.

The first part of WPA related work has actually happened while I was working on the network stack for Haiku Inc., as it was not possible to inject packets into the network - while you could easily monitor all incoming packets, there was no mechanism to send packets for arbitrary protocols. I've extended the AF_LINK protocol to be able to deliver that mechanism.

Then I started the actual work on porting wpa_supplicant, the standard tool for allowing WPA/WPA2 encryption almost everywhere. Since we're using the net80211 WLAN stack as part of our FreeBSD driver compatibility layer, a lot of code from the existing BSD driver backend could be used. There are actually only two differences between Haiku, and your favorite BSD for this kind of work:

  • ioctl() needs a length parameter that tells the kernel how large the structure passed in is. In BSD this information is encrypted in the control constant, but this is not the case for Haiku. While the BSD way is certainly more convenient, Haiku's solution is safer and more flexible.
  • the BSDs are using AF_ROUTE sockets to pass network notifications to the interested user software. In Haiku, we already have a system wide interprocess messaging service, and this is what is therefore used there. The only downside of this approach is that the API is C++ only which is probably something that won't be accepted upstream.
  • After I had the driver backend ported, the next thing was to implement the level 2 packet support, as the wpa_supplicant needs a way to receive, and send packets outside of the usual protocols. This part is now using the AF_LINK method I described above, although there seems to be a problem left that I need to look into: select() always reports the socket readable. For now, due to the event based implementation of the wpa_supplicant, this is only causing a bit more CPU usage than you would want to have. I am not sure there is anything actually relying on receiving something yet (or if it works, as nothing has been sent or received so far).

    Once I had the wpa_supplicant working in theory, more problems surfaced, though, as usual. One is that the FreeBSD driver layer does not receive a few ioctl() calls that need to be forwarded to it in the use case of wpa_supplicant. That one only took a bit of debugging, and I've added a quick hack that forwards the needed calls for now; since I'm not happy with that yet, I haven't committed the changes yet.

    A more serious problem was that Colin did an iterative port of the net80211 stack: he added/implemented only the parts that were needed at the time. It seems that WPA needs a bit more parts; so far I've only added the xauth module which allowed me to actually receive node association events from the the stack. After that, it still fails for some reason, but I haven't figured out why.

    I will only be able to work a few hours per week in the next weeks, so I hope I'll get something useful done until the deadline is hit. In any case, once I have the wpa_supplicant working, I will commit what I have done so far - since the wpa_supplicant currently needs private Haiku headers, and the changes I'm planning on doing are unlikely to be accepted upstream, I will probably end up adding all of its sources to the Haiku repository. Once I have WPA working, I will continue with extending the existing configuration tools to support WLAN as well. This will also cause further integration of the wpa_supplicant, it will probably end up being an add-on for the net_server.

WiFi stack - coarse design overview

Blog post by ColinG on Mon, 2009-07-13 19:13
The next step towards the finishline (described by the WiFi-bounty on haikuware, Technical Information tab), will be the design of a native Haiku WiFi-stack.The picture below shows a coarse view of how the stack will fit into the networking system.

WiFi stack - coarse design overviewWiFi stack - coarse design overview As you can see there are two distinguished areas, one is colored green the other blue. Green shows already existing infrastructure, blue shows the infrastructure I'm going to provide. The arrows should be read as “depends on, uses features of”.

So the blue ellipse encapsulates the blueprint of the WiFi-stack. The inner structure of the yellow box, saying “WiFi-Stack” will be my next task. The main reasons for designing a Haiku-specific WiFi-stack (in contrast to modify/port the FreeBSD one) are to utilize Haiku's strengths (multithreading, object orientation, ...) and to get smaller driver code (due to lack of all the FreeBSD compatibility code).

After accomplishing the yellow one, I'll pay my attention to the yellow-red gradiented box saying “FreeBSD-Adapter”. This adapter will allow to use FreeBSD's WiFi driver and use them in Haiku with just recompiling them. As you can see this is the same idea as realized for LAN driver's by Hugo Santos.

WiFi stack prototype works

Blog post by ColinG on Sun, 2009-07-12 08:44
Screenshot of working WiFi prototypeScreenshot of working WiFi prototype Today I fiddled out the last hurdle on getting my WiFi-card up and running. It only connects to unprotected open wireless LANs, because there is no configuring mechanism implemented yet. Though it is far away from completeness.

On the screenshot, you see Firefox surfing www.haiku-os.org and downloading a 100 MiB file from my ftp server in parallel. The terminal is showing the result of the ifconfig command for my WiFi-card.

I managed to port the FreeBSD WiFi-stack, utilizing Haiku's FreeBSD compatibility layer. Thus I could use the WiFi-card driver for my atheros chipset from FreeBSD without any major changes to its codebase (I had to move some interrupt handler code into driver-specific glue code).

The driver-binary has a size of 500 KiB, due to compiling the WiFi-stack into a static library and statically linking it and the FreeBSD compat layer with the driver. Update: The sources are up in the haiku-wifi repository on www.osdrawer.net (read "For the bravery" down the line for more info on how to get it).

Bluetooth Bounty Complete

Blog post by kvdman on Sat, 2008-11-29 17:30

Oliver Ruiz Dorantes:

http://urnenfeld.blogspot.com/2008/11/5th6th-milestone-phase-1-reached.html

has recently committed:

http://cia.vc/stats/author/oruizdorantes

the last parts and completed phase 1 of Haikuware's bluetooth bounty:

http://www.haikuware.com/bounties/bluetooth-bounty

As such, he was transferred the bounty's pool of $1820.47 (he also received some RAM for his hardware donated by haikuware admin thenerd). The bounty fell a little short of the $1950 he requested, but all in all I think he'll be happy with that sum.

I'd like to thank all the bounty contributors that made this possible, as well as Oliver for the hard work he put in to give Haiku the code for a functional bluetooth base! Congrats all around.

WebCore Now Compiles for Haiku

Blog post by leavengood on Mon, 2007-11-12 05:40

I know I have been very quiet for a while in regards to my Haiku WebKit port, but that is because I've been in a long session of coding. I am happy to report that this weekend I finally got WebCore compiling for Haiku:

Link ../../../generated/objects/haiku/x86/release/WebKit/WebCore/libwebcore.so 
Chmod1 ../../../generated/objects/haiku/x86/release/WebKit/WebCore/libwebcore.so 
SetType1 ../../../generated/objects/haiku/x86/release/WebKit/WebCore/libwebcore.so 
MimeSet1 ../../../generated/objects/haiku/x86/release/WebKit/WebCore/libwebcore.so 
SetVersion1 ../../../generated/objects/haiku/x86/release/WebKit/WebCore/libwebcore.so 

So what does this mean? Does it mean the port is now complete? Unfortunately, no it doesn't.

There are still some "stubbed out" classes in the Haiku platform code in WebCore, which means they don't do anything and just exist to make the code compile. Fortunately I have coded a lot of the needed platform files, but the ones which are stubbed out are some of the more complicated ones.

But I am very eager to finally get a simple web launcher running on Haiku to test the port, so I plan to work on this project after work this next week. For those not aware my (self-assigned) deadline for the WebKit Port Bounty on Haikuware is November 15th, which is this next Thursday. I think this deadline was a good motivator so I am glad I have it, but I don't think the port will be rock solid and "complete" by then. Keep in mind that the Qt port of WebKit is also missing a lot and has been worked on by many developers for more than a year. In addition WebKit originally came from KHTML which was a Qt-based HTML engine, so they have another advantage in that the design is Qt-friendly. Even the Windows port which is done by Apple employees who are experts on WebKit is still missing things that the main Mac OS X port has.

I don't say all this as some big excuse. I just want people to realize this is quite a big project and involves my learning the design of WebKit as well as aspects of the Haiku API I am not aware of. Plus as I have discussed before I have had to set up a new cross-compiler environment, port and then build four external libraries WebKit needs (CURL, ICU, SQLite, and libxml2), and write new Jamfiles for JavaScriptCore and WebCore so they can be built with the Haiku build system. I have also added missing features to Haiku that WebKit needed. In the end I think I will be a much better developer after doing all this, but it does involve a lot of work. I expect that once I get over this first hump of the main work for the port, other people will be able (and hopefully willing) to help. I do know at least one Haiku developer who has interest in helping a bit.

So what do I plan to deliver to satisfy the bounty? Well I have started working on "HaikuLauncher", inspired by the QtLauncher, which will be a very basic browser shell to drive the WebKit engine. I would like this to be able to load a web page and render it properly. Beyond that I'm not guaranteeing anything, at least for another few months until I can write a full browser (which is outside the scope of the bounty.)

Given this I hope the folks who contributed to the bounty can feel satisfied that their money was well spent.

WebKit Port Complications

Blog post by leavengood on Mon, 2007-08-20 23:31

I have been documenting my progress on porting the WebKit project to Haiku on the Haikuware site, but decided to also post information here. You may want to read my previous blog article about this port and also the information at the WebKit bounty on Haikuware. Please consider donating to a bounty.

Before I started work on this port I asked in the #webkit IRC channel what the mimimum version of GCC that was required to compile WebKit. The general consensus was 4.0. So what does that mean?

Syndicate content