Sunday, August 11, 2013

Access point with Raspberry Pi and rtl8192cu dongle

On Thursday ethernet ports (WAN and LAN1-4) in my Asus WL500GPv1 router have completely died, so I needed a replacement. Hopefully, recently I've got Raspberry Pi, so I decided to use it as a router. I've got TP-LINK TL-WN821NC USB stick from local store which is based on RTL8192CU chipset. Unfortunately, its driver doesn't work with vanilla hostapd, but requires patched ancient version of hostapd from Realtek.

I'm using Archlinux on my rpi and I've found manual how to setup AP using this USB stick here, but I don't want to overwrite binaries from repository packages, since it's not a sane way, and it can (and will) be broken by hostapd update.

So I prepared a package, here's source package (just unpack it and build with makepkg directly on rpi), and here's binary package for armv6h (you can install it with pacman -U). I can't put PKGBUILD in AUR, since there's no stable hosting for Realtek's hostapd. If anyone is willing to host it somewhere and put PKGBUILD in AUR - you're welcome!

You need to replace driver=nl80211 with driver=rtl871xdrv in your /etc/hostapd/hostapd.conf in order to make it work.

Monday, April 29, 2013

topIcons extension for gnome-3.8

Well, I dislike gnome devs decision about putting legacy tray icons to the attic (message tray), and prior to gnome 3.8 there was an extension to move all tray icons to the top panel. But after upgrade to gnome-3.8 subj extension didn't work properly (tray icons disappear after locking/unlocking screen). I've waited for a fix about a week, and then I decided to fix it by myself, result is on github.

Saturday, January 5, 2013

Wayland and software rendering

Recently I spent few evenings for hacking wayland. I like idea of wayland - rendering is done completely on client (in whatever way), compositor (server part) is responsible in rendering buffers from clients on the screen. Issue for me was rendering part of weston (reference compositor for wayland) - it uses GLES for compositing, but I want to try wayland and weston on devices without hw acceleration (pure software rendering), and running software GL on PXA270@312MHz does not sound like a good idea, does it? :)

So I asked on #wayland@irc.freenode.org if it possible to implement software renderer, Kristian Høgsberg (khr) responded that in master branch of weston repo there's a nice abstraction of renderer, so it's possible to implement pixman renderer. So I did :)

weston with x11-backend and pixman renderer

khr and pq from #wayland were very helpful, and described place of renderer in wayland architecture, here're some points

  • renderer just performs rendering of surface in order passed by compositor (compositor::surfaces_list)
  • each surface has opaque (surface::opaque region) and non-opaque regions, for performance optimization it makes sense to render them differently (with different composite operators, PIXMAN_OP_SRC and PIXMAN_OP_OVER respectively)
  • surface::opaque region is in surface coordinates, and damage region is in global coordinates, so one needs to translate surface::opaque region into global coordinates before compositing
I've also added MIT-SHM support to x11-backend to test pixman renderer, it's activated by passing "--use-shm" argument to weston.

I plan to add 16bpp formats support to wayland (currently it supports only 32bpp) and implement fbdev backend. As one maybe guessed, then I want to try wayland on my PDAs: Zipit Z2 and iPAQs :)

As usual, code is on github, I'll submit it upstream tomorrow.