Friday, 18 November 2011

Install the new ATI drivers in Ubuntu 11.10 (and make them work)

Hi there once more.

Following the previous post about problems with ATI drivers, amdcccle (see it here), I' ve looked it into a little bit more.

I was lucky since guys at osarena.net (they rock), had the solution ready for me.

New ATI catalyst 11.8 to the rescue and a proper easy how-to.

This is basically a re-post of the one found in osarena.net (check it here) from the noobie perspective.

First download the new drivers from here. (I got the 64bit one)

Put the ati-driver-installer-11-11-x86.x86_64.run file in a folder (lets name it ati in the home folder) and make it executable.
$cd ~/ati
$sudo chmod +x ati-driver-installer-11-11-x86.x86_64.run

Then create the necessary packages, based on the 11.10 Ubuntu version 
$sudo ./ati-driver-installer-11-11-x86.x86_64.run --buildpkg Ubuntu/oneiric

Before continuing, it is very likely that you might be missing some packages that are necessary to create the packages and cpontinue with this procedure. I've listed below those that I was missing. I have that covers you. One way or another you' get a message to install missing ones.

$sudo apt-get install build-essential cdbs fakeroot dh-make debhelper debconf libstdc++6 dkms libqtgui4 execstack libelfg0 dh-modaliases

Now open the tty session (Ctrl+Alt+F1) and login with your username and password. This is because we are about to uninstall the currently used drivers and we prefer a Command Line Interface (CLI) instead of a graphical one that is using a lot more of the resources of the card.

List folder ati and see the packages.
$ls
  1. fglrx_8.911-0ubuntu1_amd64.deb
  2. fglrx-amdcccle_8.911-0ubuntu1_amd64.deb
  3. fglrx-dev_8.911-0ubuntu1_amd64.deb

Remove old drivers
$sudo apt-get remove --purge fglrx fglrx_* fglrx-amdcccle* fglrx-dev*
Install the new packages (overwriting -f)
$sudo dpkg --force-overwrite -i *.deb

Create the xorg.conf file
$sudo aticonfig --initial -f

and restart
$reboot

After the reboot, when you log in, you might receive an error message that previous settings could not be restored.

$gksudo amdcccle 
to open the catalyst and set your card again.

You are done.

I've have noticed 2 degrees Celsius down in the adapter temperature from my conky file (see what I mean) and a lot smoother sense of the card.

Thank you again osarena.net guys.

Good luck to you all.

Thursday, 17 November 2011

Ubuntu 11.10 ATI drivers and NTFS mounts problem

Hi there again Ubuntu users.

This will be a small post about a problem I faced when I upgraded to 11.10 and it has to do with ATI drivers and NTFS mounts. I ' ve googled them around and I see that there are quite some people facing similar problems.

(I run the 64-bit version, so I do not know if the same applies for the 32-bit one.)

I use two monitors and when the PC rebooted, after the update, the monitor mode had been switched to mirror monitors. I though OK, no problem. It is something that has happened before in the past and I thought that AMD Catalyst Control Center will give the solution. Unfortunately, even though I was using the AMD Catalyst Control Center (administrative version) it didn't save any changes and simply terminated. Each time.

So I tried to "kill my time" and watch a movie instead. I tried to cut and paste a movie to an external media center. No go. I didn't have write privs in the NTFS external HDD. That was new. It took a while (reading around the community forums etc) and I came to the conclusion that must be a policy problem. This triggered me and I thought that it might also be the solution to the ATI drivers problem.

Enough said (damn it was long)

I am rookie andI didn't want to mess around any /etc/ .... conf files, so i did it manually the "newbie" way. I suggest try it only since it might not be the solution to your problem. I believe the community and Canonical will provide solution to both problem in future updates. Until then we have to be operational at least.

ATI problem solution
Simply download the proprietary drivers form the system settings section and run the AMD Catalyst Control Center (administrative version) from terminal
$gksudo amdcccle

That's all. It will work just fine (use gksudo, not sudo since it is a GUI app).

NTFS mounts problem
The solution is seperated in two parts. Mounting and unmounting.

Mounting
First you will need to know which device to mount. To list the connected HDD devices type
$sudo fdisk -l

It will list several devices and their partitions. The format will like this:


Disk /dev/sda: 60.0 GB, 60022480896 bytes
255 heads, 63 sectors/track, 7297 cylinders, total 117231408 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00006d97


Device
Boot
Start
End
Blocks
Id
System
/dev/sda1
*
2048
391167
194560
83
Linux
/dev/sda2


393214
117229567
58418177
5
Extended
/dev/sda5


393216
16015359
7811072
83
Linux
/dev/sda6


16017408
113324031
48653312
83
Linux
/dev/sda7


113326080
117229567
1951744
82
Linux swap/SOlaris


/dev/sda is the device
The rest in the table are the partitions.

Type
$sudo mount .... partition to mount it.

Done.

Unmount
You' ll need same privs to unmount the devices mounted before.

