Re: minicom serial output

From: Floyd L. Davidson (floyd_at_barrow.com)
Date: 07/21/04


Date: Wed, 21 Jul 2004 10:17:35 -0800

anonymous coward <anonymous.coward@nospam.nowhere> wrote:
>On Wed, 21 Jul 2004 05:58:42 -0800, Floyd L. Davidson wrote:
>
>> anonymous coward <anonymous.coward@nospam.nowhere> wrote:
>> [background info snipped]
>>>I've been trying to get them to work using minicom. I've set the correct
>>>data rate, flow control settings etc. etc. but minicom only seems to work
>>>in one direction. It will print data from my electronics, but it will
>>>not echo what I type into the keyboard into my electronics.
>>>
>>>If I try to start a modem, my electronics reacts to the control sequences
>>>so there does not seem to be any hardware problem.
>>>
>>>Any ideas? I'm sure I'm doing something pretty basic wrong, but I have no
>>>idea what...
>>
>> I'm not sure that I understand your description. Are you saying
>> that when you type something on the keyboard, the device you
>> have connected to the serial port *does* react? Meaning that it
>> has received the data?
>
>Sorry - I can see my original question wasn't very clear. My device
>doesn't react and a multimeter accross the serial port shows that no data
>was transmitted from the computer to the device.
>
>I can tell that the input to the computer is working because my device
>shows a 'welcome' message as it boots up. It also reacts to the modem
>initialisation / hangup commands. These are sent correctly which I imagine
>shows that there is no hardware or permissions problem - i.e. I can write
>to the serial port.
>
>> So "I try to start a modem" means that you used minicom's "Initialize
>> Modem" command and it sent something the device responded to... you
>> want to configure minicom to *not* send it!
>
>Yes, that's correct. I already changed the modem initialisation string to
>'D' (one of the commands recognised by my device) and I can get my device
>to respond sensibly to this command whenever I initialise the modem. But
>I have many more commands, and at the moment if I wish to switch between
>commands I have to change the modem init string each time, hangup... It's
>not practical.
>
>What I'd like to be able to do, would be to type the commands directly
>into the terminal and have them sent out to the serial port.

At this point I am simply unable to explain what you just
described! Your analysis of what it means is good. But my
understanding of what minicom does cannot match what you
describe!

If you can see the welcome message from your device, then we can
assume that basically you do indeed have the port configured
either correctly, or at least close enough to show some signs of
life.

If you can send a command to it using the modem init capability
of minicom and see the reaction to it, I simply do not know why
you could not then send a second command from the keyboard.

There are a couple of (remotely) possible ways that you just
haven't tried in exactly the right combination to show what is
happening, but given your descriptions I'm not inclined to think
you are jumping to conclusions! Regardless, let me discuss a
couple possible stumbing blocks that might be overlooked by
someone who isn't experienced with data comm.

If you get the parity setting wrong, some characters work and
some don't. So you might find that 1 out of 5 different
commands typed in would get a response. It sounds like you've
tried enough things that you would have mentioned those symptoms
if they were being displayed.

Another odd one is how each line is terminated, and this is
indeed something which could be tripping you up. Try sending
lines terminated with ^M^J and others terminated with ^J^M.

Past that, and those don't look promising, I just don't see why
it would not work as you are expecting. I have used minicom to
talk to dozens or even hundreds of devices, and you are
certainly describing the right approach.

It doesn't sound as if either the hardware (cabling) or the port
configuration could be a cause. It appears to have something to
do with the way the terminal and/or the init strings for minicom
are configured.

One thing you might do is find a handy old modem that has LEDs
to indicate various states, including TxD and RxD. Then you
can actually see when data is being sent. Hook the modem up
and see if you can talk to it. If not, it will probably be
a lot easier to see what is or not happening with the modem
than with any other device. If it does *not* work with your
present minicom configuration, go back to the default configuration
and change that one step at a time until you find something that
causes it to stop working. If it does work as currently configured,
then you probably do have a port configuration problem (because the
modem just adapts to whatever your send parameters are, and your
device probably does not).

Keep us posted! Especially if you find a fix. (Don't be
embarassed either, because *all* problems are simple *after* the
fact! There is nothing you can have done that is half as dumb
as things I've done more than once... :-)

-- 
FloydL. Davidson           <http://web.newsguy.com/floyd_davidson>
Ukpeagvik (Barrow, Alaska)                         floyd@barrow.com