Saturday, June 22, 2013

Dell Wireless 1704 with Fedora 18


Installed Fedora 18 on my office Laptop Dell Vostro 3460, default fedora 18 compilation dont come with ethernet and wireless network drivers for the laptop, here is my workaround to get wireless driver get connected to wireless access point. Following is device list reported by lspci

01:00.0 Network controller: Broadcom Corporation BCM43142 802.11b/g/n (rev 01)
02:00.0 Ethernet controller: Atheros Communications Inc. AR8161 Gigabit Ethernet (rev 10)


I have checked development packages to be installed while installation, which is required for compilation of wireless driver.  here is listing of my kernel packages

[amitp@fedorabox ~]$ sudo rpm -qa | grep kernel-
kernel-devel-3.6.10-4.fc18.x86_64
kernel-3.6.10-4.fc18.x86_64
kernel-headers-3.6.10-4.fc18.x86_64


also you will need c compiler i had gcc-4.7.2-8.fc18.x86_64 on my box, i guess these all are the things we need to start compilation, ops i forgot to mention the driver package. I downloaded package from http://www.lwfinger.com/patches/wireless_bcm43142.tar.bz2 if you have broadcom-wl already installed i recommend to remove it (sudo yum remove broadcom-wl) so that it doesn't creates any conflicts. lets assume you have downloaded wireless_bcm43142.tar.bz2 to Downloads lets start complilation

[amitp@fedorabox ]$ cd ~/Downloads/
[amitp@fedorabox ]$ tar xfjv wireless_bcm43142.tar.bz2
[amitp@fedorabox ]$ cd wireless-bcm43142/amd64/
[amitp@fedorabox ]$ make
[amitp@fedorabox ]$ sudo make install
[amitp@fedorabox ]$ sudo mkdir -p /lib/modules/$(uname -r)/extra/wl
[amitp@fedorabox ]$ sudo cp wl.ko /lib/modules/$(uname -r)/extra/wl
[amitp@fedorabox ]$ sudo depmod -a
[amitp@fedorabox ]$ sudo modprobe wl

thats it you are done :) Do post comments

Saturday, June 2, 2012

Natural Scrolling in Fedora

My office Macbook got upgraded to "Lion" recently, default vertical scrolling behaviour in lion os is to follow natural way scrolling. so if i move my fingers on track pad from bottom to up, page will also move to show bottom part on the screen. Mac terms it as natural way scrolling, behaviour is same if a have a touch screen device where i feel as if i hold the page on the screen and move it up and down. this was not default earlier not even in windows and in linux, atleast not in fedora.

Of course Macbook has option to disable this natural way scrolling but i opted to keep it like that for trial, and later i started liking this way of scrolling. now problem comes when i use my fedora laptop, it doesn't scroll in that way. i checked but couldn't find any option to reverse scrolling behaviour in fedora (I use gnome and recently upgraded to fedora 17).

Exploring some more i found that xmodmap is the thing i have to play around  to fix this. Before i start writing more details about xmodmap. let me go with the title of blog and fix the scrolling part. there are two things in xmodmap key mapping and pointer mapping. execute following commands on your terminal to see the current mappings 

bash-4.2$ xmodmap -pk (this is to show all key mappings)
bash-4.2$ xmodmap -pp (this is to show all pointer mappings)

bash-4.2$ xmodmap -pp
There are 12 pointer buttons defined.

    Physical        Button
     Button          Code
        1              1
        2              2
        3              3
        4              5
        5              4
        6              6
        7              7
        8              8
        9              9
       10             10
       11             11
       12             12

Following 12 pointer are defined for various events. scrolling depends on pointer number 6 and 7.  All we have to do is swap the values of pointer number 6 and 7. and for that you have to execute following command 

bash-4.2$ xmodmap -e "pointer = 1 2 3 4 7 6 8 9 10 11 12"

and your scrolling will be reversed. Just for verification you can run xmodmap -pp again

bash-4.2$ xmodmap -pp
There are 12 pointer buttons defined.

    Physical        Button
     Button          Code
        1              1
        2              2
        3              3
        4              5
        5              4
        6              7
        7              6
        8              8
        9              9
       10             10
       11             11
       12             12

if you want to keep this permanent, all you have to do is save this mapping in startup scripts so that it gets executed when you boot up your fedora.


[I will find more time to write some more about xmodmap and update link  here, idea behind new blog will be something like changing additional multimedia keys to change them to work in your way or changing some key mappings for fooling around your friends. so keep watching for new blog post]