Serial Port Access in XP

N

nleahcim

Keith said:
My goals are to keep this newsgroup as useful as possible for those of
us who want to discuss the C programming language, and to help people
who ask questions here get the best possible answers.

Being that it seems about half of the posts I see on comp lang c are
posts saying that the OP is off topic, I don't see how useful it
actually is. I just think it's a way a couple people have of making
themselves feel big.
Neither goal is served by having detailed discussions of Windows XP in
this newsgroup. There are newsgroups that are dedicated to Windows
programming, and they're full of experts on that subject.

Well gosh golly gee darn it - looks like I ruined your precious ol
newsgroup by providing an answer instead of telling somebody how he is
OT. I'm so terribly sorry.
I did not call anybody's knowledge into question, except to say that
I'm not qualified to judge the solution that was posted. For all I
know, it may be the best possible solution to the OP's problem. But
nobody is perfect. For example, I make mistakes now and then, which
is why I wouldn't feel comfortable posting technical advice in a forum
where there are no experts who can catch my mistakes.

You implied I didn't know what I was talking about by saying he should
look elsewhere for the correct answer. Don't try to act innocent.
I did not criticize the OP; I gave him my best advice on how to find a
solution to his problem.

I already gave him his solution, actually. You just told him to F off
from your precious newgroup.
We have seen time and again people posting off-topic advice in this
newsgroup, and it frequently goes wrong. Sometimes the advice
contains serious errors that somebody here, just by chance, happens to
be able to correct. The solution is simple: redirect the question to
a forum full of experts on the topic. At times, I've done so *and*
offered to answer the question in the more appropriate newsgroup.

Pay attention to this newsgroup for a while, and you'll see that I'm
right.

I do pay attention to this newsgroup - and like I said, way too many
posts here are "google it" or "post in xyz group" or "what part of
'comp.lang.c' do you not understand?" or other nonsense like that.
And I'll also point out that, unlike you, I did not feel the need to
be personally insulting while making these points.

Actually - I'm pretty sure you're the one that implied that I don't
know what I'm talking about.

I'm pretty sure that's the advice I gave you already. Is this one of
those games little kids play when they repeat what everybody else says
just to be annoying? I encourage you to re-read my advice.

This is my last post in this thread that is not on the topic of
accessing the serial port from within C. I, unlike the rest of you, am
actually interested in helping people. I use newsgroups to seek help
with my problems - and when I see people having problems that I know
the solution to, I offer my help. I would encourage you all to do the
same, instead of this trivial and pitiful bickering yall are resorting
to. If anybody has more questions about serial programming from within
Windows - feel free to ask me - just a couple weeks ago I had to get
overlapped serial communication working in a Windows program. (I used
GTK+ + mingw + windows API) It isn't as bad as some articles make it
out to be, but the overlapped aspect of it can be a bit tricky as it
requires a multi threaded application.

-Mike
 
N

nleahcim

jacob said:
After a quick reading of that link I found it quite OK, there were no
aparent mistakes, at least it is a start that can suffice for the
OP to get started. This is quite a normal procedure here, I have seen
a lot of UNIX advise that goes unnoticed without any remarks.

In the FAQ there are examples for DOS (yes still there). That was a time
when people here were less cold maybe. Or maybe they were all a little
bit younger who knows :)

I find (e-mail address removed) was right to share his knowledge with the OP.

Hi Jacob - I used that page as a starting point for getting serial
comms working. You can pretty much just copy and paste the code and
have a working application. It is a fantastic guide, IMHO. It doesn't
cover overlapped communication - but that is an order of magnitude more
complicated and beyond what most people need.

I'm glad you agree that it is appropriate to share knowledge, even when
the topic is not 100% on topic.

-Mike
 
R

Richard Heathfield

(e-mail address removed) said:
Being that it seems about half of the posts I see on comp lang c are
posts saying that the OP is off topic, I don't see how useful it
actually is.

That's not an ideal situation, but it sure beats the situation we'd have if
we didn't remind people of the topic of this newsgroup - i.e. thousands of
off-topic posts each week, until eventually the C experts get fed up of
trying to find topical material among the dross and stop using the group,
thus depriving Usenet of a considerable amount of C expertise.
I just think it's a way a couple people have of making
themselves feel big.

It isn't. Just because you don't understand the reasons for people's
behaviour, that doesn't mean that their behaviour is selfish or malign. It
could just be that they have excellent reasons for saying what they say -
and that is the case here.
You implied I didn't know what I was talking about by saying he should
look elsewhere for the correct answer.