First list the mounted devices. Type
$mount | grep /dev/
and the mounted devices will be highlighted. Find the one you want and then
$sudo umount [device]

That's all. 

Maybe fstab can be edited, but I am not in position to recommend it. I hope a near future update will deal with these problems.

Try it and I hope it will help. Additional info about Ubuntu device management can be found here.

Thursday, 10 November 2011

Various 802.11 Wireless Standards Research



Scope
The scope of this paper is to research through the IEEE 802.11 wireless standards identifying range, security, throughput, costs and the future prospects of this technology. Since the number of specifications, ratified and draft amendments to the 802.11 Prime is big, we will not include those that are addressed to manufacturers, and we will cover 802.11 a/b/g/n specifications (The book of wireless, p.32) referring to the rest necessary amendments for the security section only.
Introduction
IEEE 802.11 Wireless Standard defines the technology used for local area network (LAN) communications, using radio frequencies (RF). Institute of Electrical and Electronics Engineers (IEEE) is the professional society that creates and Maintains standards that we use for communications (CWNA, p. 154). The original IEEE 802.11 standard was published in
1999 and reaffirmed in 2003. The latest revision of the standard was published in 2007. The publication date of the specifications to be covered in this paper, are shown below:
  • IEEE Std 802.11-1999 (R2003)
  • IEEE Std 802.11a-1999
  • IEEE Std 802.11b-1999
  • IEEE Std 802.11g-2003
  • IEEE Std 802.11n-2009
(IEEE Std 802.11™-2007 Revision of IEEE Std 802.11-1999)
“IEEE specifically defines 802.11 technologies at the Physical layer and MAC sublayer of the Data-Link layer. By design, the 802.11 standard does not address the upper layers of the OSI model, although there are interactions between the 802.11 MAC layer and the upper layers for parameters such as quality of service”. (CWMA, p.155)
A brief comparison and overview of the IEEE 802.11 Legacy/a/b/g/n is shown below, in order to be used as a visual reference thoughout the rest of the paper.


802.11 Legacy
802.11 a
802.11 b
802.11 g
802.11 n
Frequency
2.4 GHz ISM band
5 GHz UNII-1, UNII-2 and UNII-3 bands
2.4 GHz ISM band
2.4 GHz ISM band
2.4 GHz ISM band – 5 GHz UNII band
Spread Spectrum Technology
FHSS or DSSS
OFDM
HR-DSSS
(PBCC is optional)
ERP:ERP-OFDM and
ERP-DSSS.CKK are mandatory

ERP-PBCC and DSSS-OFDM are optional
HT MIMO with OFDM.
HR-DSSS, OFDM, ERP.
Data Rates
1, 2 Mbps
6,12 and 24 Mbps are madnatory.
Also supported are 9, 18, 36, 48 and 54 Mbps.
DSSS:1, 2Mbps
HR-DSSS:5.5 and 11 Mbps
ERP-DSSS/CCK: 1,2, 5.5 and 11 Mbps
ERP-OFDM:6, 12 and 24 Mbps are mandatory
Also supported are 9, 18, 36, 48 and 54 Mbps.
ERP-PBCC:22 and 33 Mbps
Data rates vary from 6,5 Mbps to 600 Mbps due to different type of modulation and Channel width (20/40MHz)
(IEEE 802.11 n-2009 pages 345-354)
Backward Compatibility
N/A
None
802.11 DSSS only
802.11 HR-DSSS and 802.11 DSSS

(CWNA, p. 162, p.590 and IEEE 802.11 n-2009 pages 345-354)
Range
The coverage area of the standards above is related to the part of the spectrum they operate, the Radio Frequency behaviors of absorption, reflection, attenuation and multipath.
802.11a and 802.11n operate in 5 GHz Unlicensed National Information Infrastructure (UNII-USA) spectrum. On the other hand the 802.11 b/g/n (when operating in 2,4 GHz) operate in 2,4 GHz Industrial, Scientific and Medical (ISM) band. This means that 802.11 b/g/n (when operating in 2,4 GHz) suffer from less attenuation compared to the 5 GHz band, because of the longer wavelength. This allows signal to reach theoretically further. Table 2 shows the Attenuation Comparison of Materials for 2,4 GHz.
Material
2,4 GHz
Foundation wall
-15dB
Brick, concrete, concrete blocks
-15dB
Elevator or metal obstacle
-10dB
Metal Rack
-6dB
Drywall of Sheetrock
-3dB
Nontinted glass windows or door
-3dB
Wood door
-3dB
Cubicle wall
-2dB

