Miscellaneous Android scratch pad

January 9th, 2015

How to create a dump of the traffic on wireless

#cd /mnt/extsd/

For Wi-Fi

tcpdump -i wlan0 -s 65535 -w /mnt/extsd/filename.cap

For Ethernet

tcpdump -i eth0 -s 65535 -w /mnt/extsd/filename.cap

Get Files from Android device

Once done, you can get the files from the HAT using the following command

adb pull /mnt/extsd/filename.cap


HP Pavilion 15-f010dx in Black Friday Sale in Best Buy

November 11th, 2014

The HP’s Pavilion 15-f010dx is available in Sale on Black Friday 2014 at Best Buy. We will be bringing some details and quick review of this laptop soon. Stay tuned.

The regular price of this laptop is $399 but is being offered at $299 ( $100 discount).


EMI with Single Ended Clock Signals over cable

October 1st, 2014

If you are carrying a clock signal ( say 50 MHz or higher ) over a Cable, that is not twisted and shielded and that ( something like a flat cable) , you are inviting EMI trouble.

The solution to this problem is to convert the Clock signal to a low voltage differential signal before it hits the cable junction.

TI’s SN65LVDS9638, for example is a dual Differential driver that can take single ended input and produce a differential output. The output can then run over differential cable. Here is why the EMI is reduced when carrying the LVDS over the cable

1. The swing of voltage is low ( and we can afford to keep the voltage low because, we are only measuring the differential signal).

2. The cable can be twisted and the magnetic field from the positive signal is canceled by the magnetic field from the opposite signal.

3. Finally the cable itself can be shielded to further reduce EMI.

One the receiver side use SN65LVDS9637 ( dual drivers) to convert the differential signal back to single ended.

If your board is failing due to the Clock signal running over a cable, try hooking up a pair of the differential drivers and the receivers at the two ends of the cable and see

1. If the scheme works. Check the clock skew and its relation to the Data signals.
2. Check if EMI reduces.


Issues and resolution in Installtion of Magento

August 2nd, 2014

I recently installed Magento ( at http://hindustanbazaar.com) to try out. The shared hosting at godaddy.com was used. Here is my experience

1. Instead of unzipping the files and then uploading it at godaddy, it will be better if you just upload the zipped file and then unzip it at godaddy itself. There is a way to unzip the zipped file at godaddy ( you will need to go to its files/directory section to do that – please see this http://support.godaddy.com/help/article/8396/extracting-files-and-directories-with-your-hosting-account?pc_split_value=4). It would have saved few hours for me.

2. In godaddy, the image uploaded for the product will not work. The images are stored in the /media directory. To overcome the issue, just rename the .htaccess file to .htaccess_old. ( Thanks to this post http://www.viraljetani.com/programming/magento-images-not-appearing-on-frontend-as-well-as-backend-on-godaddy-server).

3. To change the default logo edit the skin/frontend/rwd/default/images/logo.gif file.

Unresolved Issues

1. I am not able to get any product to display on the home page. It did try few suggested solutions on net.

More coming later.


Compiling the Linux Kernel for i.MX6

March 29th, 2014

In this post we will go through the process of compiling the Linux for i.MX6. This procedure is NOT through the ltib, but the regular arm compiler methods. You may like to see the uboot compile post to look for installing and setting up of the compile tool chain. The same toolchain used for uboot can also be used for the Linux kernel.

Grab the source code

The first thing you want to do is grab a copy of the latest source code.

export ARCH=arm
export CROSS_COMPILE=/usr/bin/arm-linux-gnueabi-

Look into the directory arch/arm/config and see the relevant config file. In my case it was imx6_defconfig. Give the following command to make config file.

make imx6_defconfig

At this stage we compiled it using

make uImage

However, we found some issue and errors and had to do the following

edit .config and add the following line
# CONFIG_SWITCH is not set

Again compile

make uImage

At this stage it compiled and the uImage is generated and stored in arch/arm/boot/.

copy the generated uImage to the directory called /tftpboot. Now boot your i.MX system and stop it at u-boot. Load and run the kernel ( Follow the instruction in
tftp boot).
setenv loadaddr 10800000
tftp 0×10800000 uImage

At this stage you should see the linux runs.

Update :

If you use the boundary devices git (https://github.com/boundarydevices/u-boot-imx6/) , you should use the following for the config

make nitrogen6x_defconfig

This should not throw errors.


Transferring and Running Linux on i.MX6 using NFS ( tftp)

March 29th, 2014

Once you have built kernel for i.MX6 ( I will have a separate blog in how to build kernel) you need to transfer it to your i.MX6 board to test it. In this blog I will walk through the steps needed to transfer the kernel and run it.

Installing the tftp Server in Linux machine

You need to install the tfto server on the Host linux machine. Use following command to install the tftp

sudo apt-get install xinetd tftpd tftp

Now create file named tffp ( you can use gedit editor) in the directory


and put the following contents

service tftp
protocol = udp
port = 69
socket_type = dgram
wait = yes
user = nobody
server = /usr/sbin/in.tftpd
server_args = /tftpboot
disable = no

Make /tftpboot directory

$ sudo mkdir /tftpboot
$ sudo chmod -R 777 /tftpboot
$ sudo chown -R nobody /tftpboot

Start tftpd through xinetd

$ sudo /etc/init.d/xinetd start

You can find if the tftp server is running or not by using the command

ps aux | egrep 'xinetd'

It gives something like ( if the xinetd is running)

vikas 2440 0.0 0.0 13584 924 pts/0 S+ 11:50 0:00 egrep --color=auto xinetd

Find the ipaddress of the Linux machine using ifconfig ( let us say – it is

On the i.MX6 board set the correct serverip

setenv serverip

Set the correct gatewayip


( Also make sure that the environment variable ipaddr is set. You can use dhcp to get the current ip Address)

Place the uImage file in the director /tftpboot

Transfer the uImage using tftp

> tftp 0×10008000 uImage

Run the uImage

> bootm

Hope it helps