No, he didn't. For all he knows, you might be the principal designer of
Windows XP - or you might be the janitor at Stumpy's Fruit Emporium. You
may be an expert, or just a convincing-sounding nutcase. He has no way of
knowing which. So his proper action is to refer the OP to a newsgroup
frequented by /many/ Windows experts.
Don't try to act innocent.

Stop trying to impute guilt where there is none. If you have the best
interests of the OP at heart, you, too, will want him to use a newsgroup
where he can be sure of high-quality advice that is peer-reviewed by
acknowledged experts in the field.

<snip>
 
P

pete

I see - so not only do you feel a need to criticize the OP - but you
also feel a need to call into question the knowledge of those that try
to help the OP.

There is a need to call into question the knowledge
of those that try to help the OP.
Everybody who posts on topic here, gets corrected once in while.
Why should somebody posting off topic, be assumed to be correct?
Could you be any less helpful? I mean honestly. What
goal are you trying to accomplish with the above quoted post?

He was alerting the OP, that the chances of getting
a wrong answer without correction,
are much smaller on a newsgroup where his question is on topic.
 
N

nleahcim

goose said:
Could you rather perhaps attempt to make this your last post
in this newsgroup instead?

Sorry, just failed that request.
As do we all; we frequently offer to answer a question
in the appropriate newsgroup. Keith himself sometimes
says "This is offtopic here but ontopic in
comp.unix.programmer where I can answer it".

Hmm - in my experience with Keith - he gave a nearly identical response
to that in this thread.
Further down I see a thread where Richard Heathfield
says that the question would be /more/ suited to
comp.programming rather than here, but attempts to answer
it anyway.

Richard seems to me to be one of the few regulars interested in helping
people.
The difference between you and them is that they
would rather a question be answered by a group of
experts in a field.

I don't feel a need to ask a group of people when one person has
already given me a good answer. But hey - that's just me.
So you feel that it's fine for me to re-post my explanation
of "how to change a cambelt" from alt....autos to here because
it just might help someone who asked about an oilchange?

If somebody asks about it, why not?
You're a little too full of yourself; and this is
coming from someone who has done various serial
protocols (not just "serial port programming") on
8-bit, 16-bit, 32-bit and 64-bit hardware.

Hmm, I've only done it so far on 8b and 32b microcontrollers (and my
32b XP system). My code would work on a 64b system. Never had a need to
use a 16b chip as none have ever met my needs. I don't see how I'm full
of myself though - I know what I think is a very good and easy answer
to his problem, and I'm offering to help if he needs help. I know my
answer works because I'm currently using it.
I see that this is your first non-trivial program

Not at all. But it was the first where I had to get a GUI running
within windows that could access the serial port.
and/or your first "serial port programming" program[1].

Well Done!

[1] All the multi-threaded serial-port programs
I've seen were "firsts". After the first one the
smart programmer generally learns the error of
their ways and writes it properly the next time.

Huh? Is it possible to have overlapped serial comms without
multi-threading? You do know what I mean by overlapped, yes? The MSDN
article made it seem that it wasn't. Also, for my application, I can't
possibly imagine how I could do it without multi-threading, unless
there is some way for some sort of interrupt to be generated whenever a
new byte is received over the serial port. I followed the way the MSDN
article said to do it - I figure the people there probabaly have more
experience and more expertise than myself in the matter.

Seriously - if you know of a way to accomplish overlapped serial
communication - I would love to hear about it. If you feel it is off
topic for this newsgroup than please e-mail it to me, or move the topic
to a new newsgroup. Actually, come to think of it - I suppose it
probabaly is possible to do without threads I believe - by just sending
whatever you want sent using overlapped comms and then not waiting for
it to complete, and constantly checking for a new byte. Is that the
method you are referring to? I suppose that would work ok, though I
prefer the threaded method.

-Mike
 
K

Kenny McCormack

(e-mail address removed) wrote:



Only to unobservant nitwits.

Good point. The reality is (a lot) closer to 100%.

I believe there was an actual instance of a post, written by a regular,
addressed to an outsider, that was actually useful to said outsider, I
think, back in 1997.
 
K

Keith Thompson

Being that it seems about half of the posts I see on comp lang c are
posts saying that the OP is off topic, I don't see how useful it
actually is. I just think it's a way a couple people have of making
themselves feel big.

You're mistaken. I've explained why we do what we do here.
Well gosh golly gee darn it - looks like I ruined your precious ol
newsgroup by providing an answer instead of telling somebody how he is
OT. I'm so terribly sorry.


