LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 10-16-2018, 04:29 PM   #1
sbartolett
LQ Newbie
 
Registered: Oct 2018
Posts: 3

Rep: Reputation: Disabled
ttyACM0 default settings


Hi all,

We are trying to connect a Raspberry PI running Raspbian Stretch to some hardware through a USB port. On power up the hardware is sending some text that the Raspberry is echoing back causing problems on the hardware. The hardware supplies power to the Raspberry PI so they both power up at the same time.

I have tried putting stty -F /dev/ttyACM0 -echo in rc.local, but by the time that runs it has already echoed some text and so this is too late. Is there any way that the default configuration of ttyACM0 can be changed so that it starts up with echo off? Or is there someplace that runs earlier than rc.local where I can put the stty command to insure that echo is off before any text is echoed.

Thanks!
Scott
 
Old 10-17-2018, 09:02 AM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: MA, USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 8,010
Blog Entries: 13

Rep: Reputation: 3451Reputation: 3451Reputation: 3451Reputation: 3451Reputation: 3451Reputation: 3451Reputation: 3451Reputation: 3451Reputation: 3451Reputation: 3451Reputation: 3451
Hi and welcome to LQ,

How do you know for sure something is being transmitted, and also what exactly is being transmitted? Can you trace or sniff the serial line?

I've used serial connections over Linux for years and never run into a problem where information is sent over a serial port accidentally. Some software is always responsible for sending information through a serial port.

Is this hardware responsible for the information? As in when it starts up, does it transmit some form of wake-up/hello announcement? It could be possible that a non-initialized port on the host computer could act as a loopback where the information from that attached device appears back to it as an echo. If this is the problem, perhaps you control that hardware and can stop it from doing this.
 
Old 10-17-2018, 09:48 AM   #3
sbartolett
LQ Newbie
 
Registered: Oct 2018
Posts: 3

Original Poster
Rep: Reputation: Disabled
Yes, that is exactly our problem. The hardware is sending the text as part of the startup sequence. This is the text that the PI is echoing back. Unfortunately the hardware does not recognize the echoed back text and generates an error message that is also then echoed back. This continues until either our application that is running on the PI is able to initialize the port and turn off the echo or if this doesn't happen quick enough the port locks up probably due to some buffer filling up.

We know one solution is to modify the hardware to recognize the initial echoed back text and not generate the error messages, but we have hundreds of units in the field already. The Raspberry PI is part of a new feature we are planning on offering as an upgrade and it needs to work with these older units in the field. That is why we are hoping there is a solution we can implement in the Raspberry PI.

Last edited by sbartolett; 10-17-2018 at 09:51 AM.
 
Old 10-17-2018, 11:30 AM   #4
rtmistler
Moderator
 
Registered: Mar 2011
Location: MA, USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 8,010
Blog Entries: 13

Rep: Reputation: 3451Reputation: 3451Reputation: 3451Reputation: 3451Reputation: 3451Reputation: 3451Reputation: 3451Reputation: 3451Reputation: 3451Reputation: 3451Reputation: 3451
Right, but the problem may be a hardware design detail which Linux, the kernel, the USB driver, the ttyACM driver, ... none of which of all those can do anything about this.

1. Does the Pi hardware cause the echo when powered down?
2. Does the Pi hardware cause the echo when powered up, but no system disk installed, or being used?

If either of those questions results in a Yes, then it's hardware. End of story.

I feel it is hardware anyways. After all, the kernel is barely running, and even if it partially is, the driver, and any application software are certainly not running.

Perhaps you can design an isolation circuit to cut out the USB until the boot sequence is far enough along to stop any echo and then send those out to be installed in the field systems.
 
Old 10-17-2018, 03:49 PM   #5
sbartolett
LQ Newbie
 
Registered: Oct 2018
Posts: 3

Original Poster
Rep: Reputation: Disabled
The answer to both questions is no.
 
Old 10-18-2018, 08:15 AM   #6
rtmistler
Moderator
 
Registered: Mar 2011
Location: MA, USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 8,010
Blog Entries: 13

Rep: Reputation: 3451Reputation: 3451Reputation: 3451Reputation: 3451Reputation: 3451Reputation: 3451Reputation: 3451Reputation: 3451Reputation: 3451Reputation: 3451Reputation: 3451
See if you can configure it such that Linux boots and does not load the ttyACM driver, make that a module and don't load it until you're ready to use it. First see if you can just remove the ttyACM driver and with it not being there, does this stop the echo. If not, then perhaps the echo lay within the state of the USB. From what you're saying, it would not be a complacent or uninitialized hardware state, therefore it would follow that it is a state, be that stable or temporary, either due to the general USB driver, or due to the ttyACM driver in Linux. So try to characterize what that is.

From what I gather, you can change the kernel, so those are my suggestions. Remove ttyACM and see if the problem is still there. If so, then remove any and all USB drivers. However, if you do those steps successfully and the problem is still there, then I have to wonder how it is not there in the earlier conditions I asked about, no OS, and powered down.

This is obviously a tough one that is highly specific to your configuration.
 
  


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
default settings chaplainD Linux - Newbie 3 12-29-2015 09:27 AM
How to reset monitor settings to default autodetected settings in openSUSE? chengas123 Linux - General 2 09-17-2008 11:24 AM
default /etc/ settings? albinojellyfish Linux - Networking 1 07-24-2005 01:27 PM
default /etc/ settings? albinojellyfish Linux - Security 6 07-24-2005 02:08 AM
kde default settings aesahaettr Linux - Software 3 04-29-2004 04:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:07 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