LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-19-2012, 07:20 AM   #1
linux_user0302
LQ Newbie
 
Registered: Mar 2012
Posts: 4

Rep: Reputation: Disabled
Serial LCD


Hi,
I am trying to control a serial lcd(16x2) connected to my usb port. When I use the command
echo "hi" > /dev/ttyUSB0
then nothing is displayed on LCD. But then i used
screen /dev/ttyUSB0
and then type something and exit. Then again i run the command
echo "hi" > /dev/ttyUSB0
then hi was displayed on the screen perfectly. Can anyone explain the reason for this and how to overcome this problem of display without using screen command and just use echo command every time i restart my computer.
 
Old 03-19-2012, 02:21 PM   #2
Satyaveer Arya
Senior Member
 
Registered: May 2010
Location: Palm Island
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,415

Rep: Reputation: 305Reputation: 305Reputation: 305Reputation: 305
If there is no screen command, you need to open multiple ssh session with remote host.
Screen is a full-screen window manager that multiplexes a physical terminal between several processes (typically interactive shells). The same way tabbed browsing revolutionized the web experience, GNU Screen can do the same for your experience in the command line. Instead of opening up several terminal instances on your desktop or using those ugly GNOME/KDE-based tabs, Screen can do it better and simpler. Not only that, with GNU Screen, you can share sessions with others and detach/attach terminal sessions. It is a great tool for people who have to share working environments between work and home.

By adding a status bar to your screen environment, you are able to name your shell instances on the fly or via a configuration file called .screenrc that can be created on the user’s home directory.

A Guide to GNU Screen
 
1 members found this post helpful.
Old 03-19-2012, 02:24 PM   #3
Satyaveer Arya
Senior Member
 
Registered: May 2010
Location: Palm Island
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,415

Rep: Reputation: 305Reputation: 305Reputation: 305Reputation: 305
You can also open the screen with the correct baud rate:
an example:

Code:
# screen /dev/ttyUSB0 115200
You can also enable CTS/RTS handshake:

Code:
# screen /dev/ttyUSB0 115200,ctsrts

Last edited by Satyaveer Arya; 03-19-2012 at 02:25 PM.
 
1 members found this post helpful.
Old 03-19-2012, 02:29 PM   #4
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 6,676

Rep: Reputation: 1911Reputation: 1911Reputation: 1911Reputation: 1911Reputation: 1911Reputation: 1911Reputation: 1911Reputation: 1911Reputation: 1911Reputation: 1911Reputation: 1911
I'm sorry I have no answers for this but I am interested in what this device is.
Is this something being used in an embedded system or is it possible to add a USB LCD to a desktop machine? I can think of a few fun uses for something like this, and a few good uses if/when I finally get a Raspberry Pi.
 
Old 03-19-2012, 04:17 PM   #5
Satyaveer Arya
Senior Member
 
Registered: May 2010
Location: Palm Island
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,415

Rep: Reputation: 305Reputation: 305Reputation: 305Reputation: 305
It is possible to add a USB LCD to a desktop machine also.
 
Old 03-19-2012, 04:34 PM   #6
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 6,676

Rep: Reputation: 1911Reputation: 1911Reputation: 1911Reputation: 1911Reputation: 1911Reputation: 1911Reputation: 1911Reputation: 1911Reputation: 1911Reputation: 1911Reputation: 1911
Quote:
Originally Posted by Satyaveer Arya View Post
It is possible to add a USB LCD to a desktop machine also.
I'm not going to ask you to be google for me but do you know of a model number or supplier?
I did google but I'm not 100% sure what to search for to find an LCD I can send characters to through USB, I'm actually surprised it's as easy as the original post sugests.
 
Old 03-19-2012, 05:07 PM   #7
Satyaveer Arya
Senior Member
 
Registered: May 2010
Location: Palm Island
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,415

Rep: Reputation: 305Reputation: 305Reputation: 305Reputation: 305
I think most of the LCDs support connecting with USB. You can refine your search on google.
 
Old 03-20-2012, 07:23 AM   #8
linux_user0302
LQ Newbie
 
Registered: Mar 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Satyaveer Arya View Post
If there is no screen command, you need to open multiple ssh session with remote host.
Screen is a full-screen window manager that multiplexes a physical terminal between several processes (typically interactive shells). The same way tabbed browsing revolutionized the web experience, GNU Screen can do the same for your experience in the command line. Instead of opening up several terminal instances on your desktop or using those ugly GNOME/KDE-based tabs, Screen can do it better and simpler. Not only that, with GNU Screen, you can share sessions with others and detach/attach terminal sessions. It is a great tool for people who have to share working environments between work and home.

By adding a status bar to your screen environment, you are able to name your shell instances on the fly or via a configuration file called .screenrc that can be created on the userís home directory.

A Guide to GNU Screen
the problem here is,I have to display something using bash scripting. But if I run the command screen /dev/ttyusb0 inside the script, there is no way to quit the screen window as it will be waiting for the inputs. I think multiple ssh session can also be not opened using scripts. Is there any other way just by using commands in scripts?
 
Old 03-20-2012, 07:26 AM   #9
linux_user0302
LQ Newbie
 
Registered: Mar 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by 273 View Post
I'm sorry I have no answers for this but I am interested in what this device is.
Is this something being used in an embedded system or is it possible to add a USB LCD to a desktop machine? I can think of a few fun uses for something like this, and a few good uses if/when I finally get a Raspberry Pi.
The lcd here is 16x2 character serial lcd. It has pic controller attached to it. So the serial commands that are sent to pic are displayed on lcd. The pic is already programmed by the vendor.
 
Old 03-20-2012, 07:28 AM   #10
linux_user0302
LQ Newbie
 
Registered: Mar 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by 273 View Post
I'm not going to ask you to be google for me but do you know of a model number or supplier?
I did google but I'm not 100% sure what to search for to find an LCD I can send characters to through USB, I'm actually surprised it's as easy as the original post sugests.
The model is [RKI-1213]. This is serial lcd with back light.
 
Old 03-20-2012, 07:41 AM   #11
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 6,676

Rep: Reputation: 1911Reputation: 1911Reputation: 1911Reputation: 1911Reputation: 1911Reputation: 1911Reputation: 1911Reputation: 1911Reputation: 1911Reputation: 1911Reputation: 1911
Thanks, sounds like a useful little device.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Using serial device file to connect a lcd display sharan013 Linux - Embedded & Single-board computer 4 03-16-2012 04:14 PM
[SOLVED] Serial Programming - Multiple interruptions for serial devices on real-time Linux. santiagocasti Programming 5 05-06-2010 04:34 AM
Using USB<->Serial and serial gender changer to transmit data between computers JoeyAdams Linux - Hardware 4 04-17-2008 05:15 AM
Modeline for my LCD, please take a look - don't want to kill my LCD... brjoon1021 Linux - Hardware 3 12-01-2006 03:21 PM
analog lcd monitor not working after installing a digital lcd monitor nishlq Linux - Hardware 6 08-18-2006 02:18 PM


All times are GMT -5. The time now is 02:33 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration