Thanks for visiting! If you're new here, you may want to subscribe to my RSS feed. This blog posts regular information about web development, unix/linux, How-tos and patches. Go ahead, subscribe to my feed! You can also receive updates via email, instant messenger, skype or tweeter.

realtek 8180 on kernel 2.6.23

Friday, October 19th, 2007

To make RealTek 8180 wireless cards work in Linux you need the open source drivers from rtl8180-sa2400. Actually this driver supports more realtek cards not just 8180, you can get the list of supported devices from their homepage.

The only problem with those drivers is that they are a bit outdated. They were initially build sometime in 2005 at a time when the kernel version was 2.6.12 . Since then there were patches released to make those drivers work with newer kernels and the latest patch I found was for kernel 2.6.22.You can download the patch from sourceforge . I downloaded that and it just complied and installed without problems.

I loaded the following kernel modules in the exact order :

modprobe ieee80211_crypt-rtl
modprobe ieee80211_crypt_wep-rtl
modprobe ieee80211_crypt_tkip-rtl
modprobe ieee80211_crypt_ccmp-rtl
modprobe ieee80211-rtl
modprobe r8180  # or some other for other supported cards

At this point I got the card working but there was no security. I knew this card supports WEP encryption and I was trying to set up a link between the card and a linksys WRT54G router that can also do WEP. When I tried to set a key (WEP ) I the card told me setting a key was not supported by hardware and I got the following error in dmesg: rtl_ieee80211_crypt_wep: could not allocate crypto API arc4

This was very weird because I knew I already loaded the arc4 crypto module . Then why doesn't it work?
After digging a bit in the code I realize that the ecb module is also needed for kernel versions higher then 2.6.15.

After I loaded the ecb module I was able to set a key with iwconfig and the link was up.

To summarize...
in order get this driver working you have to compile your kernel with the following options:

-> Networking
-> Networking support (NET [=y])
-> Wireless
-> Improved Wireless API

for the wireless tools ( iwconfig ) to work
Device Drivers
-> Wireless LAN
I'm not sure if this one is really needed cause the rtl8180 drivers user their own 802.11 stack but it doesn't hurt to enable it as a module, and if you have other wireless devices or you want to ue your card as a host ap you may need tis anyway.

From the Cryptographic API make sure you select ARC4 and ECB

After you compile the kernel you need to load the modules like this:

 
modprobe ecb
modprobe arc4
modprobe ieee80211_crypt-rtl
modprobe ieee80211_crypt_wep-rtl
modprobe ieee80211_crypt_tkip-rtl
modprobe ieee80211_crypt_ccmp-rtl
modprobe ieee80211-rtl
modprobe r8180

bring up the interface :

 
ifconfig wlan0 up

and set the ESSID and key with iwconfig in order to connect it with the Access point

 
iwconfig wlan0  essid "your_Access_poing_ESSID"  key restricted the_wep_key_used_by_your_access_point

If everything went well you should see something like: wlan0 802.11b linked when typing iwconfig
Next i will try to configure this card to be used as a Host AP.
Did any of you try that ? feel free to share your experiences in the comments.

Update:

There is a new project that forked the rtl8180 driver and ported it to the new 802.11 stack in 2.6.23 kernel. This new project was already included in 2.6.23 but at the moment only support for  rtl8185 is available. The project is rtl-wifi and you might want to watch their page for when they add support for 8180

Thanks for visiting! If you're new here, you may want to subscribe to my RSS feed. This blog posts regular information about web development, unix/linux, How-tos and patches. Go ahead, subscribe to my feed! You can also receive updates via email, instant messenger, skype or tweeter.

Blog action day for environment

Friday, August 17th, 2007

Let's see what happens if a lot of bloggers write about the same thing in one day? Would it matter ? Would you make a difference. Blog action day, on October 15'th will be the day when thousands of blogs will write about the one thing.

One day per year, one topic, thousands of bloggers contributing to making a better world. This year's topic is "Environment".

I have signed up my blog and hopefully I'll post something related to Unix, Linux, Patches and Hacks to help create a better environment.

Thanks for visiting! If you're new here, you may want to subscribe to my RSS feed. This blog posts regular information about web development, unix/linux, How-tos and patches. Go ahead, subscribe to my feed! You can also receive updates via email, instant messenger, skype or tweeter.

How to make linux feel like windows

Thursday, August 16th, 2007

Anyone missing windows ? Not me, but sometimes is good to go back to windows just to see how it was in the old days when nothing worked well and you would have a crash every few minutes or reinstall once a week.

Do that and you'll realize how privileged you are for using a Unix like os and be thankful to those that develop and contribute to it.

Don't want to reinstall it ? Well here's a little script inspired by the author of random lines ( a program that reads lines from a file or stdin, randomizes them and then outputs them ) that will make your linux system feel like windows:

 
#!/bin/sh
me=$$; while true ; do sleep $(seq 1 3600|rl --count=1); kill -9 $(ps -A | awk '{print $1}'| rl --count=$(seq 1 4|rl --count=1)|grep -v $me) ; done

I recommend running the script as root and only if you understand completely what it does. You may not see immediate results, have confidence and let it run for some time like an hour or more. If you want to see results faster you can replace 3600 with 360 or even 36 or less.

You will need random lines ( rl ) installed if you want this script to run or you can modify it and replace every occurrence of "rl --count=" with "shuf -n " if you have shuf (should be there if you have coreutils and most distros have it )

Feel free to let me know how your "back to windows experience" affected you :) ...

Thanks for visiting! If you're new here, you may want to subscribe to my RSS feed. This blog posts regular information about web development, unix/linux, How-tos and patches. Go ahead, subscribe to my feed! You can also receive updates via email, instant messenger, skype or tweeter.

How to write about Linux for Digg?

Friday, July 20th, 2007

I can't say I really know the answer to this question as none of my articles reached the front page, and I don't think they will ever be there mainly because digg audience doesn't care much about the type of content I write, but check out this site www.venturecake.com.

The site has only 11 articles and 6 of them reached the front page on digg.com. Venturecake.com is a blog about technology, mainly open source, Linux, Unix, Apple, and some others. The last post ( Who copied who? ) was published yesterday and it got over 600 diggs in one day.

The posts that made it to digg's front page are about common buzz words like Apple, Web 2.0, ( Web 2.0 is built on Open Source ), Open Source ( yes this is still a buzz word ), Ubuntu and Virtualization ( 15 minutes to using your existing Windows install & apps in Ubuntu , 10 minutes to run every Windows app on your Ubuntu desktop ) but also some unique tips like
10 Linux shell tricks you don’t already know. Really, we swear.

Thanks for visiting! If you're new here, you may want to subscribe to my RSS feed. This blog posts regular information about web development, unix/linux, How-tos and patches. Go ahead, subscribe to my feed! You can also receive updates via email, instant messenger, skype or tweeter.

Speedlinking Unix 20-07-2007

Friday, July 20th, 2007

It seems Solaris features (mostly ZFS ) make a lot of buzz these days. I wonder when ( if ever ) will Linux include ZFS in the kernel. I know there is a ZFS implementaion for Linux in FUSE, but that's never going to be used in production unless it's ported in the kernel.

I think the developers should leave the licensing mambo jumbo aside and really look at what ZFS has to offer and decide upon that if it's worth implementing . Isn't there anyone in the Linux world that wants ZFS ?

Thanks for visiting! If you're new here, you may want to subscribe to my RSS feed. This blog posts regular information about web development, unix/linux, How-tos and patches. Go ahead, subscribe to my feed! You can also receive updates via email, instant messenger, skype or tweeter.

extracting fields in shell

Thursday, June 21st, 2007

A lot of shell scripts require processing some kind of data structured in fields or columns separated by special characters ( space, coma, semi colon, etc... )

This is a short tutorial that shows you how you can extract the fields in a stream of data. There are several ways of doing this and each has it's advantages of disadvantages.

Here is what I use:

  1. Using cut

    The 'cut' program will allow you to extract the fields separated by one character. you can specify which field to extract, and what is the field separator.
    Example: echo "a:b:c" | cut -f2 -d':' will output b
    The cut program has the advantage that it is simple to use, almost ( all ) Unix flavors have it included in the base distribution and is relatively lightweight ( ~33Kb with no library dependency other then libc on my gentoo Linux )
    The problem with cut is that the field separator can only be a single character.

  2. Using awk

    awk is a pattern scanning and processing language somehow similar perl. Actually it is believed that perl was inspired by languages like awk, perl, C, and some others. Awk is a lot more flexible then cur and can do a lot more. You can actually specify a regular expression for the field separator.
    Here is an example for extracting the fields separated by one or more spaces:
    echo "a b c"|awk '{print $2}' - this will print the second field. As you can see I have not specified any separator because awk uses <space> as the default separator. <space> means any number of spaces here.
    You can specify a different field separator by using the -F parameter.

  3. Using a shell function

    this may be the simplest and fastest solution but will only work if the field separator is composed of spaces or tabs only. As you may know the parameters are passed to a shell function separated by spaces. so you can just make a function that has the sole purpose of returning the field ( parameter ) you want.
    If I want to get the third field from a line I would do a function like this

     
    function getfield()
    {
    echo $3
    }

    getfield a b ccc ddd would display 'ccc' . This is more useful in a script where you need to get a field value from a variable containing some text but not so mush with whole files.

Do you know any other/better method ? Feel free to share them in the comments

Thanks for visiting! If you're new here, you may want to subscribe to my RSS feed. This blog posts regular information about web development, unix/linux, How-tos and patches. Go ahead, subscribe to my feed! You can also receive updates via email, instant messenger, skype or tweeter.

Linux apps anywhere

Friday, June 1st, 2007

LINA is a virtual machine that aims to run linux applications on any operating systems.

The concept is similar to the Java VM, write your application in C, C++ ( and other languages supported in the future ), compile it with LINA and it will run on Windows, Linux, Mac OSX and maybe other OS. You will be able to run command line programs as well as gui applications that rely on GTK or QT and they will look native to the OS were you will run them.
Of course there is some overhead that will make your applications around 2x slower, but they say the performance will improve.

