|
You have a serial port which is native a usb, but for your app it is still a serial port: What 'return status' you think you can check, other than the ones from the serial port? In such a case you simply rely on usbser.sys!
Sorry, but
Quote: I have found that software people have far more faith than most devout <whatever> believers.
is wrong and is just striking. It looks like you just want to appear omniscient here
|
|
|
|
|
Lord almighty no. However, I work in a very talented set of embedded developers, and I've watched over the past 15 years them making the same mistakes again and again. Carelessly not initializing variables; not checking return codes on ALL function calls. Hell, at least put up an assert or log something. Copying code cut/paste when one common source file would do... doubling and tripling the maintenance.
Omniscient? No. Scarred, bloodied and bruised? Yep.
One product we were working on uses ftp to shuffle files from the HMI device (Windows CE) to the custom controller board. They have a dedicated network - it's just the two devices. When we started working on upgrade testing, everyone just assumed that it should always work. Turns out that the ftp requests were failing about 25% of the time. Not checking status, not implementing retry code, etc. So, the people working in that area are now bloodied, bruised and much wiser.
Charlie Gilley
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
Has never been more appropriate.
|
|
|
|
|
|
I need to interface to a very simple device with a USB port on the older Win 7 machine the driver worked, all was good. PC gets changed and upgraded to 11.
The software device get tricky to use, I implement a bodge that is documented, but not in the correct place, as I'm not allowed to update the documents, get told off for it as I have modded the software and not updated the documents, told to undo my mods which prevent crashes, Head interfaces to desk.
I'm guessing the PC on which it worked was was USB 2, but the powers that be dictate it has to be a touch PC connecting to the companny network able to run Epicore (why?), suddenly my software gets unreliable and starts to crash the device on the other end.
As for the power issue, I have checked the power levels and the Hub it was plugged into sits at around 4.5 to 4.8 Volts on the power line, plugged in directly 5.02 Volts, there may be something it.
The device appears in Dev Manager and at times disappears and reappears when connected to the hub
directly to Com 1, it says connected permantly and it the device occasionally crashes.
|
|
|
|
|
if you can tell us, what is the USB device?
I support or will have supported WinCE devices going back to the earl 2000s. One set of code builds in Xp, debugs in Xp, and I have to remind myself that Xp does not support USB 3.0. If you saw all the cables hanging off the side of my desk..... anyway, sometimes I try to mount usb 3.0 devices inside of my Xp VM. 3 hours of head banging later, I pick the correct device. I have serial, ethernet, RS485 and a few other things.
If it is USB 2.0, get a new USB 2.0 hub that has a host USB 3.0 interface.... this smells like a driver issue. Trying to use the old USB 2.0 device in a Windows 11 machine (touch has NOTHING To do with it) simply may not work.
Charlie Gilley
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
Has never been more appropriate.
|
|
|
|
|
Oh, thank you, you have said what I was thinking. Driver issue, If I run the device with lots of message box and delays (Thread.Sleep's) it will go wrong less. Take out the prompts slow down so it runs at full speed the unit crashes the device. With my slow downs the driver will crash and the device go 'hay wire' but it works.
|
|
|
|
|
Please stay away from Thread.Sleep, Application.DoEvents and similar. Let the serial port communicate in a proper way.
Read this again : Serial Comms in C# for Beginners[^]
Here especally how you handled 'private void port_DataReceived_1(object sender, SerialDataReceivedEventArgs e)'
|
|
|
|
|
Oh dear ! I wasnt thinking of that, I will have a better look over the weekend.
A timer. and the eNums oh heck!
|
|
|
|
|
|
If I only could directly contact that Guru, all my problems would be solved!
|
|
|
|
|
When I post here , asking for help
do I have to spell it out ?
"...I am looking for a solution..."
is it not obvious?
or is this forum now a " social media chat " box?
Reason for THIS post
I have recently experienced a "reply" which basically
restated / reformatted my post
and did not actually offered a solution.
End of rant
|
|
|
|
|
The members of this community all help others for free on their own time, so the help you get can range from amazing to...not always amazing. We, generally, try though.
If there's a response to one of your questions that's inappropriate you can vote it down. If there's a response which is trying to help you format a question in a way that makes it easier for others to answer then that can be helpful.
Without knowing the post I can't really address your specific complaint.
cheers
Chris Maunder
|
|
|
|
|
I do appreciate you taking time and respond.
As noted - it was a rant...
It is normal to meet people with different attitude, and
I do not believe judging, pointing out specific
would be helpful, mainly because when the one who acquires attitude " I am better then you are "
is generally immune to any suggestions to change.
I have been using and (sometime ) abusing this forum for years and most of the time the discussions have been on very professional level and helpful.
And I do appreciate that.
|
|
|
|
|
Salvatore Terress wrote: would be helpful, mainly because when the one who acquires attitude " I am better then you are "
is generally immune to any suggestions to change.
Years ago on a 'newsnet' channel (or whatever they were called then) on a technical forum for a specific language a specific user routinely told people to RTFM. Not politely. And he would go off on a rant if anyone questioned him.
Now he literally was in fact 'better than your are' probably 100% of the time because he, at that time, authored at least two books on the language. I know they were good books because I bought both of them and at least one of them I considered a primary source. (If I actually remember the name correctly then I still have books by him and they are still primary sources.)
Surprising to me given that situation how inflammatory his posts were. I can't say he was the most negative poster that I saw but he certainly ranked up there.
Salvatore Terress wrote: I do not believe judging,
So don't. Instead laugh. That is what I do. The more outrageous the more amusing I find it.
Certainly when they denigrate someone (including me) they are certainly not proving to anyone that their knowledge is better. Nor that their ability to communicate is better. Because of course if both of those were true then they could provide a clear and concise answer instead.
|
|
|
|
|
Salvatore Terress wrote: or is this forum now a " social media chat " box? Ther lounge? Definitively Yes.
Look at the top of this board.Quote: Welcome to the Lounge
For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?
The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.
The "got a programming question" in red is a link that brings you to the correct place to ask.
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
Salvatore Terress wrote: and did not actually offered a solution. Maybe there isn't a simple solution. Or perhaps your question was not clear enough for anyone to figure out what it was all about.
|
|
|
|
|
You must agree that you regularly see cases - I am not excluding CP here - where other readers are so eager to 'help' that they do not waste the time to read the entire problem description before writing down their 'contribution'.
I have learned to start my problem descriptions with a declaration of what is not my problem: E.g. I am not looking for an alternative to tool X, I am just using tool X to illustrate a general problem, and that is what I want to solve! Spelling that out in a conclusive remark is almost useless; half of the readers won't notice it. Also I have learned to be very explicit about the core of my problem, always phrasing it as a question, preferably prefixed with 'My problem is this: ... ?' - otherwise, helpers might expand to great length on any detail that you have mentioned, but only to explain the problem, not as the problem.
Having lots of people eager to help you is a great thing - and one major reason why I stick with CP. Everything comes with a price, like a fair share of 'helpful' answers that serves more to display helpfulness than to be of real help. I think that is a moderate price to pay. Others may have higher expectations. Maybe they should try SO. Maybe they return to CP after a week or a month . (I did.)
Religious freedom is the freedom to say that two plus two make five.
|
|
|
|
|
OP is well known for poorly phrased questions and complaining that he doesn't get a good enough service.
|
|
|
|
|
I agree 100%, which is why I do not offer help to the OP anymore. If one is to look at the enormous amount of questions asked it qualifies the OP as a NCV (not explaining this) to a point where it seems that we are a free lecturing institute offering, irrespective if it is time given of our own!
It now seems that it is expected of anyone who is willing to help to do so as if there is a salary involved or else... - totally disgusting.
|
|
|
|
|
trønderen wrote: where other readers are so eager to 'help' that they do not waste the time to read the entire problem description before writing down their 'contribution'.
Ah, I see you're familiar with SO's Standard Operating Procedure.
|
|
|
|
|
I will expect flaming repose , but I " all I know I learn at kindergarten " comes to mind...
This forum have very simple and pointed "rules" about working with non English speaking folks, likes me.
There is a part about "read the post "...
and that is too far down the rules list for SOME English speaking folks to read...
Unfortunately there is nada a'bout conversing with
people of different levels of TECHNICAL knowledge.
|
|
|
|
|
All feedback / answers have to be "taken with a grain of salt".
I've had to develop very thick skin because I post a lot of questions on StackOverflow and most of the time they are down-voted, answer incorrectly etc.
Check out this one which the person answered completely wrong and tried to say I was wrong[^].
In the end, I discovered the answer myself and wrote it up for myself.
I actually once posted a question to electronics.stackexchange.com (where the "engineers" tolerate nothing outside of their understanding) about why electrolytic capacitors are rated for higher voltage as the capacitance (measured in farads (uF, pF, etc) goes down.
Not only did they not answer it, they deleted my question entirely and it had taken me a long while to write up the question and I wish I still had that question because it was interesting.
I know that it must also be infinitely more difficult when there is a language difference involved also. Hope you get things worked out.
If you get a chance, check this one out where I answered the question correctly but got down-voted and then the person tried to tell me why my working code was wrong. it was ridiculous.
https://stackoverflow.com/questions/46075228/get-http-response-status-code-of-urlsession-shared-datatask/78078754#78078754[^]
|
|
|
|
|
I will say to your defense:
Most IT people (or you could make it more general, if you like: Most people with a university degree) are very poor at explaining a problem within their field of expertise to someone outside the field. Their advanced knowledge stands in the way.
Even when I ask my co-workers to explain something (I have a Master in Comp.Sci), I may have to guide them through their explanation, telling them 'First, explain how this part works, we'll take the rest afterwards', rather than everything messed up. They use terms that are specific to the stuff they are trying to explain, without explaining the term, and I have to stop them and demand an explanation. When they introduce some 'concept', I ask questions about how this concept differs from this and that older and well known concept. And so on. A good teacher/lecturer would structure his presentation, explain terms, refer to related, known stuff, and adapt the presentation to whatever background the audience has.
Most IT people just opens the sluice gates to let their immense flood of advance knowledge drown you. When the audience doesn't understand a word, the IT expert usually blames the audience Unfortunately, publishing books is so cheap nowadays that you see the same in a lot of IT books: You senses that the author is really knowledgeable, but the explanations are outright terrible. Sometimes, the better you know the subject area yourself, the more you see how bad the presentation is, how bad the examples are.
Wikipedia is certainly no exception (in many articles, not all): When I try to make sense of them, I often ask myself: Is there a single person in the world who will understand this - and also will look it up in Wikipedia? If it takes a Master to understand the article, then you probably learned enough in your studies that you know all the stuff in the article!
Some textbook authors are excellent. Some academics, even IT people, have an impressing ability to make even complex issues look easy and obvious to a lesser qualified audience. I wish we had a lot more of those. As long as that is not the case, we will have to cope with explanations that requires a lot of work to be deciphered. Sometimes you ask supplementary questions; sometimes the answer gives you the proper keywords for a google search for more understandable explanations. We won't run into those great pedagogics all the time, and have to live with it.
Religious freedom is the freedom to say that two plus two make five.
|
|
|
|
|
trønderen wrote: Some textbook authors are excellent. Some academics, even IT people, have an impressing ability to make even complex issues look easy and obvious to a lesser qualified audience. A personal story from way back when:
In my third Uni third year, we had an Electronics course and everyone said if you pass it, it's almost like having the diploma in your pocket. The amazing part was that after every course I would come out convinced I understood everything but when I would read the course again I would realize I don't have a clue. Took me a while to figure out the trick the teacher was using. He would insist on simple things until you realized how obvious they were and just gloss over complicated stuff. Almost like saying "you see 2 plus 2 equals 4 because if you take 2 fingers and 2 fingers that makes 4 fingers... and, by the way, the Laplacian of the electric field in the junction is given by this differential equation...".
He had an impressing ability of masking the the complicated things in deceptive simplicity. Although I passed the course, cannot say I enjoyed it.
Mircea
|
|
|
|
|
I fully believe you story. Maybe that lecturer did not belong in the class of 'excellent' lecturers. Glossing over complexity can be very counter-productive, as you indicate.
However: Grasping the main idea, maybe in a somewhat simplistic way, can be an essential stepping stone. There are exception situations, corner cases, that require special consideration. They can come later. Grasp the main ideas first, even if they do not cover everything.
A good lecturer will make it clear where you might encounter exceptions to the main rules, and those cases will be looked at later. A bad lecturer will use his immense knowledge by rushing on to all the corner cases and exceptions long before the students have had an opportunity to digest the normal case.
Regarding calculus concepts: Lots of students have merely learned 'That's the way we do it!' and have really never truly understood why that's the way to do it. That nature is that way - it is obvious and natural! A good lecturer makes it obvious to you why it simply has to be that way, why the calculus is the way it is.
I remember from my high school years when I got hold of some good books in relativity, and one night realized that the twin paradox simply had to be that way! Anything else would have been completely illogical! Later, I tried to find other textbooks that would explain more advanced topics in relativity in a manner that made it equally obvious. I never found any. But when I was 16-17 yo, I was at the stage where special relativity was an obvious thing to me, even though I was certainly not a calculus wiz kid - not then, and never since.
To me, as a teenager, the twin paradox was self-evident even without advanced differential math. A relativity wiz would probably say that my accept for the twin paradox as something obvious is little worth, it doesn't reflect all the complexity of the calculus. That may be right, but if I can fully accept and and appreciate the twin paradox without all that calculus, I have come a long way compared to a lot of the people around me!
When I ask someone to explain a solution to me, I always ask them to first present an 'intuitive' solution. Your mainline thoughts, void of mathematical details, data types, lambdas, locking mechanisms ... Which principles do you follow in this solution? I consider calculus to be at the coding level. You can say a lot about a system without referring to implementation code. You can say a lot about relativity without going into calculus. And about electrical fields. Just like good system documentation should lead you up to and prepare you for the implementation code, a good lecture on electrical fields or the twin paradox should lead you up to the calculus to take it further. A good one, that is. Not all lectures are good ones.
Religious freedom is the freedom to say that two plus two make five.
|
|
|
|
|