Table 2. Attenuation Comparison of Materials (CWNA, p.47)
Moreover under the consideration that wireless networks are mostly used indoors, the RF behavior of absorption affects the coverage area. Further the 2,4 GHz band is not used exclusively by the 802.11 standards wireless devices, but it is used by other home appliances, as well as bluetooth devices. This means that there is danger of interference, since the channels may be already used, leading to loss of packets, which need to be resent for transmission to be acknowledged. This does not apply to the 5GHz band.
In addition, 802.11n standard multiple input-multiple output (MIMO) amendment to the standard allows it to take advantage of the reflection of waves in furniture, halls, corridors etc converting the multipath RF behavior form enemy to asset.
Outcome:
802.11 b/g/n (operating in the 2,4 GHz band) provide a larger coverage area comparing them to the ones operating under the 5 GHz band. They are even more effective when we have knowledge about the surrounding transmitting devices (home appliances and neighbor wireless devices) and the channels they operate. Channels 1-6-11 are recommended for the 2,4 GHz band because they do not interfere with one another. (The book of wireless, p.35) A practical coverage area for these standards should be estimated approximately to 17m (~50ft) (Wireless Networks for Dummies, p.30)
Security
802.11a/b standards where published in 1999 using the Wired Equivalent Privacy (WEP) as their cryptographic solution for security. WEP provides authentication, ensuring that information is accessible only to those authorized to have access and encryption, meaning that the data is intact and that no one has tampered with it, with 40 to 128 bit key length. It uses RC4 algorithm for confidentiality and CRC algorithm for integrity. CRC-32 is a hash function whose goal is to prevent accidental changes, but since no authentication exists for the AP any intentional intervention from an intruder is not detected. This makes WEP key insecure for replay attacks. Replays attacks are repeat transmission of valid data, previously intercepted by a valid user by a man-in-the-middle during a conversation. Replay attacks aim in gaining authentication credentials or session initialization messages.
Table 4. WEP key basic vulnerabilities
1
AP are not authenticated
2
There are patterns in the final key production making it predictable
3
Key is the same for all mobile nodes
4
Intentional intervention in packets is not detectable
5
Keys are not updated automatically
Result of the weaknesses above was the WPA (1.0 with TKIP and WPA 2 keys introduced with 802.11i in July 2004.
Even though compatibility issues have been taken under consideration, firmware updates are required to old devices, in order to implement the new directives of the 802.11i standard. However, such updates are not always an option, narrowing the security level.
Finally, 802.11 g/n standards have protection mechanisms that implement the backward compatibility with older devices, allowing Access Points to support different standards at the same time.
Throughput
Data rates for each of the standards are shown in Table 1. Even though these data rates are the theoretical speed they can give us a visual comparison for the throughput taking in consideration that the “aggregate throughput is typically one-half or less of the available data rate speed” (CWNA, p.156).
Moreover, it must be stated that protection mechanisms that for compatibility issues, allows the 802.11 b/g/n to coexist at the same time affects the throughput as well. “An 802.11 b/g access point with a data rate of 54 Mbps might see a decrease in aggregate throughput from 20Mbps down to as little as 8 Mbps the instant the protection mechanism is enabled.” (CWNA, p. 161)
Costs - Future prospects of this technology
Devices supporting IEEE 802.11b were the first to be widely accepted in market. Their success is shown in by the backward compatible standards IEEE 802.11g/n. It is obvious that new devices are more expensive and even though new standards offer improvements, they come with a price as well. The upgrade to new devices for companies depends on the value for money they offer and according to certain needs they cover, since it is part of a bigger plan that is affected by the current infrastructure.
Taking under consideration different scenarios and different variables such as compatibility, battery consumption for smartphones-tablets and data rates, devices that support different 802.11 standard can find their place in the market. For example 802.11b offers lower power consumption, but 802.11n devices, implement a new technology that offers more and better services with backward compatibility.
Trends so far have shown that it takes a while for a standard to gain its part in the market after it has been published. This gives time to older devices, while offering more time for testing and debugging the new ones.
Conclusion
Since there is no given scenario to which we must adapt our comparisons and provide a solid direction towards which standard is better, it must be stated that each IEEE 802.11 standard can be presented as the best solution according to certain given facts. We should filter our needs through the basic guidelines above, in order to reach to a conclusion.
References
    1. The book of Wireless 2nd Edition, John Ross, No Strach Press, 2008
    2. CWNA, Certified Wireless Network Administrator, Official Study Guide, David Coleman, David Westcott, Wiley 2009
    3. IEEE Std 802.11™-2007 (Revision of IEEE Std 802.11-1999) as found at http://standards.ieee.org/getieee802/download/802.11-2007.pdf on 30 Oct 2011.
    1. IEEE Std 802.11n™-2009 (Amendment to IEEE Std 802.11™-2007 as amended by IEEE Std 802.11k™ -2008, IEEE Std 802.11r™-2008, IEEE Std 802.11y™-2008, and IEEE Std 802.11w™-2009) as found at http://standards.ieee.org/getieee802/download/802.11n-2009.pdf on 30 Oct 2011.
    1. Wireless networks for Dummies, Barry D. Lweis, Peter T. Davis, Wiley, 2004

Raspberry pi - Introduction

Hello once again. This is the first of series of Raspberry pi related posts. I believe that the Raspberry pi (rpi from now on) can help u...