Skip to main content

Posts

Showing posts from March, 2014

Featured Post

Product Design of a 4 wheel differential drive robot

How to hide and unhide files in Linux?

If you are new to linux OS, it's a common mistake to add a (.) in front of your files and suddenly the file disappears. In Linux filenames starting with a dot (.) are hidden. You can intentionally make a folder or file hidden by renaming it. mv filename .filename If you want to view you hidden files or folders, first go to the location where the file resides using cd command. cd /root/Desktop/ Then list all files and folders using ls command. ls -a If you want to permanently unhide then use mv command again. mv .filename filename

Linux: How to find your serial (any connected) device?

In Linux all devices that are connected to the system are listed in /dev If you connect your mouse to your system it will detect it as hidraw. Other serial devices will be named as tty0, tty1,etc. So if you connect a serial (any) device and you want to know it's name ( for ex: you want to connect it via minicom ), first go to /dev using cd /dev Then list the contents of folder using ls But it will be hard to figure out the name of your device from the long list. So here is a trick for it. Disconnect the device and type this in terminal. ls > removed.txt Connect your device again and type ls >connected.txt Your device's name will be on the connected.txt file. But how to know filter it? Compare both list and the odd one will be your device. Type this. diff removed.txt connected.txt You will get the name of your device.

Serial Port Communication in Linux using Minicom

First of all install minicom using apt-get install minicom or directly download the .deb package from  https://packages.debian.org/sid/minicom  and install it using dpkg -i <package name> After install type minicom -s to setup the minicom for using your serial port. Select Serial Port Setup and type A to select serial device. It will be shown as /dev/modem replace modem with  your serial device. Press Enter twice to save. You can also setup boadrate and all those stuff in the Serial Port Setup. After that you can save your configurations. Select Save Setup as. Then type a name and press enter to save it. If you wan't to open your configuration later, type minicom <configuration name>