How do I Configure/Use Hyperterminal in Ubuntu 14.04?
Solution 1
Update: You need to add yourself to the 'dialout' group to access the serial ports:
sudo gpasswd --add <your-username> dialout
Thanks to @Pilot6 for mentioning this. Until now I was using sudo for using the serial ports.
In Linux every device is is represented as files. For example, your HDD could be /dev/sda
. A pendrive you connect will appear as /dev/sdx
where x
could be a,b,c...
Also in Linux, we don't use the term COM. If you connect a serial device, it will again appear as a file in /dev
folder. It could be something like /dev/ttyUSB0
or /dev/ttyACM0
if it is a serial device. So if you want to communicate with the device, you can use the HyperTerminal Equivalent called picocom
. There are other alternatives like minicom, but I use this picocom because it is very easy to use.
Install it by typing:
sudo apt-get install picocom
To run it, type
sudo picocom -b 19200 /dev/ttyUSB0
Here I have specified the baud rate as 115200
and the device as /dev/ttyUSB0
. For baud rate, refer to the documentation of the device you are connecting. /dev/ttyUSB0
is equivalent to the COM port name and will vary each time the device is connected and also depends on the number of serial devices connected(Just like in Windows, where it appears as COM1 on one connection and say COM2 when you reconnect it).
To find it, connect your device and execute:
ls /dev/tty*
It should be listed as shown in the image:
Update: From the comments I understand that you only need to read the data. You can do this in linux without installing any software at all!
First connect the device and then identify the device(ls /dev/tty*
. Also Make sure that your user is in the dialout
group. Assuming the device is /dev/ttyUSB0
, set the baud-rate like this:
sudo stty -F /dev/ttyUSB0 19200
where 19200
is the baud rate.
Now to read the output do the following:
tail --follow /dev/ttyUSB0
In fact, you can also send data from the terminal:
echo <data> > /dev/ttyUSB0
Solution 2
HyperTerminal appears to be a Windows-Only program - HyperTerminal Website
In Ubuntu, there are many great built-in applications that replace the functionality of HyperTerminal, though, as well as great additional applications that are available for free in the Ubuntu repositories.
For instance, ssh and telnet are already immediately available for remote terminal login to devices over a network.
curl and wget are also installed by default and are great for running other types of network interactions, especially those involving http protocol.
minicom can easily be installed from the Ubuntu Repositories and is a fairly popular application for accessing/utilizing com ports.
In case you are unfamiliar or just not yet completely comfortable with using a linux terminal for all of this, you can refer to the Ubuntu Community Wiki page for Using The Terminal.
There are many Linux terminal emulators to choose from and install in case you don't like Ubuntu's default terminal emulator. Most (if not all) of those can be installed from Ubuntu's Software Center. I personally favor terminator.
It might be an adjustment to launch and run all of these applications from CLI instead of a GUI, but you will most likely grow to prefer this method over the GUI of HyperTerminal over time, that is if you don't immediately fall in love with using CLI for all of it.
Related videos on Youtube
Comments
-
Madhusudhanan over 1 year
I do use HyperTerminal in Windows to send Data to my Micro-Controller.
So that I can't see such features in Ubuntu 14.04 and also how to configure COM Ports as well as list out the details of the COM Ports.
How to send the data using with Parity\without Parity?
How to select baud rate ?
Please do refer any manuals regarding to that !
-
daltonfury42 over 8 yearsIf you add your application to the question, it would help others who are seeking help.
-
-
Madhusudhanan over 8 yearsWow, @Daltonfury. Really you cleared my doubt like MGodby. Actually i wanna send some data to my electronic Circuit. I always do that with Windows. But nowadays i'm curious to learn and interconnect it Via Ubuntu. Again Thanks a lot
-
daltonfury42 over 8 years@Sridhar I've added specific instructions for your application at the bottom of my answer. Please update the question with your application and delete the comments.
-
Pilot6 over 8 years@Sridhar You can ask a more specific question regarding reading data from a port or sending it there with examples. And we can give you directions how is it better to do it.
-
Pilot6 over 8 years@daltonfury42 It is probably needed to tell that the current user should be added to
dialout
group to access ports. -
Madhusudhanan over 8 yearsAgain thanks a Lot @Pilot6 & Daltonfury. I'm glad for your kind replies :)