Do not limit your challenges.. Challenge your limits

BTemplates.com

Search This Blog

Powered by Blogger.

About Me

My photo
kathmandu, Bagmati, Nepal
I am Software developer based on Nepal.I have started coding since mid of 1995 with QBasic.My interest in software development covers a broad range of technologies from assembly to the Microsoft .NET platform to Java, Linux to Windows, Windows Mobile to Android, desktop to web to mobile, and many others. But from 2007 I am just working on Java mainly working on Java EE platform and decided just to go with it. I really like to learn new stuff and share things with others which is my main objective in creating this blog.

ArchUnit : Java architecture test library

Finally I have found the required library which will enforce architecture patterns . ArchUnit  . Currently I am exploring it and will upd...

Sunday, June 9, 2013

Communicating with serial port



These days I am working on embedded ARM linux devices. I am writing an application for it. I was using Hyper terminal( windows machine ) to transfer image file,even though I am using linux for development( coding ).This suggestion was given from the vendor and since it is my first project in embedded , I am doing whatever they are suggesting. Just for file transfer I have to use windows machine which was giving me bad feeling .So this morning I decided to setup serial port with linux and will try to transfer file by linux.I have tried a lot of tools like minicom,cutecome,gtkterm and c-kermit . After trying around 2 hours I am able to transfer file from linux to POS machine using serial port with the help of kermit. So , I decide to write the procedure of it for future reference.

Installing Oracle java in linux



Open JDK comes with linux as default Java provider.In order to install Oracle java here are some step
  1. Download oracle java from here
  2. Select Java Platform (JDK)
  3. Accept License Agreement
  4. Download by Clicking on *-linux-x64.tar.gz( for 64 bit OS ) or *-linux-i586.tar.gz( for 32 bit OS )
  5. make a folder anywhere you want to keep java ( recommended on /opt) by using
    sudo mkdir /opt/java
  6. give full permission to this folder by
    sudo chmod 777 -R /opt/java
  7. unzip downloaded file on /opt/java
  8. open .bashrc for editing
  9. append following lines at the end of file and save it
                export JAVA_HOME=/opt/java
               PATH=$JAVA_HOME/bin:$PATH
   10. Open terminal and type 
                source .bashrc
   11. Open terminal and perform below command to make sure java is installed properly

                 java -version
          
         if above command successfully executed ,congratulation java is installed.Otherwise please check above step properly.

Daily Useful Linux Command



Daily Useful Linux Command

  1. rm -rf FOLDER_NAME           - To Delete Folder and it’s contain
  2. df -h                                         - To View available disk space
  3. gunzip -c foo.tar.gz | tar xvf     - To unzip
  4. tail -f FILE_NAME.log             - To monitor log file
  5.  ps -af                                       - To display all the processes running on the host 
  6. uname -r                                   - To print Linux version information 
  7. more /proc/cpuinfo                   - To print hardware summary 
  8. history                                      -  To Call commands from History 
  9. !23 ( where, 23 history id )        - To Call commands from History   

Some basic linux information


Useful Files


  • /boot/vmlinuz – the typical location and name of the Linux kernel. In the Slackware distribution, the kernel is located at /vmlinuz.
  • /dev/fd0 – first floppy disk drive
  • /dev/fd0H1440 – driver for the first floppy drive in high density mode. Generally, this is invoked when formatting a floppy drive for a particular density. Slackware comes with drivers that allow for formatting a 3.5″ diskette with up to 1.7 MB of space. Red Hat and Mandrake do not contain these device driver files by default.
  • /dev/fd1 – second floppy disk drive
  • /dev/hda – first IDE hard drive
  • /dev/hdc – on many machines, the IDE cdrom drive. Most often, there is a symbolic link called /dev/cdrom which is just a link to the true cdrom driver file.
  • /dev/null – used when you want to send output into oblivion
  • /etc/aliases – file containing aliases used by sendmail and other MTAs (mail transport agents). After updating this file, it is necessary to run the new aliases utility for the changes to be passed to sendmail.

Saturday, June 8, 2013