You implied I didn't know what I was talking about by saying he should
look elsewhere for the correct answer. Don't try to act innocent.

I did not imply that you don't know what you're talking about with
respect to serial port access in Windows XP. For all I know, you
could be an expert on the topic. If you know anything about it at
all, you almost certainly know more about it than I do.

He would have been better off posting his question in a more
appropriate forum. You would have been better off posting your answer
in a more appropriate forum.

Both the original question and your answering it here were
understandable errors, easily corrected. It's your stubborn
insistence that (a) I've implied that you advice was incorrect rather
than off-topic, and (b) that off-topic advice is appropriate that I
find annoying.
I already gave him his solution, actually. You just told him to F off
from your precious newgroup.

I did no such thing. I offered him advice about where to find good
information. If that information happens to include the advice you
posted here, that's great.
I do pay attention to this newsgroup - and like I said, way too many
posts here are "google it" or "post in xyz group" or "what part of
'comp.lang.c' do you not understand?" or other nonsense like that.


Actually - I'm pretty sure you're the one that implied that I don't
know what I'm talking about.

I did no such thing. I suppose I can understand why you took it that
way, but it is not what I meant.

Think about this. Suppose someone came to you with a question about
serial port access in Windows XP. Suppose you didn't have time to
answer, but wanted to suggest an appropriate Usenet newsgroup for his
question. Would you advise him to post to comp.lang.c, or to a
Windows-specific newsgroup?
 
K

Kenny McCormack

You're mistaken. I've explained why we do what we do here.

Yes, you have. But, you see, the thing is, we think you are lying.

Same goes for Heathfield. You see, he can go on for pages and pages,
explaining the stock dogmatic position in gory, excruciating detail, but
we all still know he's just yanking our chains.
 
G

goose

This is my last post in this thread that is not on the topic of

Could you rather perhaps attempt to make this your last post
in this newsgroup instead?
accessing the serial port from within C. I, unlike the rest of you, am
actually interested in helping people. I use newsgroups to seek help
with my problems - and when I see people having problems that I know
the solution to, I offer my help.

As do we all; we frequently offer to answer a question
in the appropriate newsgroup. Keith himself sometimes
says "This is offtopic here but ontopic in
comp.unix.programmer where I can answer it".

Further down I see a thread where Richard Heathfield
says that the question would be /more/ suited to
comp.programming rather than here, but attempts to answer
it anyway.

The difference between you and them is that they
would rather a question be answered by a group of
experts in a field.
I would encourage you all to do the
same, instead of this trivial and pitiful bickering yall are resorting
to.

So you feel that it's fine for me to re-post my explanation
of "how to change a cambelt" from alt....autos to here because
it just might help someone who asked about an oilchange?
If anybody has more questions about serial programming from within
Windows - feel free to ask me - just a couple weeks ago I had to get
overlapped serial communication working in a Windows program. (I used
GTK+ + mingw + windows API) It isn't as bad as some articles make it

You're a little too full of yourself; and this is
coming from someone who has done various serial
protocols (not just "serial port programming") on
8-bit, 16-bit, 32-bit and 64-bit hardware.
out to be, but the overlapped aspect of it can be a bit tricky as it
requires a multi threaded application.

I see that this is your first non-trivial program
and/or your first "serial port programming" program[1].

Well Done!

[1] All the multi-threaded serial-port programs
I've seen were "firsts". After the first one the
smart programmer generally learns the error of
their ways and writes it properly the next time.
 
G

goose

jacob navia wrote:
I find (e-mail address removed) was right to share his knowledge with the OP.
Of course he was, just not here, thats all.

I'd like to politely advise against ratifying responses that
are this far off-topic. As one of the regs here, you already
know why posters are redirected to appropriate groups[1].

Hell, I remember when you first came here[2] and
got dejected at the responses (IIRC, you could not
understand why no one was more supportive of your
project), but you still stayed at least fairly on-topic.

[1] And as much as I visit here, I still do stupid
things (see post above where I got chastised for
asking poster not to top-post without saying
what top-posting was) that I really should not be
doing.
[2] 3 years ago? 4?
 
R

Richard Heathfield

(e-mail address removed) said:
goose wrote:


I don't feel a need to ask a group of people when one person has
already given me a good answer. But hey - that's just me.

Unfortunately, whilst it is often possible for Q to determine whether A's
answer is /bad/, it is not always possible to know whether it's /good/.
This is especially true in programming. For example:

Q: if I've got a number in text form, in a string, and I want it in numeric
form, how do I do that?
A: int i = (int)str;