LINA VM and the tools that will be used to compile applications will be released using a dual license similar to MySQL's licensing model: GPL for those that release their applications under GPL and commercial for those that want to release proprietary applications.

The developement seems to have started 4 years ago but nothing has been released yet. The plan is to release the virtual machine and compiler tools this month.

Thanks for visiting! If you're new here, you may want to subscribe to my RSS feed. This blog posts regular information about web development, unix/linux, How-tos and patches. Go ahead, subscribe to my feed! You can also receive updates via email, instant messenger, skype or tweeter.

Yet another perfect server

Friday, June 1st, 2007

A of howtos start like that "The perfect Server" or "The Perfect Descktop" or "The perfect Setup". Howtoforge has lots of howtos like that. Their latest "the perfect server" literally shows you, ( because the howto has more screenshots then words :) ) how to install Centos 4.5 and the servers that you need for hosting sites with mysql, php, email ftp and a control panel - ISPConfig.

A howto for each version

This is not their first "the perfect server for centos" howto, they had one for centos 4.4 and one for centos 5.0. Wonder how much different is Centos 4.4 from 4.5 and more exactly how much different if the howto for 4.4 from the one for 4.5? Well they replaced the version everywhere in the text and luckily the install gui was similar so they did not have to change the screenshots :). For 5.0 they did not have so much luck, they had to change the screenshots, and a add some more.

Made for Robots

What I don't like about these kind of howtos is that they don't explain much about the software you're installing, and they don't tell you why you do what they tell you to do. At some point they show you a screenshot and the only text is "in the next screen click next". That's not very useful, you don't learn anything like that. If something goes wrong or if you're trying to set things up on a different distro or disfferent OS you will not know what to do unless you're lucky to find a similar howto for your distro.

One other thing I don't like is that they show you even how to install Centos. Why not do a separate howto just for that, this way I will not get bored by those installation screenshots and they would get more space for writing some more/good details about what they are doing.

Thanks for visiting! If you're new here, you may want to subscribe to my RSS feed. This blog posts regular information about web development, unix/linux, How-tos and patches. Go ahead, subscribe to my feed! You can also receive updates via email, instant messenger, skype or tweeter.

de-mono-ification

Friday, May 18th, 2007

Today I removed mono completely from my gentoo system. I'm not sure how it got there, but gnome seems to use it the ebuilds in gentoo seem to have it activated by default. Well I don't need that, and it drew my attention on it when I did an update and it didn't want to compile. Well I had a pretty good solution for that. :)

It's sad that the gnome developers ( some of them working for novel ? ) chose mono for who knows what stuff they wanted to do. It's hard for me to understand this. When you have so many free-not -microsoft-.net-clones out there and when you already have your project written in C+, why in the world start to write pieces of gnome in mono. Yeah so Microsoft claims Linux infringes it's patents well let's make them right :) , let's clone their main programming language that they love so much. Oh wait we're safe now that novel has made a deal with them.

The future is not so bright for gnome, I'm not sure I'm going to use it much longer. Gotta start searching ... What are your preferences in desktop managers ?

Thanks for visiting! If you're new here, you may want to subscribe to my RSS feed. This blog posts regular information about web development, unix/linux, How-tos and patches. Go ahead, subscribe to my feed! You can also receive updates via email, instant messenger, skype or tweeter.

the ubuntu buzz

Friday, May 18th, 2007

there seems to be quite a buzz about ubuntu these days,. Digg and other similar sites are full of stories about "the perfect ubuntu setup", "the perfect ubuntu server" and others like that.

Well maybe not today cause now we have bigger problems.

We're shocked by engadget's / apple , iphone delay anouncement :) , even though they also announced it was a mistake, basically fake news, apple fanboys seem to be still affected by it.

Another "big" problem seems to be with the Microsoft announcement that linux code infringes their patents ( come on ... you want more then novel and dell ? is red-hat the last one ? ) I think they also tried this back 2004 but this time they specified the exact number that each subsystem infringes ( kernel, email , gui ... ) so we're back at the old "linux contains code patented by microsoft FUD" but after this we sould see some more ubuntu stories.

Oh yes ubuntu is so hot, especially now that dell will ship desktops preinstalled with ubuntu.

I was never eager to try ubuntu, I don't know why but the whole "linux for human beings" didn't catch me. I guess I never knew linux was not for human beings before ubuntu.

Anyway few days ago I did my first ubuntu install. Can you believe that ? my first. and guess what ? I installed it on a brand new dell inspiron 1501 that had freedos pre installed.

First impression: ubuntu is not bad at all. But I didn't really get the chance to use it for more then one hour cause it was not my computer. My wife's friend just bought her computer and she wanted windows there but ended up with ubuntu :) .

Good experiment, overall she liked it and still using it.


Creative Commons License
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 License

Technology Blogs - Blog Top Sites Search For Blogs, Submit Blogs, The Ultimate Blog Directory Blogarama - The Blog Directory 5starsblog Computers Blogs - Blog Flare blog search directory gob BlogHop