Monday, October 25, 2010

Using Alcatel X220L 3G modem with Linix

If you have an Alcatel x220l 3G modem here is how to get it woring with Linux.

You will need the usb-modeswitch package installed, wvdial is not required if you intend to use the NetworkManager applet:
apt-get install usb-modeswitch wvidial

create the following symbolic link:
ln -s  /etc/usb_modeswitch.d/1bbb\:f000  /etc/usb_modeswitch.d/alcatel_x220l
configure udev by creating this file
/etc/udev/rules.d/50-x220l.rules
with the following content:
SUBSYSTEM=="usb", SYSFS{idVendor}=="1bbb", SYSFS{idProduct}=="f000", RUN+="/usr/sbin/usb_modeswitch -c /etc/usb_modeswitch.d/alcatel_x220l"
SUBSYSTEM=="usb", SYSFS{idVendor}=="1bbb", SYSFS{idProduct}=="0017", RUN+="/sbin/modprobe usbserial vendor=0x1bbb product=0x0017"

service udev reload
Now you should have a functional modem device at /dev/ttyUSB4.
The easiest way to get your internet connection up is to configure wvdial. The following parameters are used by the Vivacom network but configuration is pretty much the same for all operators (only Init2, username and passwords differ). Put in /etc/wvdial.conf the following:
[Dialer Defaults]
Modem = /dev/ttyUSB4
ISDN = 0
Modem Type = Analog Modem
Baud = 460800
Init1 = ATZ
Init2 = at+cgdcont=1,"IP","vivacom.bg"
Phone = *99#
Dial Attempts = 5
Stupid Mode = on
Dial Command = ATDT
Idle Seconds = 7200
Ask Passwords = 0
Password = "vivacom"
Username = "vivacom"
Carrier Check = on
New PPPD = 1
Auto DNS = on

Friday, October 1, 2010

Free internet access scripts - resume of developement

Continuing the post about the collection of scripts for using free Internet access here are some updates.
Firstly the scripts for collecting and spofing MAC and IP adresses in a LAN have new location. Here is a link for the package containing both python and perl versions  http://9mhz.info/fisp-0.3.1.tar.gz

A new version will be released soon. Planned features include  MySQL support and some heuristics for choosing which MAC address will be picked up for assignment.  Entry appearance patterns will be applied for some IP-MAC pairs like 'business hours only' etc.

Friday, September 24, 2010

Find the location of a GSM cell tower by CellID

There are several sites [1] where you can look up the geographical coordinates of a GSM tower based on its CellID, MCC (Mobile Country Code), MNC (Mobile Network Code) and LAC (Location Area Code). The problem with these sites is that their databases are filled by volunteers and the coverage is at almost useless level. However it seems that companies like Google and Nokia have their own databases used in conjunction with their maps applications which are astonishingly accurate and complete.
So the question is how to (if possible) get information form these databases for personal use.

The answer is:  www.9mhz.info
You can use this site to get the location information of a cell tower. This page uses the Google maps database and shows the location on the map.

Friday, September 10, 2010

How to check the cell ID on Nokia phones

Here is a snip from the Nokia AT command description document regarding the CellID and signal level parameters:

AT+CREG=2
OK
AT+CREG?
+CREG: 2,1,"1030","639E"


The returned values are as follows:
"2" reflects the current "+CREG" setting (2 means "Enables unexpected network
registration and location information messages" )
"1" indicates that the phone is registered with the network
"1030" is the Location Area Code (LAC) in hex (4144 decimal)
"639E" is the CellID (CI) in hex (25502 decimal).


AT+CSQ
+CSQ: 13,99


Returns:
13 = signal level, 99 = bit error rate unknown.

Monday, August 23, 2010

Logitech QuickCam

046d:08f0 Logitech, Inc. QuickCam Messenger with Ubuntu Lucid:

1. Edit /etc/modprobe.d/blacklist.conf and add:


blacklist gspca_stv06xx
blacklist gspca_main


2. Execute:


rmmod gspca_stv06xx
rmmod gspca_main


3. Execute:


rmmod quickcam_messenger
modprobe quickcam_messenger brightness=10000 hue=10000 contrast=10000 whiteness=10000

Tuesday, May 12, 2009

3D acceleration with i965

Optimizing the performance of an Intel 965 graphics card could be a tricky job. The problem gets bigger if you want to use Compiz and have to use the 3D acceleration. There are three available acceleration methods for Intel cards: the old 'XAA', the stable 'EXA' and the not-ready-yet 'UXA'. I found that the default settings give rather poor performance in Unbuntu Jaunty and the result from glxgears was ~480 FPS. With the following settings in xorg.conf I was able to get 750 FPS.


Section "Device"
Identifier "Configured Video Device"
Option "AccelMethod" "EXA"
Option "MigrationHeuristic" "greedy"
Option "ExaNoComposite" "false"
EndSection


Also setting this variable in /etc/environment seems to help as well:

INTEL_BATCH="1"

Thursday, May 7, 2009

Disable frequent hard disk spindown in Ubuntu

By default the hdparm settings in Ubuntu are not hardware friendly so some tuning might be needed to adjust your hard disc parameters. Example for this is the Load_Cycle_Count counter which usually gets increased once in a minute without heavy disc usage. Most of the manufacturers construct their disks with MTBF of 300,000 load cycles, so you might reach it within one year. You don't want to buy a new HDD once a year, don't you? Here is a fix.

Edit /etc/hdparm.conf and add the following section (replace /dev/sda with your actual device):

/dev/sda {
apm=254
spindown_time = 242
read_ahead_sect = 2
keep_settings_over_reset = on
}