Q knows enough about C to realise this is wrong. He might give it a whirl
anyway out of sheer desperation, but it's easily identifiable as a bad
answer (as is almost /any/ answer that includes a cast!).

But if it goes like this instead:

Q: if I've got a number in text form, in a string, and I want it in numeric
form, how do I do that?
A: int i = atoi(str);

then Q has received some advice which, when followed, certainly seems to
work. So how is he to know that it's bad advice? (Which it is.)

Had the question been asked in comp.windows.xp.whatever, then that might be
the only answer he gets. As far as he's concerned, it appears to be a
"good" answer. Nobody corrects it. Nobody nitpicks it. Maybe he even gets
two or three people suggesting it. But the /best/ answer he gets might well
be the one that goes "have you considered asking the folks in comp.lang.c?"
Because over in comp.lang.c we could not only give him the right answer to
the question but also explain why the answer he already received, whilst
beguilingly close, is not actually a good answer after all.

Horses for courses. C experts tend to stick around here, and Windows experts
tend to stick around Windows groups, and Linux experts stick around Linux
groups, and Mac experts te... well, you get the idea.

<snip>
 
M

Mark McIntyre

You implied I didn't know what I was talking about

He did not. You imagined that.
by saying he should
look elsewhere for the correct answer.

Which is absolutely correct.
I already gave him his solution, actually.

Quite possibly, but thats unverifiable in comp.lang.c, since the
windows gurus don't hang out here..
You just told him to F off from your precious newgroup.

Keith did no such thing. Stop being so foolishly hyperbolic.
This is my last post in this thread that is not on the topic of
accessing the serial port from within C. I, unlike the rest of you, am
actually interested in helping people.

From your posts here to date, I disagree. You seem mainly interested
in defending your injured pride against imaginary attacks, and in
insulting the regulars.
--
Mark McIntyre

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan
 
O

Old Wolf

Being that it seems about half of the posts I see on comp lang c are
posts saying that the OP is off topic,

Gross hyperbole.
This is my last post in this thread that is not on the topic of
accessing the serial port from within C.
Untrue.

but the overlapped aspect of it can be a bit tricky as it
requires a multi threaded application.

Untrue. I once wrote a serial port application using overlapped
I/O and it was single-threaded. In fact that was the reason for
using overlapped I/O -- so I did not have to use threads!
You implied I didn't know what I was talking about by saying he should
look elsewhere for the correct answer.

You inferred it. Big difference.

Now, why should anyone trust your answer over a bar of soap?
You have posted several false statements on this thread.
Further, you resist calls for the question to be asked on a
group where experts are present.

I can only conclude that you are trying to make yourself feel
big, by posturing as if you are helping someone, and are
afraid that you will be shown up as ignorant if a real expert
were to criticize your "answer".

Finally, you seem to be suggesting that it is OK for anyone to
ask a question anywhere on Usenet, and get an answer. If
that is so, why don't we just abolish the separate groups and
have one big group for all posts?

Amusingly, this shall be my last post on this thread that _is_
on the topic of Windows programming. If you want to take
me up on my comments about overlapped I/O then please
do so on an appropriate newsgroup.
 
O

osmium

Old Wolf said:
Gross hyperbole.

Yes, of course. This thread had 50 posts including yours. One of them is a
question, and one of them is a purported answer. The other 48 are bickering
of various kinds which are probably not helpful to the OP. Unless, as was
implied, he was too damn dumb to know, without being told, that there is
misinformation in some web links. Very possibly including the one he was
given here. I think most people are at least vaguely aware of the
possibility of misinformation without being told.

I am especially appalled at the implication that a team of vigilant, eagle
eyed, experts (all self appointed) are sitting over on the Windows
newsgroups ready to pounce on any link that contains bad information. The
only link monitoring I see going on all pertains to beginner tutorials.
Everything else gets off scot(sp?) free. *Posts* sometimes get checked,
not links.
 
N

nleahcim

Old said:
Untrue. I once wrote a serial port application using overlapped
I/O and it was single-threaded. In fact that was the reason for
using overlapped I/O -- so I did not have to use threads!

I corrected myself on that already. I still think it's messy (at least
in my application) for it to not be multi-threaded. I also don't think
there's a way to guarantee no loss of incoming data if it's not
multi-threaded, if you're doing any sort of serious number crunching.
But what do I know - apparently I'm full of mis-information.

I've stated my peace on all topics except for serial port access in XP,
so I'm not going to be wasting bandwidth with a response to anything OT
in this thread.

-Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,262
Messages
2,571,053
Members
48,769
Latest member
Clifft

Latest Threads

Top