pcapstreamer – A packet dumper
Hi guys,
Happy Holidays!!
This year is about to finish, thinking about this year, lot of things happened, love, break-up, home, health, mother, father, work and more importently passion. Well, all is well and life is moving ahead. Still I’m travelling alone, in my own path. (What the hell am I, this is suppose to be technical post, shit!! crap philosophy!!)
I got some free time and spent that time learning libpcap. For those who don’t know, it is used in most of the network monitoring/capturing tools in *nix world. Very powerful.
The ‘tcpdump(1)‘ command is one such tool which uses libpcap (actually they are the one who created libpcap from tcpdump) to dump information about packets. It has a robest filtering mechanism to narrow down packet capturing to specific packets.
While trying to understand filter expressions in tcpdump, I got an Idea, I thought why not just convert the bytes in packets to strings and print them in stdout, this way, we can see the exact bytes, so further processing can be done my other unix tools (like awk, perl etc.,).
So, I just wrote a tool called ‘pcapstreamer‘ to capture packets from linux’s ‘any’ psudo-interface. Its very simple tool, you need to run this tool as root user. It just dump packets, thats all. Here is an example, this shows one packet dumped into stdout.
$ sudo ./pcapstreamer [cl:76 l:76 t:20111226085033.641612] 00000000 00000000 00000011 00000100 00000000 00000110 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00001000 00000000 01000101 00000000 00000000 00111100 01000111 10001100 01000000 00000000 01000000 00000110 11110101 00101101 01111111 00000000 00000000 00000001 01111111 00000000 00000000 00000001 11100101 01100011 00010101 10110011 01111000 00011101 00100110 01010100 00000000 00000000 00000000 00000000 10100000 00000010 10000000 00011000 11111110 00110000 00000000 00000000 00000010 00000100 01000000 00001100 00000100 00000010 00001000 00001010 00000000 10100010 01100001 11011000 00000000 00000000 00000000 00000000 00000001 00000011 00000011 00000101
Here ‘cl:76′ and ‘l:76′ indicates ‘captured length’, ‘t:20111226085033.641612′ indicates ‘timestamp’ in localtime. Other strings are just pure raw packet.
Linux Cooked Header
To understand first 16 bytes, we need to understand ‘Linux Cooked Header‘. First 2 bytes “00000000 00000000′ or “0×00″ represents that this is an incoming packet. To understand the next 2 bytes, we need to refer linux’s ARPHRD_. 3rd and 4th bytes “00000011 00000100″ or “decimal 772″ indicates that this packet is coming into loopback interface. 5th and 6th bytes “00000000 00000110″ or “0×0006″ indicates the length of link-level address, the next 8 bytes (7th byte to 14th byte) represents the link-level address, however we should take only the next 6 bytes as link-level address, two more bytes (13th and 14th) are padded with zero. 15th and 16th bytes “00000000 00001000″ or “0×0008″ represents ‘ethertype‘ as ‘ip’, this tells us that this is an ‘ip’ packet. This ends the link-level header (data-link layer in OSI). We are now moving to ‘ip’ header (network layer in OSI)
IP Header
To understand details from 17th byte to 36th byte, we need to refer IP Header. Higher order 4 bits in 17th byte “0100″ or “0×4″ indicates that this ip packet is an ipv4 packet. Lower order 4 bits in 17th byte “0101″ or “0×5″ indicates IHL (Internet Header Length) usually this defaults to 5. 18th bytes represents ‘differentiated services’ usually 0. 19th and 20th bytes “00000000 00111100″ or “0x003c” or “Decimal 60″ represents remaining bytes count (CaptureLength minus Linux-Cooked-Header length). 21st and 22nd bytes “01000111 10001100″ indicates identification. Higher order 3 bits in 23rd and 24th bytes “010″ indicates that this packet is not fragmented, remaining 13 bits indicates fragment offset. 25th byte “01000000″ or “0×40″ or “Decimal 64″ indicates TTL value. 26th byte “00000110″ or “0×06″ indicates that this is a ‘tcp’ packet. 27th and 28th packets indicates Header Checksum. 29th to 32nd bytes indicates source ip address (127.0.0.1) and 33rd to 36th byte indicates destination ip address (127.0.0.1). This ends the ‘ip header’, we are now moving to ‘tcp’ header (Transport layer in OSI).
TCP Header
To understand details from 37th byte to 76th byte, we need to refer ‘TCP Header‘. 37th and 38th bytes “11100101 01100011″ or “decimal 58723″ indicates the source port number. 39th and 40th bytes “00010101 10110011″ or “decimal 5555″ indicates destination port number (means incoming packet is trying to connect port 5555). 41st to 44th byte indicates sequence number and 45th to 48th byte indicates sequence acknowledgement number. Higher order 4 bits in 49th and 50th byte “1010″ or “Decimal 10″ indicates Data offset, means there are 10*4=40 bytes in TCP header. Next 3 higher order bits are reserved in 49th byte 50th byte. Next 3 bits indicates ECN. Next 6 bits “000010″ or “0×02″ indicates that ‘SYN’ flag was set in Control bits. 51st and 52 bytes indicates window size, means the sender is willing to accept “10000000 00011000″ or “decimal 32792″ bytes in the response packet. 53rd and 54th bytes indicates checksum. 55th and 56th bytes indicates Urgent pointer, usually 0.
Options
Inside TCP header, bytes 57 to 76 contains value based on 50th byte(Data Offset). In this particular packet, 50th byte has (0xa), which means, TCP header in this packet contains totally 40bytes. Mandatory TCP fields (from 37th byte to 56th byte) are already discussed, but we have 20 more bytes to decode, these bytes are represented as ‘Options’ in TCP header. They may occur or they may not occur in a TCP packet. Mostly they occur in SYN packet.
Here, 57th byte (0×02) represents option-kind, 58th byte represents option-length (0×04). Both 57th and 58th bytes represents that 59th and 60th bytes “01000000 00001100″ or “0x400c” or “Decimal 16396″ indicates “Maximum Segment Size“. 61st byte (0×04) represents option-kind, 62nd byte (0×02) represents option-length, both bytes represents “SACK permitted“. 63rd byte (0×08) represents option-kind, 64th byte (0x0a) represents option-length, both bytes indicates that from 65th byte to 68th byte contains ‘TSVal‘ and from 69th byte to 72nd byte contains ‘TSecr‘. 73rd byte “0×01″ indicates option-kind as ‘No-Operation‘, 74th byte (0×03) indicates option-kind, 75 byte indicates (0×03) option-length, both bytes indicates that 76th byte (0×05) contains ‘WSOpt (Window Scale Option)‘, which means, the host which sent this packet can accept upto “32792 * (2^5)” or (windowsize[byte51&52] * (2^wsopt[byte76])) before sending ACK.
pcapstreamer with awk
To display only ICMP packets, we can use the following commandline
$ sudo ./pcapstreamer 2>/dev/null | awk '{if($26 ~ "00000001"){print $0;}}'
To display only SYN packets, we can use the following commandline
$ sudo ./pcapstreamer 2>/dev/null | awk '{ctrlbytes=$49$50; if(ctrlbytes ~ "^.......000010...$"){print $0;}}'
I hope this utility may be useful for newbies like me to learn networking. Have a great new year.
Systemd for Simple Backup
Hi,
Nice to get back, Recently switched to F15. Wow!! my userland changed heavily. Previously, its very simple things like,
SysVinit for booting
Udev for devices
pppconfig for Network
Xfce for GUI
ALSA for sound
ffmpeg & mplayer for video
Now,
Systemd for booting, daemons
Udev, DBus, UDisks for devices
ModemManager+NetworkManager for Network
Gnome3 for GUI
PulseAudio+ALSA for sound
GStreamer+totem for video
These Technologies are very interesting to learn. I’m not going to explain about each. But, I went through systemd and came up with a solution for my backup problem.
Backup Problem:
While in its last phase, my previous laptop teached me the importance of external backup disks. So, I bought an external 512GB Segate, and backed-up /home/${HOME} tree. It helped me to quickly get back my files to F15. However, one problem is, maintaining my backup. I thought If I plug my external drive, someone should automatically copy all the new files resides in my current /home/${HOME} in F15 to that drive. There are lot of ways to do it. I can think of two main ways,
* Write an udev rule to call a script which will mount that external backup partition and rsync /home/${HOME} in F15 to that external partition. Pros: Fairly straight forward, udevrulefile+rsyncscript will do it. Cons: No control, this will copy every time udev detects that external drive. If there is lot of files to copy, then this will make a mess.
* Use systemd to call a script whenever that external backup partition gets mounted. Pros: You have full control, create a backup.service for systemd, create backup.bash to rsync /home/${HOME} to backup disk. Enable that service in systemd to automatically do rsync, or just load that service to systemd and only start that service If you want to backup your files. Cons: Need to pass one more layer to run the actual rsync script.
So, I took-up systemd
There are lot of ways you can trigger your service in systemd. Also, you can depend on another systemd unit to trigger your service. In this case, I depend on a mount unit to trigger my backup.service. This service, in-turn, will trigger backup.sh script.
To define a systemd unit, you need to know what type of unit you want to create. Currently there are 10 types of units systemd can understand [read systemd.unit(5)]. For backup job, I used two type units, one is systemd.mount(5) amd systemd.service(5). If you go through systemd.mount(5) you will understand that systemd will automatically load this units whenever systemd saw a block device. So, systemd will automatically provide ‘media-ExternalBackupPartition.mount’ whenever I insert my external hard disk . I only need to define the next unit, backup.service for systemd.
Note: There is a story behind the name ‘media-ExternalBackupPartition’. I’ll tell you at the end of this post. Lets just continue with systemd for now.
To define a unit for systemd, you need to create a file as /etc/systemd/system/name.unit; (for my backup problem, unit file is /etc/systemd/system/backup.service). Here ‘name’, may be anything relevent to your job and ‘unit’ must be one of ‘service’, ‘socket’, ‘device’, ‘mount’, ‘automount’, ‘swap’, ‘target’, ‘path’, ‘timer’ and ‘snapshot’. Read systemd.unit(5) man pages for more precise information.
Unit Class:
Unit definition files contains information in .ini format. One of the class ‘[Unit]‘ must exist in every unit file. Here is the [Unit] class for backup.service
[Unit] Description='sync my files with external backup drive' Requires=media-ExternalBackupPartition.mount After=media-ExternalBackupPartition.mount
Here ‘Description’ is a general description for your service. We need to put the required unit which will trigger this new unit in ‘Requires’ field. Systemd will run this unit once all the units in ‘Requires’ fields satisfied. We can call these ‘Requires’ units as parent units, and your unit as child. However, systemd will not wait for parent units to complete to run child unit. We need to explicitly ask systemd to wait for parent units to complete, For this purpose we have ‘After’ field. If you define which parent unit needs to be completed before your child unit could run, you need to mention it in ‘After’ field.
For my backup.service child unit, ‘media-ExternalBackupPartition.mount’ unit must be satisfied in systemd. That means, my external HD partition must be mounted inside ‘/media/ExternalBackupPartition’ path. Also, Using ‘After=’ field, I instructed systemd, not to start this child unit before ‘mount-ExternalBackupPartition.mount’ finishes.
Service Class:
Now we need to define what to do once the requirements satisfies. For that purpose, we need to define ‘[Service]‘ class, Here is the service class for backup.service,
[Service] Type=simple ExecStart=/home/mohan/Development/scripts/backup.sh
This ‘[Service]‘ class is specific to ‘systemd.service’ units. Here, ‘ExecStart=/home/mohan/Development/scripts/backup.sh’ asks systemd to run ‘backup.sh’ whenever ‘backup.service’ satisfies. You can do lot of customization to setup the execution environment before start running any commands, such as log redirection, demonizing etc., there are lot of fields to use in ‘[Service]‘ class, but I simply used ‘Type=simple’ to tell systemd, that no need to do any change in execution environment. The script ‘backup.sh’ will take care of all the redirection within itself.
Install Class:
In SysV init system, we use ‘chkconfig (redhat/fedora)’ or ‘update-rc.d (debian)’ to enable or disable a service. In systemd, we use this ‘[Install]‘ class to enable or disable our ‘backup.service’ unit so that it will work even after a restart. Here is install class for backup.service,
[Install] WantedBy=media-ExternalBackupPartition.mount
In systemd, enabling a service means, adding a symlink to ‘/etc/systemd/system/name.service.wants/’ directory. disabling a service means, removing that symlink. ‘systemctl’ command can do this add/remove symlink automatically when we call it with ‘systemctl enable backup.service’ or ‘systemctl disable backup.service’, but we need to say the parent unit name, thats why we have this ‘[Install]‘ class. Simply, we need to mention that parent unit in ‘WantedBy=’ field.
Execution:
Once the unit files are ready, we need to enable them into systemd. For backup.service, I executed following commands to setup the service
$ sudo cp ~/backup.service /etc/systemd/system/backup.service $ sudo systemctl daemon-reload
I just copied backup.service unit file to systemd’s location and asked systemd to reload unit definitions. Now we can check if things loaded properly or not using following command,
$ sudo systemctl status backup.service
backup.service - 'sync my files with external backup drive'
Loaded: loaded (/etc/systemd/system/backup.service)
Active: inactive (dead)
CGroup: name=systemd:/system/backup.service
$
systemd will say ‘Loaded : error’ if it can’t understand any defnintion in backup.service or if it can’t satisfy the definitions. Otherwise we can start this service using following command, we need to make sure the final rsync script ‘backup.sh’ exists in the location pointed by ‘ExecStart=’ field.
$ sudo systemctl start backup.service
This will start syncing new files to External backup HD drive, only when It is plugged-in and mounted. Otherwise, the service will fail. you can check the status again using ‘systemctl status’. Once you checked that the service is working as intended, we can enable this service (I mean, creating symlinks) using following command,
$ sudo systemctl enable backup.service
We can verify the symlink as below to make sure parent-child linking is done correctly.
$ ls -l /etc/systemd/system/media-ExternalBackupPartition.mount.wants/baskup.service lrwxrwxrwx 1 root root 34 Nov 9 02:08 /etc/systemd/system/media-ExternalBackupPartition.mount.wants/backup.service -> /etc/systemd/system/backup.service
If we don’t want to copy automatically, we can disable it using below command,
$ sudo systemctl disable backup.service
Even If the service is disabled, you can start/stop the service. Systemd will recognize the backup.service, check it’s dependencies and execute ‘backup.sh’ correctly.
media-ExternalBackupPartition.mount:
As I already said, systemd will automatically create units using udev, so when my external HD plugs-in, udev will tell to udisks that a new partition is available, then udisks will mount that partition inside ‘/media/uuid’ location, then systemd will create a unit as ‘media-uuid.mount’(systemd uses ‘-’ instead of ‘/’ for path seperation). But specifying ‘Requires=media-uuid.mount’ inside backup.service file is not working. Thus, I used a simple udev rule to rename udisk’s mount path, here is the rule file,
$ cat 99-rename-udisk-mountpoint.rules
ENV{ID_FS_UUID}=="251c683d-bce0-489c-aab5-f684a9a1f3b2",ENV{ID_FS_UUID}="ExternalBackupPartition"
$ sudo cp ~/99-rename-udisk-mountpoint.rules /etc/udev/rules.d
This above two commands, will modify udisk’s mount path to ‘/media/ExternalBackupPartition’ instead of ‘/media/251c683d-bce0-489c-aab5-f684a9a1f3b2′, thus systemd will automatically create ‘media-ExternalBackupPartition.mount’ instead of ‘media-251c683d-bce0-489c-aab5-f684a9a1f3b2.mount’
Finally, Thanks for reaching this line. I hope this long boring article will help you to understand something about systemd.
backup.service, backup.sh and 99-rename-udisk-mountpoint.rules files are available in github.
Creating Fedora DVD Repo
Hi,
Its almost 1 year since my last post, what happens to me? It a 1 year story to say. But in short, my laptop became older and eventually went down. Graphics card gone. It took a while for me to buy another new one. Here I am.
In between lot thing happened, Something I just wanted to post, but now I can’t remember them. As a fresh start, This is what happened when I got my new ‘Samsung Notebook’. Ordered through FlipKart and got it by last week.
I know that I can’t get Internet because I cancelled my netconnect+ subscription way back when my previous lappy started giving troubles. Thus, My beloved debian is out of reach. So, I decided to get Fedora or Mint DVD from someone and Install it. Thanks to Srini, Amachu and his Gang, for providing Fedora DVD to me. Installation went smoothly and for the first time, I’m in Gnome3,
Installation went smoothly and to my surprise, no more tinkering on mobile modem. Thanks to those guys who created profile for Aircel. At first, bluetooth daemon didn’t start, googled and fixed it.
While playing with Gnome3, I thought of using installation DVD as my repo, because I have limited network with very little speed, It would be better to use existing DVD as my repo. So, that starts my hunger and this is how I ended.
1. Inserted my DVD and monitored how my DVD is mounting. Seems ‘org.freedesktop.UDisks’ takes care of mounting and it always mount my DVD inside ‘/media’ folder taking mount directory name from ‘ENV{ID_FS_LABEL_ENC}” Udev environment variable. I came to know that yum is facing some trouble If I have a ‘fedora-dvd.repo’ file like below under ‘/etc/yum/yum.repos.d’ directory,
[fedora-dvd] name=Fedora DVD $releasever - $basearch baseurl=file:///media/Fedora 15 i386 DVD enabled=1 gpgcheck=1 gpgkey=file:///media/Fedora 15 i386 DVD/RPM-GPG-KEY-fedora-$basearch
So, it seems yum cannot handle white-space in URI. Then, I decided to write a Udev rule to rename ‘Fedora 15 i386 DVD’ to ‘Fedora15i386DVD’, So that ‘org.freedesktop.UDisks’ will mount it as ‘file:///media/Fedora15i386DVD’. Here is the rule file
$ cat /etc/udev/rules.d/99-rename-fedora-dvd.rules
ENV{ID_FS_LABEL_ENC}=="Fedora\x2015\x20i386\x20DVD", ENV{ID_FS_LABEL_ENC}="Fedora15i386DVD"
$
Then, I recreated fedora-dvd.repo as below
$ cat /etc/yum.repos.d/fedora-dvd.repo [fedora-dvd] name=Fedora DVD $releasever - $basearch baseurl=file:///media/Fedora15i386DVD enabled=1 gpgcheck=1 gpgkey=file:///media/Fedora15i386DVD/RPM-GPG-KEY-fedora-$basearch $
One of the main reason to add this ‘Fedora15i386DVD’ repo is to install development tools without internet. In a way it is more useful than a plain LiveCD.
Don’t forget to insert Fedora DVD If you follow this setup and want to install something from Fedora DVD. A little google tells me that there are lot of ways to achieve this DVD-to-Repo thing in Fedora, I’m relatively new to Fedora, I will learn as I move on.
Howto bake Persistent Live USB – Debian Way (live-build)
Hey guys!! wish you happy festive days!!
For long time I was thinking about creating my own system. Recently, during my experiment with ‘mic2′, I came to know about ‘live-build’ package.
‘mic2′ is a package which contains tools to create Meego images. I’m yet to create my Meego Image. During Meego image creation, I had lot to do with my USB pendrive. My pendrive previously had puppy for system rescue purpose. After spending much time with Meego without any success, I thought of creating my rescue USB by downloading puppy. But decided to give ‘live-build’ a try.
First we need to install ‘live-build’
sudo apt-get install live-build cdebootstrap
‘live-build’ is a set of scripts to build customized debian iso/usb-hdd images. I’m not going to explain each scripts, instead, just lets start building a Debian Persistant Live USB with ‘rescue’ packages from ‘Testing’ repository for ‘i386′ architecture. My host system is ‘Debian Testing (amd64)’ Here is the steps,
Create a directory and go inside
mkdir live-build-base && cd live-build-base
Execute below command
sudo lb config --architecture i386 --binary-images usb-hdd --binary-filesystem fat32 --bootappend-live 'persistent' --bootstrap cdebootstrap --distribution testing --mirror-binary http://ftp.de.debian.org/debian/ --packages 'usb-modeswitch' --packages-lists 'rescue'
This tells ‘–architecture’ for the live system should be ‘i386′, you can give any of debian ports like ‘amd64′, ‘sparc’, ‘powerpc’, ‘armel’, ‘hurd-i386′, ‘kfreebsd-gnu’ etc., to this option. But careful, we are not using qemu to build the image. we are using cdebootstrap, thus, an ‘amd64′ host system can bake ‘amd64′, ‘i386′, ‘hurd-i386′, ‘kfreebsd-gnu’ images, but it cannot bake ‘armel’, ‘sparc’ or ‘powerpc’.
The next option ‘–binary-images’ tells what kind of image to create, like ‘iso’ or ‘iso-hybrid’ or ‘usb-hdd’ etc., (see ‘man lb_config’). Next option ‘–binary-filesystem’ tells the format of the final root filesystem.
Next one ‘–bootappend-live’ passes options to ‘live-initramfs’ which is the main tool to create live debian system, see ‘man live-initramfs’ to know about its options. ‘persistent’ informs ‘live-initramfs’ to generate ‘initrd’ image which will search for partitions with label ‘live-rw’ or ‘home-rw’ at boot time, if ‘initrd’ finds, it will instruct ‘aufs’ to stage that partition as a rw layer for root filesystem.
‘–bootstrap cdebootstrap’ will use ‘cdebootstrap’ while creating the image. you should install ‘cdebootstrap’ in your host system first.
‘–distribution testing’ indicates which repo to download packages, you can give ‘stable’, ‘unstable’, ‘testing’, ‘experimental’, ‘lenny’, ‘squeeze’, ‘sid’ and ‘wheezy’.
‘–mirror-binary’ points to the repo URL
‘–packages usb-modeswitch’ will additionally install ‘usb-modeswitch’ package. I need this, because I’m using a netconnect datacard for internet access.
‘–packages-list rescue’ will get packages from /usr/share/live/build/lists/rescue file. This file is preconfigured to install specific packages for specific purpose, we can give ‘rescue’, ‘gnome’, ‘kde’, ‘gnustep’, ‘lxde’, ‘studio’ etc., each have a corresponding file inside /usr/share/live/build/lists directory in your host system.
Above options prepares ‘live-build-base’ directory to build your customized debian. Now, its time to build, execute the below command,
sudo lb build
Once started, ‘lb build’ will take some time to bake the required image. Finally, you will get ‘build.img’ with all your customized packages installed. Next step should be dd-ing the image to your USB pendrive. Insert it, and execute the following command,
sudo dd if=build.img of=/dev/sdX bs=4096
Here, ‘/dev/sdX’ indicates your loaded pendrive name, it may be ‘/dev/sdb’ or ‘/dev/sdc’. Once ‘dd’ finishes, reboot your system and boot from your USB pendrive. You will be inside ‘Debian Live’ !!!!
Next, we need to create ‘live-rw’ partition in your pendrive for persistent storage (means automatically saving the changes you do in your live system). Just create a partition with label as ‘live-rw’ from the free space left in your pendrive using ‘gparted’ or ‘fdisk’. Then boot your machine from USB drive, once you are inside ‘Debian Live’, you can see the new partition mounded as ‘aufs’ rw layer for root filesystem in /live/cow.
During ‘lb build’ phase, if any error occurs, or you decide to change your configuration, remove all directories except ‘cache’ from ‘live-build-base’ directory. Then remove ‘.stage’ directory and start ‘lb config’ with your options again from ‘live-build-base’ directory. This will reduce package download time, but if you are building for different architecture, then its better to delete ‘cache’ also. Here is the screenshot of my image running under QEMU,
Thats it!! hope you will bake a better ‘Debian Live cake’ than me!!!
Milana (2007) – From a Tamil Fan
Declaimer: By no means this is a review. This is how I came to know about this movie and enjoyed.
One of my best friend (he is from mysore) had that song as his ringtone at that time when milana was released. Its so catchy, that whenever I was bored, I would go to his desk and start listening to that song. Yes, I’m talking about “Ninnindale..”
Now, I’m in different place and my friend is in different place. recently I spoke with him, suddenly my mind ( What!!!??? isn’t my heart?? ) thought just get that song and have it in my mobile. Also I saw lot of positive reviews and massive statistics (100 days.. 200.. days in Bengaluru PVR.. don’t know the exact statistics mate!!). Even though my relatives are in Bengaluru, I didn’t get a chance to watch a kannada movie. This is the one which I watched for the first time.
His sharp face and uncombed hair ( Is it his trademark appearance? ) first gave some different opinion about Puneet Rajkumar, But his performance as Akash, showed how good he is, as a Actor. Be it as a Son, a Mirchi RJ, Husband, Friend, Fighter, Dancer everything, shows the capabilities of a mass hero( is he already? I see he is called ‘Power Star’, but nowadays every star have a subname!!). I hope he should not develop any style pattern like many stars in south. He should act for directors.
Like Akash, his wife Anjali (Parvathi menon) who ask divorce in her first night, steal some important scenes as a good Actress (Yaepulla ‘Maari’, neeiya idhu, romba alaga iruka pulla). Her cute face expressions especially when she get angry because of akash’s Bred & Jam flirt, indicates a good chemistry between both ( is there any gosip in KFI about them? I came to know that they had another big hit, Prithvi..). Later at the end, when she suffer because ‘Akash’ didn’t realize her love, makes a real beautiful love story.
Here some scenes which I like most, Thanks to Google, Firefox, Ffmpeg and Avimerge helping me to come up with this video. It may not be professional, But this one born from a Terminal (Unusual place.. isn’t it?? you will understand my question if you are a professional editor)
On the whole, This movie shows how good a family, friendship and love can bring happiness to a person”s life. Really!! Its a great movie to watch. Mano Moorthy’s Songs and Background Music will capture anyone’s heart!! I enjoyed every frame!!! Thanks to Director Prakash and the whole team for this wonderful movie.
Somebody pleeeasssseeee!!!!! bring this movie to Kollywood!!!!
Reliance Netconnect Broadband+ on Debian
Hey guys, I’m back after a looooonnnnngggggggg…. gap… :-)
Well, living without internet is something different. I experienced how a mobile with 2-12 KB/s will serve a person. You will get very much happy if it touches 12 KB/s.
But now.., Wow !!! I’m connected again !!! with good speed… here is the story.
Recently I moved from suburb to inner city. So, its time to get all my regular activities back into track. For that to happen, I need a good internet connection, like the one which I enjoyed from BSNL Broadband. But now, the problem is, I can’t get a wired broadband as I’m currently staying in a mansion. So only choice is, to go for USB modem. Already I had a bitter experience with Photon+, so I considered other offers and found some +ve reviews about Netconnect. So, I decided to go for it.
I called one of the reseller in nungambakkam, within 4 hours a guy(lokesh) appeared before me with the Card ( Huawei Technologies Co., Ltd. EC1260 Wireless Data Modem HSD USB Card) and some forms. We discussed about support for linux. He said that he heard from someone that the card was working in linux ( I think I’m the first linux customer to him). I googled a lot, There are lot of ubuntu stuffs related to netconnect. So I’m pretty confident that it will work in linux. Applied for it and got the card.
Tinkering starts here, At first, when I plugged it into my laptop, debian realized it as a scsi storage and loaded it as one of my DVD drive (/dev/sr0). Then I came to know that it was a switchable USB device. Obviously, *nix guys always have a solution for a popular problem. Here is one of the popular problem and the solutions is,
# aptitude install usb-modeswitch
usb-modeswitch takes care of switching these kind of devices to USB modems so that udev will load proper modules into kernel. Once you installed usb-modeswitch, you can see the following messages appear in /var/log/syslog when you plug-in the device,
New USB device found, idVendor=12d1, idProduct=1446 New USB device strings: Mfr=1, Product=2, SerialNumber=4 Product: HUAWEI Mobile Manufacturer: HUA�WEI TECHNOLOGIES SerialNumber: ������������������� configuration #1 chosen from 1 choice kernel: [10337.323907] scsi8 : SCSI emulation for USB Mass Storage devices kernel: [10337.367370] usb-storage: device found at 4 kernel: [10337.367379] usb-storage: waiting for device to settle before scanning usb_modeswitch: switching 12d1:1446 (HUA�WEI TECHNOLOGIES: HUAWEI Mobile) USB disconnect, address 4 new full speed USB device using ohci_hcd and address 5 New USB device found, idVendor=12d1, idProduct=140b New USB device strings: Mfr=1, Product=2, SerialNumber=4 Product: HUAWEI Mobile Manufacturer: HUA�WEI TECHNOLOGIES SerialNumber: ������������������� configuration #1 chosen from 1 choice GSM modem (1-port) converter detected GSM modem (1-port) converter now attached to ttyUSB0 GSM modem (1-port) converter detected GSM modem (1-port) converter now attached to ttyUSB1 GSM modem (1-port) converter detected GSM modem (1-port) converter now attached to ttyUSB2 registered new interface driver option v0.7.2:USB Driver for GSM modems
Now its time to dial, since I’m using Debian, I have two options, one is ‘wvdial’ and the other one is ‘pppconfig + pon + poff’. I’m already a fan of pppconfig. So decided to create a profile using pppconfig. Here is my peers file,
# This optionfile was generated by pppconfig 2.3.18. # # hide-password noauth connect "/usr/sbin/chat -v -f /etc/chatscripts/netconnect" debug /dev/ttyUSB0 115200 defaultroute noipdefault user "xxxxxxxxxx" # fill your MDN number without the leading 0 (10 digit) remotename netconnect ipparam netconnect usepeerdns novjccomp
and here is my chatscript
# This chatfile was generated by pppconfig 2.3.18. # Please do not delete any of the comments. Pppconfig needs them. # # ispauth PAP # abortstring ABORT BUSY ABORT 'NO CARRIER' ABORT VOICE ABORT 'NO DIALTONE' ABORT 'NO DIAL TONE' ABORT 'NO ANSWER' ABORT DELAYED # modeminit '' ATZ # ispnumber OK-AT-OK "ATDT#777" # ispconnect CONNECT \d\c # prelogin # ispname # isppassword # postlogin # end of pppconfig stuff
Here is how you can generate your settings files using ‘pppconfig’
- Give a good name to your PPP profile (from here, I’ll refer this name as profilename)
- Choose dynamic DNS
- Choose PAP Authendication
- Give your MDN number without the leading 0 (10 digit) as your Username
- Give Password same as Username
- Choose default speed (115200)
- Choose ‘Tone’ dialing method
- Give #777 as the Phone Number to Dial ISP.
- Choose ‘No’ for modem detection and give /dev/ttyUSB0 as your modem
- Verify your settings and save. These settings will be saved in /etc/ppp/peers/profilename and /etc/chatscripts/profilename
Once you are done with the above steps, all you need to do is, start pppd using ‘pon’
[root@Debian ~] # pon profilename
Here comes the trickiest part in my experiment. One of the worst thing about Netconnect is, Reliance server will never respond to your packets untill you activate the device from “F***in W**dows !!!!!”. If your device is not activated, your pppd with cry and die with the following messages.
pppd 2.4.4 started by root, uid 0 Serial connection established. using channel 4 Using interface ppp1 Connect: ppp0 /dev/ttyUSB0 sent [LCP ConfReq id=0x1 ] sent [LCP ConfReq id=0x1 ] sent [LCP ConfReq id=0x1 ] sent [LCP ConfReq id=0x1 ] sent [LCP ConfReq id=0x1 ] sent [LCP ConfReq id=0x1 ] sent [LCP ConfReq id=0x1 ] sent [LCP ConfReq id=0x1 ] sent [LCP ConfReq id=0x1 ] sent [LCP ConfReq id=0x1 ] LCP: timeout sending Config-Requests Connection terminated. Receive serial link is not 8-bit clean: Problem: all had bit 7 set to 0 Hangup (SIGHUP) Modem hangup Exit.
Thankfully one of my new friend who is running a browsing center nearby helped me to activate the device from his windows machine. There are some steps to be followed to activate in Windows, Call the Reliance guys, they are very much familiar with the procedure.
I’m ready to connect with internet !!!. I plugged the device into my laptop and started pppd. Reliance server responded nicely. Finally!!!! I got the connection. Here is the logs from /var/log/syslog,
pppd[32557]: pppd 2.4.4 started by root, uid 0 chat[32563]: abort on (BUSY) chat[32563]: abort on (NO CARRIER) chat[32563]: abort on (VOICE) chat[32563]: abort on (NO DIALTONE) chat[32563]: abort on (NO DIAL TONE) chat[32563]: abort on (NO ANSWER) chat[32563]: abort on (DELAYED) chat[32563]: send (ATZ^M) chat[32563]: expect (OK) chat[32563]: ATZ^M^M chat[32563]: OK chat[32563]: -- got it chat[32563]: send (ATDT#777^M) chat[32563]: expect (CONNECT) chat[32563]: ^M chat[32563]: ATDT#777^M^M chat[32563]: CONNECT chat[32563]: -- got it chat[32563]: send (\d) pppd[32557]: Serial connection established. pppd[32557]: using channel 4 pppd[32557]: Using interface ppp0 pppd[32557]: Connect: ppp0 /dev/ttyUSB0 pppd[32557]: sent [LCP ConfReq id=0x1 ] pppd[32557]: rcvd [LCP ConfAck id=0x1 ] pppd[32557]: rcvd [LCP ConfReq id=0x2 ] pppd[32557]: sent [LCP ConfAck id=0x2 ] pppd[32557]: sent [LCP EchoReq id=0x0 magic=0x2d94925b] pppd[32557]: sent [PAP AuthReq id=0x1 user="xxxxxxxxxx" password=] pppd[32557]: rcvd [LCP EchoRep id=0x0 magic=0xcd908d56] pppd[32557]: rcvd [PAP AuthAck id=0x1 ""] pppd[32557]: PAP authentication succeeded pppd[32557]: sent [CCP ConfReq id=0x1 ] pppd[32557]: sent [IPCP ConfReq id=0x1 ] pppd[32557]: rcvd [IPCP ConfReq id=0x1 ] pppd[32557]: sent [IPCP ConfAck id=0x1 ] pppd[32557]: rcvd [LCP ProtRej id=0x1 80 fd 01 01 00 0f 1a 04 78 00 18 04 78 00 15 03 2f] pppd[32557]: Protocol-Reject for 'Compression Control Protocol' (0x80fd) received pppd[32557]: rcvd [IPCP ConfNak id=0x1 ] pppd[32557]: sent [IPCP ConfReq id=0x2 ] pppd[32557]: rcvd [IPCP ConfAck id=0x2 ] pppd[32557]: Cannot determine ethernet address for proxy ARP pppd[32557]: local IP address 115.184.98.253 pppd[32557]: remote IP address 220.224.141.145 pppd[32557]: primary DNS address 202.138.103.190 pppd[32557]: secondary DNS address 202.138.117.60 pppd[32557]: Script /etc/ppp/ip-up started (pid 32583) pppd[32557]: Script /etc/ppp/ip-up finished (pid 32583), status = 0x0
To stop the connection, you need to issue this command,
[root@Debian ~] # poff profilename
This is my personal request to service providers, “Please provide your services to all platforms”. Anyway, the struggle seems worthy, My machine never enjoyed 100 KB/s speed in its lifetime :-)
Have a nice day !!!!
Capture screen and mic input using FFmpeg and ALSA
Hi there,
Recently, interesting commands appeared in commandlinefu about x11grab using ffmpeg. All are very interesting commands and they did what I expected in my Debian. But only one thing is missing. While creating a screencast, If I want to speak, that should appear in the capturing stream.
Thanks to alsa and ffmpeg, they have a way to capture my laptop’s in-built mic input. So I customized the existing commands which appeared in commandlinefu and created a small script.
#!/bin/sh
# simple command to capture your screen
OUTPUT="${1:?[usage] screencast.sh OUTPUTFILE}"
getgeometry()
{
xwininfo -root |
grep 'geometry' |
awk '{print $2;}'
}
captureX11()
{
ffmpeg -f alsa -itsoffset 00:00:02.000 -ac 2 -i hw:0,0 \
-f x11grab -s $(getgeometry) -r 10 -i :0.0 \
-sameq -f mp4 \
-s wvga \
-y "${OUTPUT}"
}
captureX11
Finally I created my first screencast using ‘screencast.sh’ script. Here is the video
Atlast, I don’t want to install one more app to create screencast. FFmpeg is with me !!!
Aircel GPRS with Linux and Bluetooth
Ah!! finally, I bought a new mobile. its Nokia 2730c,
But my struggle started here with my service provider, My main reason to bought this particular phone is to get Internet access at my home. So that I can #join at anytime. But it was a tough ask with Aircel.
At first, when I inserted my SIM card, lot of activity happens and I got a message from Aircel saying to save a settings message. After that, I received a settings message saying “Pocket Internet”. I already know that there is a service provided by Aircel called “Pocket Internet” to access internet in mobile, But when I searched more about “Pocket Internet”, I came to know that I can’t connect to my PC and browse, because “Pocket Internet” is a WAP service.
So I called CustCare, but as I expected, those guys are dump about what I’m talking, First I asked whether I can connect my PC and use “Pocket Internet” for browsing? but no clear answers from them. After 2 calls, I called one more time, this time, CustCare person informed that I need to configure my phone to access “Aircel GPRS”, he also informed that if your phone is capable, the settings would have already came.
I was shocked, because my Nokia 2730c is a 3G capable mobile, but I didn’t receive ‘Aircel GPRS’ settings, only I received “Pocket Internet” settings. I was nearly at the edge to change my provider. Whenever I call them, they are not at all listening to my words, they simply saying that my mobile is not capable. I got frustrated and stopped calling them, after 2 days, I called them thinking that it would be my last call, thankfully that person responded me in a positive manner, they already have my call history and he is able to understand what my problem is, The exact problem is simple,
“Aircel didn’t have settings for Nokia 2730c, because its a new model”
So, I didn’t receive “Aircel GPRS” settings when I inserted my SIM. Thanks to that person, he raised a ticket to their technical team, and they rectified this issue next day itself. Day after that day, I received “Aircel GPRS” settings. and connected to “Nokia OVI store” using “Aircel GPRS” Access Point in my mobile.
First phase of this struggle is over, here comes the next,
It would have been a simple task if I’m a windows user, connect my mobile to laptop, use PC suite to dial-up and access internet, thats all. But, Its a task up to me to get the ppp settings from Aircel. Thankfully Ubuntu guys have a very good writeup for aircel. It makes easy for me to use ‘pppconfig’ and create ‘/etc/ppp/peers/aircel’ file and ‘etc/chatscripts/aircel’ file. Here is the steps,
root@Debian:/etc/ppp/peers# aptitude install pppconfig root@Debian:/etc/ppp/peers# pppconfig aircel select "Create a Connection named aircel" and select "Ok" select "Dynamic DNS" and select "Ok" select "PAP" and select "Ok" give username as "Aircel" and select "Ok" give password as "aircel" and select "Ok" pppconfig will give speed of your modem as 115200, use this default Select "Tone" and select "Ok" give phone number as *99***1# Next step will be giving the modem name, I'm going to use /dev/rfcomm0 (bluetooth serial device) so I selected "No" and gave '/dev/rfcomm0' as my modem name. Finally select "Finished Write files and return to main menu", two files will be created, only will be '/etc/ppp/peers/aircel' and another one is '/etc/chatscripts/aircel' select "Quit"
Now, I need to modify the ‘/etc/chatscripts/aircel’ file and insert the following lines after ‘ATZ’ init line. These two lines specifies Aircel’s APN aka Access Point Name which is ‘aircelgprs.pr’, I think if you are using Aircel’s postpaid service, then you need to give ‘aircelgprs.po’. But check your mobile’s “Aircel GPRS” settings first, it will clearly tell Access Point Name.
'' "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0" '' AT+CGDCONT=1,"IP","aircelgprs.pr"
Here is the final /etc/chatscripts/aircel
# This chatfile was generated by pppconfig 2.3.18. # Please do not delete any of the comments. Pppconfig needs them. # # ispauth PAP # abortstring ABORT BUSY ABORT 'NO CARRIER' ABORT VOICE ABORT 'NO DIALTONE' ABORT 'NO DIAL TONE' ABORT 'NO ANSWER' ABORT DELAYED # modeminit '' "ATZ" '' "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0" '' AT+CGDCONT=1,"IP","aircelgprs.pr" # ispnumber OK-AT-OK "ATDT*99***1#" # ispconnect CONNECT \d\c # prelogin # ispname # isppassword # postlogin # end of pppconfig stuff
And here is the final /etc/ppp/peers/aircel
# This optionfile was generated by pppconfig 2.3.18. # # hide-password noauth connect "/usr/sbin/chat -v -f /etc/chatscripts/aircel" debug /dev/rfcomm0 115200 defaultroute noipdefault user "Aircel" remotename aircel ipparam aircel usepeerdns
Now, if you connected your mobile through wire, your mobile will be accessable through any one of /dev/ttyS* or /dev/ttyUSB* devices, you can start ‘pon aircel’ and get connected to net. But I’m going to setup bluetooth, so here is the steps,
root@Debian:/etc/ppp/peers# hcitool scan
root@Debian:/etc/ppp/peers# BDADDR="[type your mobile's bluetooth address here, it will be displayed as the output of above command]"
root@Debian:/etc/ppp/peers# hcitool cc "${BDADDR}"; hcitool auth "${BDADDR}"
Now, your authentication-agent will ask for pin and all, go through it and create a pair. Next step will be detecting the channel to setup a rfcomm bind,
root@Debian:/etc/ppp/peers# sdptool browse "${BDADDR}" | less
In the above command, there will be lot of services your mobile will provide to you, each will have seperate rec handle, name etc., some of them like obex push, obex file transfer, Headset Gateway, Phonebook access etc. You need to see ‘Dial-up Networking’ and note down the RFCOMM channel number. In my mobile, the RFCOMM channel number is ’1′. So here is the step to bind your mobile’s RFCOMM channel with /dev/rfcomm0 device
root@Debian:/etc/ppp/peers# CHANNEL="[Type your mobile's Dial-up service's RFCOMM channel number]"
root@Debian:/etc/ppp/peers# rfcomm bind rfcomm0 "${BDADDR}" "${CHANNEL}"
‘bind’ will create a communication line between your mobile and /dev/rfcomm0 device. But it will not connect to your mobile until it is opened for reading/writing. You can check current rfcomm devices using following command
root@Debian:/etc/ppp/peers# rfcomm rfcomm0: 3C:F7:2A:46:19:AB channel 1 clean root@Debian:/etc/ppp/peers#
Now everything was setup, all you need to do is, type the following command
root@Debian:/etc/ppp/peers# pon aircel
it will start pppd and try to connect, but it will not throw any information in your terminal, you need to watch the activities through ‘tail -f /var/log/syslog’. If everything goes fine, it will establish ppp connection to Aircel. Here is the whole log
Mar 23 02:02:00 Debian bluetoothd[2072]: link_key_request (sba=00:1A:6B:E3:80:D8, dba=3C:F7:2A:46:19:AB) Mar 23 02:02:01 Debian chat[31061]: abort on (BUSY) Mar 23 02:02:01 Debian chat[31061]: abort on (NO CARRIER) Mar 23 02:02:01 Debian chat[31061]: abort on (VOICE) Mar 23 02:02:01 Debian chat[31061]: abort on (NO DIALTONE) Mar 23 02:02:01 Debian chat[31061]: abort on (NO DIAL TONE) Mar 23 02:02:01 Debian chat[31061]: abort on (NO ANSWER) Mar 23 02:02:01 Debian chat[31061]: abort on (DELAYED) Mar 23 02:02:01 Debian chat[31061]: send (ATZ^M) Mar 23 02:02:01 Debian chat[31061]: send (ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0^M) Mar 23 02:02:02 Debian chat[31061]: send (AT+CGDCONT=1,"IP","aircelgprs.pr"^M) Mar 23 02:02:02 Debian chat[31061]: expect (OK) Mar 23 02:02:02 Debian chat[31061]: ATZ^M^M Mar 23 02:02:02 Debian chat[31061]: OK Mar 23 02:02:02 Debian chat[31061]: -- got it Mar 23 02:02:02 Debian chat[31061]: send (ATDT*99***1#^M) Mar 23 02:02:02 Debian chat[31061]: expect (CONNECT) Mar 23 02:02:02 Debian chat[31061]: ^M Mar 23 02:02:02 Debian chat[31061]: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0^M^M Mar 23 02:02:02 Debian chat[31061]: OK^M Mar 23 02:02:02 Debian chat[31061]: AT+CGDCONT=1,"IP","aircelgprs.pr"^M^M Mar 23 02:02:02 Debian chat[31061]: OK^M Mar 23 02:02:04 Debian chat[31061]: ATDT*99***1#^M^M Mar 23 02:02:04 Debian chat[31061]: CONNECT Mar 23 02:02:04 Debian chat[31061]: -- got it Mar 23 02:02:04 Debian chat[31061]: send (\d) Mar 23 02:02:05 Debian pppd[31042]: Serial connection established. Mar 23 02:02:05 Debian pppd[31042]: using channel 9 Mar 23 02:02:05 Debian pppd[31042]: Using interface ppp0 Mar 23 02:02:05 Debian pppd[31042]: Connect: ppp0 <--> /dev/rfcomm0 Mar 23 02:02:05 Debian pppd[31042]: rcvd [LCP ConfReq id=0x0 <auth pap> <mru 1500> <asyncmap 0xa0000>] Mar 23 02:02:05 Debian pppd[31042]: sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0xcd88324c> <pcomp> <accomp>] Mar 23 02:02:05 Debian pppd[31042]: sent [LCP ConfAck id=0x0 <auth pap> <mru 1500> <asyncmap 0xa0000>] Mar 23 02:02:05 Debian pppd[31042]: rcvd [LCP ConfRej id=0x1 <magic 0xcd88324c> <pcomp> <accomp>] Mar 23 02:02:05 Debian pppd[31042]: sent [LCP ConfReq id=0x2 <asyncmap 0x0>] Mar 23 02:02:05 Debian pppd[31042]: rcvd [LCP ConfAck id=0x2 <asyncmap 0x0>] Mar 23 02:02:05 Debian pppd[31042]: sent [LCP EchoReq id=0x0 magic=0x0] Mar 23 02:02:05 Debian pppd[31042]: sent [PAP AuthReq id=0x1 user="Aircel" password=<hidden>] Mar 23 02:02:05 Debian pppd[31042]: rcvd [LCP EchoRep id=0x0 magic=0x0] Mar 23 02:02:05 Debian pppd[31042]: rcvd [PAP AuthAck id=0x1 ""] Mar 23 02:02:05 Debian pppd[31042]: PAP authentication succeeded Mar 23 02:02:05 Debian pppd[31042]: sent [CCP ConfReq id=0x1 <deflate 15> <deflate(old#) 15> <bsd v1 15>] Mar 23 02:02:05 Debian pppd[31042]: sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns3 0.0.0.0>] Mar 23 02:02:05 Debian pppd[31042]: rcvd [IPCP ConfReq id=0x0 <addr 10.6.6.6>] Mar 23 02:02:05 Debian pppd[31042]: sent [IPCP ConfAck id=0x0 <addr 10.6.6.6>] Mar 23 02:02:05 Debian pppd[31042]: rcvd [LCP ProtRej id=0x0 80 fd 01 01 00 0f 1a 04 78 00 18 04 78 00 15 03 2f] Mar 23 02:02:05 Debian pppd[31042]: Protocol-Reject for 'Compression Control Protocol' (0x80fd) received Mar 23 02:02:06 Debian pppd[31042]: rcvd [IPCP ConfRej id=0x1 <compress VJ 0f 01>] Mar 23 02:02:06 Debian pppd[31042]: sent [IPCP ConfReq id=0x2 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns3 0.0.0.0>] Mar 23 02:02:06 Debian pppd[31042]: rcvd [IPCP ConfNak id=0x2 <addr 10.1.6.46> <ms-dns1 202.148.202.3> <ms-dns3 202.148.202.4>] Mar 23 02:02:06 Debian pppd[31042]: sent [IPCP ConfReq id=0x3 <addr 10.1.6.46> <ms-dns1 202.148.202.3> <ms-dns3 202.148.202.4>] Mar 23 02:02:06 Debian pppd[31042]: rcvd [IPCP ConfAck id=0x3 <addr 10.1.6.46> <ms-dns1 202.148.202.3> <ms-dns3 202.148.202.4>] Mar 23 02:02:06 Debian pppd[31042]: Cannot determine ethernet address for proxy ARP Mar 23 02:02:06 Debian pppd[31042]: local IP address 10.1.6.46 Mar 23 02:02:06 Debian pppd[31042]: remote IP address 10.6.6.6 Mar 23 02:02:06 Debian pppd[31042]: primary DNS address 202.148.202.3 Mar 23 02:02:06 Debian pppd[31042]: secondary DNS address 202.148.202.4 Mar 23 02:02:06 Debian pppd[31042]: Script /etc/ppp/ip-up started (pid 31085) Mar 23 02:02:07 Debian pppd[31042]: Script /etc/ppp/ip-up finished (pid 31085), status = 0x0 Mar 23 02:07:05 Debian pppd[31042]: Terminating on signal 15 Mar 23 02:07:05 Debian pppd[31042]: Connect time 5.0 minutes. Mar 23 02:07:05 Debian pppd[31042]: Sent 70568 bytes, received 287622 bytes. Mar 23 02:07:05 Debian pppd[31042]: Script /etc/ppp/ip-down started (pid 32324) Mar 23 02:07:05 Debian pppd[31042]: sent [LCP TermReq id=0x3 "User request"] Mar 23 02:07:05 Debian pppd[31042]: rcvd [LCP TermAck id=0x3] Mar 23 02:07:05 Debian pppd[31042]: Connection terminated. Mar 23 02:07:05 Debian pppd[31042]: Script /etc/ppp/ip-down finished (pid 32324), status = 0x0 Mar 23 02:07:05 Debian pppd[31042]: Exit.
To stop your pppd, type the following command
root@Debian:/etc/ppp/peers# poff aircel
Finally, once you finished with pppd, release the rfcomm0 bind using the following command,
root@Debian:/etc/ppp/peers# rfcomm release rfcomm0
Thats it. Enjoy old style ‘pppd’ :) Always old tech rules !!!
Support for nVidia GeForce graphics card – Debian – Testing
As you can see in my previous article, this is about getting my nVidia card to work with Debian.
By default Xorg provides ‘nv’ driver. Its unfortunate that nVidia not even working with Xguys for basic compatibility for ‘nv’ driver. As a result, the default ‘nv’ driver is not usable in my machine.
I’m not left alone here. Debian have a package called ‘nvidia-glx’ which will install full support for nvidia cards with proprietary ‘nvidia’ driver.
$ su -c'aptitude install nvidia-glx'
But currently, this is not working in Debian Testing. I got a bug, last x11 update breaks things with nvidia-glx.
Now also I’m not left alone, using ‘module-assistant’ I can still get the nvidia driver.
$ su -c'aptitude install module-assistant' $ su -c'module-assistant prepare' $ su -c'module-assistant'
After the above steps I will get ncurses interface for module-assistant, choose ‘nvidia kernel’ in the wizard and compile the nvidia-kernel package. If everything goes right, I will get ‘nvidia’ driver in ‘lib/modules/$(uname -r)/kernel/drivers/video/nvidia.ko’. Also my ‘/etc/x11/xorg.conf’ file will be modified to use ‘nvidia’ driver. Thats all, I can now start X session.
Unfortunately, this method is also not working currently, while compiling I’m getting this error.
So there is no other way for me then to go for nvidia’s own builder. You can download the driver+installer from this location.. Now we need to make our system capable for compilation.
$ su -c'aptitude install module-assistant' $ su -c'module-assistant prepare'
Then, the next step is just run the nvidia’s installer
$ su -c'chmod 755 NVIDIA-Linux-x86_64-190.53-pkg2.run' $ su -c'./NVIDIA-Linux-x86_64-190.53-pkg2.run' $ su -c'aptitude install nvidia-kernel-common' $ su -c'depmod -aeF /boot/System.map-$(uname -r)' $ su -c'update-initramfs -u'
The above step will automatically compile and install the ‘nvidia.ko’ driver in ‘/lib/modules/$(uname -r)/kernel/drivers/video/nvidia.ko’. Also my ‘/etc/x11/xorg.conf’ file will be modified to use ‘nvidia’ driver. Thats all, I can now start X session.



