* Serial port read working but not write.
@ 2004-07-22 16:48 suresh shenoy
2004-07-22 22:20 ` Lukasz Michal Rak
` (3 more replies)
0 siblings, 4 replies; 20+ messages in thread
From: suresh shenoy @ 2004-07-22 16:48 UTC (permalink / raw)
To: linux-serial
Hi all,
I am currently using redhat linux 9.0. I am working
with a hardware which senses some data and sends back
to the PC through serial port. It also can move a dc
motor using the same hardware. I am using POSIX serial
port programming for talking with the board. After
some struggles i was able to read the data from the
hardware device. But my current problem is that it is
not moving the motor when i send a command to the
hardware. Does anyone know the solution to this
problem. Please let me know if any piece of code or
any more information is required that i can furnish.
Thanks & Regards,
Suresh M Shenoy.
________________________________________________________________________
Yahoo! India Careers: Over 65,000 jobs online
Go to: http://yahoo.naukri.com/
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Serial port read working but not write.
2004-07-22 16:48 Serial " suresh shenoy
@ 2004-07-22 22:20 ` Lukasz Michal Rak
2004-07-23 8:18 ` Justinas
` (2 subsequent siblings)
3 siblings, 0 replies; 20+ messages in thread
From: Lukasz Michal Rak @ 2004-07-22 22:20 UTC (permalink / raw)
To: suresh shenoy; +Cc: linux-serial
Hi!
Connection from board to PC is working and from PC to board it is not, am
I right? Did you check if it is not hardware problem? This is what first
comes to my head.
Lukasz
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Serial port read working but not write.
2004-07-22 16:48 Serial " suresh shenoy
2004-07-22 22:20 ` Lukasz Michal Rak
@ 2004-07-23 8:18 ` Justinas
2004-07-23 9:30 ` Salomon, Frank
2004-07-23 9:40 ` Jan-Benedict Glaw
3 siblings, 0 replies; 20+ messages in thread
From: Justinas @ 2004-07-23 8:18 UTC (permalink / raw)
To: linux-serial
My suggestion is to check the cable, or try on another machine
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Serial port read working but not write.
2004-07-22 16:48 Serial " suresh shenoy
2004-07-22 22:20 ` Lukasz Michal Rak
2004-07-23 8:18 ` Justinas
@ 2004-07-23 9:30 ` Salomon, Frank
2004-07-23 10:02 ` Jan-Benedict Glaw
2004-07-23 9:40 ` Jan-Benedict Glaw
3 siblings, 1 reply; 20+ messages in thread
From: Salomon, Frank @ 2004-07-23 9:30 UTC (permalink / raw)
To: linux-serial
Hi,
the problem is you need a procedure which find out what the problem is.
Hardware check:
Your hole hardware you can divided in:
- PC - com port
- cable
- external Hardware
Check the com-port:
create a cable bridge between pin 2 and 3 of you port.
run # dd bs=1 count=1 if=/dev/ttySx | hexdump
on an other vt run # cat /dev/inittab > /dev/ttySx
If you don't see any output on the vt, which is running "dd bs=1 count=1
if=/dev/ttySx | hexdump", your com port is not working correct.
Next you can connect your cable to the PC and pug the bridge to the
end of the cable and perform the same test.
Best Regards, Frank
suresh shenoy wrote:
> Hi all,
>
> I am currently using redhat linux 9.0. I am working
> with a hardware which senses some data and sends back
> to the PC through serial port. It also can move a dc
> motor using the same hardware. I am using POSIX serial
> port programming for talking with the board. After
> some struggles i was able to read the data from the
> hardware device. But my current problem is that it is
> not moving the motor when i send a command to the
> hardware. Does anyone know the solution to this
> problem. Please let me know if any piece of code or
> any more information is required that i can furnish.
>
> Thanks & Regards,
> Suresh M Shenoy.
>
> ________________________________________________________________________
> Yahoo! India Careers: Over 65,000 jobs online
> Go to: http://yahoo.naukri.com/
> -
> To unsubscribe from this list: send the line "unsubscribe linux-serial" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Serial port read working but not write.
2004-07-22 16:48 Serial " suresh shenoy
` (2 preceding siblings ...)
2004-07-23 9:30 ` Salomon, Frank
@ 2004-07-23 9:40 ` Jan-Benedict Glaw
3 siblings, 0 replies; 20+ messages in thread
From: Jan-Benedict Glaw @ 2004-07-23 9:40 UTC (permalink / raw)
To: linux-serial
[-- Attachment #1: Type: text/plain, Size: 1918 bytes --]
On Thu, 2004-07-22 17:48:03 +0100, suresh shenoy <msureshshenoy@yahoo.co.in>
wrote in message <20040722164803.5219.qmail@web8206.mail.in.yahoo.com>:
> I am currently using redhat linux 9.0. I am working
> with a hardware which senses some data and sends back
> to the PC through serial port. It also can move a dc
> motor using the same hardware. I am using POSIX serial
There are several possibilities that come to mind:
- You're sending with wrong parity and ignore parity on read,
but your device doesn't.
- Your cable is broken.
- You're sending the wrong command :-)
- Input and output speed differ
- Wrong handshake settings in place, with a cable that make your
computer think the device won't accept data right now.
It would help a lot if you had a serial sniffer. From personal
experience, the last point (handshake+cable) has good chances. For a
test, you may want to poll how many bytes are in your output-buffer:
{
int ret;
int bytes;
ret = ioctl (fd, TIOCOUTQ, &bytes);
if (ret != 0)
fprintf (stderr, "Problem querying outqueue\n");
else
printf ("Outqueue: %d bytes\n", bytes);
}
If the number rises (and never goes back to zero), then it's likely a
handshake and/or cabling problem. If it goes down to zero at some time
(up to seconds, depends on your serial speed:) then it's more likely a
parity error or you're sending wrong commands. However, it *could* also
be a handshake problem (you get signaled that you're allowed to send,
but the device cannot handle more data and throws it away).
MfG, JBG
--
Jan-Benedict Glaw jbglaw@lug-owl.de . +49-172-7608481 _ O _
"Eine Freie Meinung in einem Freien Kopf | Gegen Zensur | Gegen Krieg _ _ O
fuer einen Freien Staat voll Freier Bürger" | im Internet! | im Irak! O O O
ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Serial port read working but not write.
2004-07-23 9:30 ` Salomon, Frank
@ 2004-07-23 10:02 ` Jan-Benedict Glaw
2004-07-23 12:12 ` Salomon, Frank
0 siblings, 1 reply; 20+ messages in thread
From: Jan-Benedict Glaw @ 2004-07-23 10:02 UTC (permalink / raw)
To: linux-serial
[-- Attachment #1: Type: text/plain, Size: 1338 bytes --]
On Fri, 2004-07-23 11:30:11 +0200, Salomon, Frank <frank.salomon@wincor-nixdorf.com>
wrote in message <4100DAA3.7060205@wincor-nixdorf.com>:
> Hi,
> the problem is you need a procedure which find out what the problem is.
> Hardware check:
> Your hole hardware you can divided in:
> - PC - com port
> - cable
> - external Hardware
>
> Check the com-port:
> create a cable bridge between pin 2 and 3 of you port.
> run # dd bs=1 count=1 if=/dev/ttySx | hexdump
> on an other vt run # cat /dev/inittab > /dev/ttySx
>
> If you don't see any output on the vt, which is running "dd bs=1 count=1
> if=/dev/ttySx | hexdump", your com port is not working correct.
This doesn't need to work, depending on handshake settings. Also, (at
least in theory), you can have different sending and receiving speeds...
> Next you can connect your cable to the PC and pug the bridge to the
> end of the cable and perform the same test.
...which also depends on tty settings.
man stty
MfG, JBG
--
Jan-Benedict Glaw jbglaw@lug-owl.de . +49-172-7608481 _ O _
"Eine Freie Meinung in einem Freien Kopf | Gegen Zensur | Gegen Krieg _ _ O
fuer einen Freien Staat voll Freier Bürger" | im Internet! | im Irak! O O O
ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Serial port read working but not write.
2004-07-23 10:02 ` Jan-Benedict Glaw
@ 2004-07-23 12:12 ` Salomon, Frank
2004-07-23 12:41 ` Jan-Benedict Glaw
0 siblings, 1 reply; 20+ messages in thread
From: Salomon, Frank @ 2004-07-23 12:12 UTC (permalink / raw)
To: linux-serial
Jan-Benedict Glaw wrote:
> On Fri, 2004-07-23 11:30:11 +0200, Salomon, Frank <frank.salomon@wincor-nixdorf.com>
> wrote in message <4100DAA3.7060205@wincor-nixdorf.com>:
>
>>Hi,
>>the problem is you need a procedure which find out what the problem is.
>>Hardware check:
>>Your hole hardware you can divided in:
>>- PC - com port
>>- cable
>>- external Hardware
>>
>>Check the com-port:
>>create a cable bridge between pin 2 and 3 of you port.
>>run # dd bs=1 count=1 if=/dev/ttySx | hexdump
>>on an other vt run # cat /dev/inittab > /dev/ttySx
>>
>>If you don't see any output on the vt, which is running "dd bs=1 count=1
>>if=/dev/ttySx | hexdump", your com port is not working correct.
>
>
> This doesn't need to work, depending on handshake settings. Also, (at
> least in theory), you can have different sending and receiving speeds...
>
>
>>Next you can connect your cable to the PC and pug the bridge to the
>>end of the cable and perform the same test.
>
>
> ...which also depends on tty settings.
>
> man stty
>
> MfG, JBG
>
Hi,
it there any linux OS on which that test does not work after reboot ?
Mit freundlichen Gruessen,
Best regards,
Frank
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Serial port read working but not write.
2004-07-23 12:12 ` Salomon, Frank
@ 2004-07-23 12:41 ` Jan-Benedict Glaw
2004-07-23 12:50 ` Salomon, Frank
0 siblings, 1 reply; 20+ messages in thread
From: Jan-Benedict Glaw @ 2004-07-23 12:41 UTC (permalink / raw)
To: linux-serial
[-- Attachment #1: Type: text/plain, Size: 1472 bytes --]
On Fri, 2004-07-23 14:12:49 +0200, Salomon, Frank <frank.salomon@wincor-nixdorf.com>
wrote in message <410100C1.5030404@wincor-nixdorf.com>:
> Jan-Benedict Glaw wrote:
> >On Fri, 2004-07-23 11:30:11 +0200, Salomon, Frank
> ><frank.salomon@wincor-nixdorf.com>
> >wrote in message <4100DAA3.7060205@wincor-nixdorf.com>:
> >>the problem is you need a procedure which find out what the problem is.
> >>Hardware check:
> >>Your hole hardware you can divided in:
> >>- PC - com port
> >>- cable
> >>- external Hardware
[...]
> >This doesn't need to work, depending on handshake settings. Also, (at
> >least in theory), you can have different sending and receiving speeds...
> >
> >man stty
> it there any linux OS on which that test does not work after reboot ?
The point is like this: something in your serial settings *is* already
broken, so the last thing you want is to *rely* on the serial port's
config state. With a good chance (especially in this case), exactly this
is what is wrong.
I hope you don't do C programming with depending on undefined
behavior...
MfG, JBG
PS: Please trim messages properly...
--
Jan-Benedict Glaw jbglaw@lug-owl.de . +49-172-7608481 _ O _
"Eine Freie Meinung in einem Freien Kopf | Gegen Zensur | Gegen Krieg _ _ O
fuer einen Freien Staat voll Freier Bürger" | im Internet! | im Irak! O O O
ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Serial port read working but not write.
2004-07-23 12:41 ` Jan-Benedict Glaw
@ 2004-07-23 12:50 ` Salomon, Frank
2004-07-23 13:14 ` Jan-Benedict Glaw
0 siblings, 1 reply; 20+ messages in thread
From: Salomon, Frank @ 2004-07-23 12:50 UTC (permalink / raw)
To: linux-serial
Jan-Benedict Glaw wrote:
> On Fri, 2004-07-23 14:12:49 +0200, Salomon, Frank <frank.salomon@wincor-nixdorf.com>
> wrote in message <410100C1.5030404@wincor-nixdorf.com>:
>
>>Jan-Benedict Glaw wrote:
>>
>>>On Fri, 2004-07-23 11:30:11 +0200, Salomon, Frank
>>><frank.salomon@wincor-nixdorf.com>
>>>wrote in message <4100DAA3.7060205@wincor-nixdorf.com>:
>>>
>>>>the problem is you need a procedure which find out what the problem is.
>>>>Hardware check:
>>>>Your hole hardware you can divided in:
>>>>- PC - com port
>>>>- cable
>>>>- external Hardware
>
> [...]
>
>>>This doesn't need to work, depending on handshake settings. Also, (at
>>>least in theory), you can have different sending and receiving speeds...
>>>
>>>man stty
>
>
>>it there any linux OS on which that test does not work after reboot ?
>
>
> The point is like this: something in your serial settings *is* already
> broken, so the last thing you want is to *rely* on the serial port's
> config state. With a good chance (especially in this case), exactly this
> is what is wrong.
Hi,
@Jan-Benedict,
sorry, is there any linux OS on which that test does not work after
reboot ? If you don't know any linux system, we can go back to the
origin problem from Suresh.
Frank
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Serial port read working but not write.
2004-07-23 12:50 ` Salomon, Frank
@ 2004-07-23 13:14 ` Jan-Benedict Glaw
2004-07-23 13:49 ` Salomon, Frank
0 siblings, 1 reply; 20+ messages in thread
From: Jan-Benedict Glaw @ 2004-07-23 13:14 UTC (permalink / raw)
To: linux-serial
[-- Attachment #1: Type: text/plain, Size: 1299 bytes --]
On Fri, 2004-07-23 14:50:07 +0200, Salomon, Frank <frank.salomon@wincor-nixdorf.com>
wrote in message <4101097F.4020205@wincor-nixdorf.com>:
> @Jan-Benedict,
> sorry, is there any linux OS on which that test does not work after
> reboot ? If you don't know any linux system, we can go back to the
> origin problem from Suresh.
:-) Serial programming is about getting a good number of settings
correct. If only one doesn't fit, it either won't really work at all, or
it'll break in strance situations (like buffer full, or like in this
case, where only one direction seems to work).
In this situation, you try to bring in some statement like "If an
adopted child had never seen their real parents, these won't exist at
all?" Sorry, please don't feed the trolls...
This situation requires to get hard facts, not to accept more
uncontrolled variables! (Try to drive a ND77 with a simple 3-wire serial
cable, you'll be convinced soon:)
MfG, JBG
--
Jan-Benedict Glaw jbglaw@lug-owl.de . +49-172-7608481 _ O _
"Eine Freie Meinung in einem Freien Kopf | Gegen Zensur | Gegen Krieg _ _ O
fuer einen Freien Staat voll Freier Bürger" | im Internet! | im Irak! O O O
ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Serial port read working but not write.
2004-07-23 13:14 ` Jan-Benedict Glaw
@ 2004-07-23 13:49 ` Salomon, Frank
2004-07-23 14:16 ` Jan-Benedict Glaw
0 siblings, 1 reply; 20+ messages in thread
From: Salomon, Frank @ 2004-07-23 13:49 UTC (permalink / raw)
To: linux-serial
Jan-Benedict Glaw wrote:
> On Fri, 2004-07-23 14:50:07 +0200, Salomon, Frank <frank.salomon@wincor-nixdorf.com>
> wrote in message <4101097F.4020205@wincor-nixdorf.com>:
>
>>@Jan-Benedict,
>>sorry, is there any linux OS on which that test does not work after
>>reboot ? If you don't know any linux system, we can go back to the
>>origin problem from Suresh.
>
>
> :-) Serial programming is about getting a good number of settings
> correct. If only one doesn't fit, it either won't really work at all, or
> it'll break in strance situations (like buffer full, or like in this
> case, where only one direction seems to work).
>
> In this situation, you try to bring in some statement like "If an
> adopted child had never seen their real parents, these won't exist at
> all?" Sorry, please don't feed the trolls...
>
> This situation requires to get hard facts, not to accept more
> uncontrolled variables! (Try to drive a ND77 with a simple 3-wire serial
> cable, you'll be convinced soon:)
@Jan-Benedict,
Hi,
you are right, but do you forget we discus a simple "hardware check"?
I only explain a simple procedure to check the hardware, to make sure
that it is not a hardware failure. You answer : my hardware check does
not need to work and give no example in which way it work correct. You
don't answer my question.
@all,
Again:
- reboot the system
- perform the hardware check
- and we know more
I will wait for a feedback from Suresh.
Best regards, Frank
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Serial port read working but not write.
2004-07-23 13:49 ` Salomon, Frank
@ 2004-07-23 14:16 ` Jan-Benedict Glaw
0 siblings, 0 replies; 20+ messages in thread
From: Jan-Benedict Glaw @ 2004-07-23 14:16 UTC (permalink / raw)
To: linux-serial
[-- Attachment #1: Type: text/plain, Size: 1740 bytes --]
On Fri, 2004-07-23 15:49:12 +0200, Salomon, Frank <frank.salomon@wincor-nixdorf.com>
wrote in message <41011758.8050000@wincor-nixdorf.com>:
> @Jan-Benedict,
> Hi,
> you are right, but do you forget we discus a simple "hardware check"?
"serial" and "simple" won't match, ever.
> I only explain a simple procedure to check the hardware, to make sure
> that it is not a hardware failure. You answer : my hardware check does
> not need to work and give no example in which way it work correct. You
> don't answer my question.
If you see no output with such a short-circuit plug, what does that tell
you? Nothing. Hardware may be quite okay, but it's just settings. If you
use a device, make sure you match the prerequisites.
> @all,
> Again:
> - reboot the system
> - perform the hardware check
> - and we know more
You don't. It may (accidentally, because you rely on unspecified
behaviour) or may not work.
Just set _correct_ settings with stty, then you know *for sure*.
That is, at least:
- set matching ispeed/ospeed
- disable xon/xoff, disable crtscts
- set CS8
- set clocal and cread
- set vmin to 1, vtim to 0
- disable hupctl
...to only name the most important ones. "stty -F /dev/ttyS<something>
-a" will tell you more.
If this test (without setting appropriate valies before trying it)
fails, you can conclude *nothing* from that.
MfG, JBG
--
Jan-Benedict Glaw jbglaw@lug-owl.de . +49-172-7608481 _ O _
"Eine Freie Meinung in einem Freien Kopf | Gegen Zensur | Gegen Krieg _ _ O
fuer einen Freien Staat voll Freier Bürger" | im Internet! | im Irak! O O O
ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 20+ messages in thread
* Serial port read working but not write.
@ 2004-07-24 2:04 suresh shenoy
0 siblings, 0 replies; 20+ messages in thread
From: suresh shenoy @ 2004-07-24 2:04 UTC (permalink / raw)
To: linux-serial
Hi all,
Thanks for such a quick response. I will mail you
the results of the test by this evening. I really
enjoyed this forum as the response was quick and
lively compared to some other forums.
Ciao
Suresh
________________________________________________________________________
Yahoo! India Careers: Over 65,000 jobs online
Go to: http://yahoo.naukri.com/
^ permalink raw reply [flat|nested] 20+ messages in thread
* serial port read working but not write
@ 2004-07-24 14:39 suresh shenoy
2004-07-24 15:11 ` Jan-Benedict Glaw
0 siblings, 1 reply; 20+ messages in thread
From: suresh shenoy @ 2004-07-24 14:39 UTC (permalink / raw)
To: linux-serial
Hi all,
Firstly vijay's answer:
The hardware has a firmware on it which is given
by the company which manufactured it.
The system works fine in Windows. i.e i can make
the motor run in windows. The software was provided by
the company.
Secondly
After I run my read program i checked the port
settings.
$ stty -F /dev/ttyS0 -a
speed 115200 baud; rows 0; columns 0; line =0;
.....................
.....................
flush = ^M; min = 200; time =0;
-parenb -parodd CS8 -hupcl -cstopb cread clocal
-crtscts
-ignbrk -brkint ignpar.....
.....................
Thirdly,
I ran the program to check the output buffer
[buffer sniffing].
When i ran the read program the output was
always 0.
When i ran the write program the output
increased to 1500-1900 and stayed there.
Lastly,
I am yet to check the results of the port as
told by Frank. I will post it very soon.
Any suggestions.
Ciao
Suresh
________________________________________________________________________
Yahoo! India Careers: Over 65,000 jobs online
Go to: http://yahoo.naukri.com/
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: serial port read working but not write
2004-07-24 14:39 suresh shenoy
@ 2004-07-24 15:11 ` Jan-Benedict Glaw
0 siblings, 0 replies; 20+ messages in thread
From: Jan-Benedict Glaw @ 2004-07-24 15:11 UTC (permalink / raw)
To: linux-serial
[-- Attachment #1: Type: text/plain, Size: 850 bytes --]
On Sat, 2004-07-24 15:39:49 +0100, suresh shenoy <msureshshenoy@yahoo.co.in>
wrote in message <20040724143949.21583.qmail@web8204.mail.in.yahoo.com>:
> When i ran the write program the output
> increased to 1500-1900 and stayed there.
So no data is ever sent out to the hardware. So there seems to be some
kind of hardware-related problem. Could you please once set the IRQ line
to 0? IIRC, that should put the UART into polling mode, which should
help if there's an interrupt problem...
MfG, JBG
--
Jan-Benedict Glaw jbglaw@lug-owl.de . +49-172-7608481 _ O _
"Eine Freie Meinung in einem Freien Kopf | Gegen Zensur | Gegen Krieg _ _ O
fuer einen Freien Staat voll Freier Bürger" | im Internet! | im Irak! O O O
ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 20+ messages in thread
* serial port read working but not write.
@ 2004-07-24 23:36 suresh shenoy
2004-07-26 7:24 ` Salomon, Frank
0 siblings, 1 reply; 20+ messages in thread
From: suresh shenoy @ 2004-07-24 23:36 UTC (permalink / raw)
To: linux-serial
Hi all,
Frank,
I tried that test. It told me that hexdump was
not a option in dd. I dont know much about dd so i
read the man pages but could not figure out.
Secondly,
I changed the interrupt to 0 but still the
numbers are increasing.
One thing that i did recognize is the baud rate
for send was wrong which i changed to 115200 and then
tried again but it still dint work. I am sending the
correct packets. There could be no errors there. Also
there is no parity in this program.
Thanks & Regards,
Suresh
________________________________________________________________________
Yahoo! India Careers: Over 65,000 jobs online
Go to: http://yahoo.naukri.com/
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: serial port read working but not write.
2004-07-24 23:36 serial " suresh shenoy
@ 2004-07-26 7:24 ` Salomon, Frank
2004-07-26 8:12 ` Jan-Benedict Glaw
0 siblings, 1 reply; 20+ messages in thread
From: Salomon, Frank @ 2004-07-26 7:24 UTC (permalink / raw)
To: linux-serial
suresh shenoy wrote:
> Hi all,
>
>
> Frank,
>
> I tried that test. It told me that hexdump was
> not a option in dd. I dont know much about dd so i
> read the man pages but could not figure out.
>
>
> Secondly,
>
> I changed the interrupt to 0 but still the
> numbers are increasing.
>
> One thing that i did recognize is the baud rate
> for send was wrong which i changed to 115200 and then
> tried again but it still dint work. I am sending the
> correct packets. There could be no errors there. Also
> there is no parity in this program.
>
> Thanks & Regards,
> Suresh
Hi Suresh,
did you forget "|" in the command ?
dd bs=1 count=1 if=/dev/ttySx | hexdump
You can try to run the command:
setserial /dev/ttySx autoconfig auto_irq
before you perform the test. That command will set the correct interrupt.
Best regards, Frank
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: serial port read working but not write.
2004-07-26 7:24 ` Salomon, Frank
@ 2004-07-26 8:12 ` Jan-Benedict Glaw
2004-07-28 19:29 ` suresh shenoy
0 siblings, 1 reply; 20+ messages in thread
From: Jan-Benedict Glaw @ 2004-07-26 8:12 UTC (permalink / raw)
To: linux-serial
[-- Attachment #1: Type: text/plain, Size: 894 bytes --]
On Mon, 2004-07-26 09:24:27 +0200, Salomon, Frank <frank.salomon@wincor-nixdorf.com>
wrote in message <4104B1AB.7090005@wincor-nixdorf.com>:
> suresh shenoy wrote:
> You can try to run the command:
>
> setserial /dev/ttySx autoconfig auto_irq
>
> before you perform the test. That command will set the correct interrupt.
*cogh* that should possibly at least work for PC's standard two serial
ports. Specifically autoconfig and auto_irq were IIRC discussed several
times for removal, because they don't work reliable in all situations.
MfG, JBG
--
Jan-Benedict Glaw jbglaw@lug-owl.de . +49-172-7608481 _ O _
"Eine Freie Meinung in einem Freien Kopf | Gegen Zensur | Gegen Krieg _ _ O
fuer einen Freien Staat voll Freier Bürger" | im Internet! | im Irak! O O O
ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: serial port read working but not write.
2004-07-26 8:12 ` Jan-Benedict Glaw
@ 2004-07-28 19:29 ` suresh shenoy
2004-07-28 20:08 ` Jan-Benedict Glaw
0 siblings, 1 reply; 20+ messages in thread
From: suresh shenoy @ 2004-07-28 19:29 UTC (permalink / raw)
To: linux-serial
Hi all,
Thanks for your support. I have just this question.
I have been trying to fix the problem but still its
getting messy. The thing i want to know is if a port
is all set. I mean all configured. Then both write and
read should work right. Because according to the
protocol i have 115200, N , 8 bits, 1 stop bit. Which
is correct for both the read and write programs.
Also does any one have a write program that i could
use??
Thanks & Regards,
Suresh M Shenoy
________________________________________________________________________
Yahoo! India Matrimony: Find your life partner online
Go to: http://yahoo.shaadi.com/india-matrimony
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: serial port read working but not write.
2004-07-28 19:29 ` suresh shenoy
@ 2004-07-28 20:08 ` Jan-Benedict Glaw
0 siblings, 0 replies; 20+ messages in thread
From: Jan-Benedict Glaw @ 2004-07-28 20:08 UTC (permalink / raw)
To: linux-serial
[-- Attachment #1: Type: text/plain, Size: 986 bytes --]
On Wed, 2004-07-28 20:29:43 +0100, suresh shenoy <msureshshenoy@yahoo.co.in>
wrote in message <20040728192943.44863.qmail@web8201.mail.in.yahoo.com>:
> Also does any one have a write program that i could
> use??
Easy: Just configure the port correctly (using stty), then simply use
"echo" or "printf" (right, there's a printf fos shell use) with output
redirection. printf helps you to send binary data.
Oh, I just today learned (the hard way...) that CR and LF may get
mangled at the sender's and/or receiver's side. I think
"-ocrnl -onlcr onocr -onlret -icanon -echo -echoe -echok -echonl"
may be a start against that:)
MfG, JBG
--
Jan-Benedict Glaw jbglaw@lug-owl.de . +49-172-7608481 _ O _
"Eine Freie Meinung in einem Freien Kopf | Gegen Zensur | Gegen Krieg _ _ O
fuer einen Freien Staat voll Freier Bürger" | im Internet! | im Irak! O O O
ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 20+ messages in thread
end of thread, other threads:[~2004-07-28 20:08 UTC | newest]
Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-24 2:04 Serial port read working but not write suresh shenoy
-- strict thread matches above, loose matches on Subject: below --
2004-07-24 23:36 serial " suresh shenoy
2004-07-26 7:24 ` Salomon, Frank
2004-07-26 8:12 ` Jan-Benedict Glaw
2004-07-28 19:29 ` suresh shenoy
2004-07-28 20:08 ` Jan-Benedict Glaw
2004-07-24 14:39 suresh shenoy
2004-07-24 15:11 ` Jan-Benedict Glaw
2004-07-22 16:48 Serial " suresh shenoy
2004-07-22 22:20 ` Lukasz Michal Rak
2004-07-23 8:18 ` Justinas
2004-07-23 9:30 ` Salomon, Frank
2004-07-23 10:02 ` Jan-Benedict Glaw
2004-07-23 12:12 ` Salomon, Frank
2004-07-23 12:41 ` Jan-Benedict Glaw
2004-07-23 12:50 ` Salomon, Frank
2004-07-23 13:14 ` Jan-Benedict Glaw
2004-07-23 13:49 ` Salomon, Frank
2004-07-23 14:16 ` Jan-Benedict Glaw
2004-07-23 9:40 ` Jan-Benedict Glaw
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).