|
Yup! 5.00 ish, Plugged into a dodgy hub... Interesting unit can crash and not appear as a com port...
|
|
|
|
|
Since I've been working with usbser.sys (>10 years), I've repeatedly encountered problems with the part. Since W10/11, power management has also been added to usbser.sys. This could be a cause of your problem; It's best to turn it off if possible.
|
|
|
|
|
Thank You! Got Senior to read this! with your reply I can prove it's not my program causing issues!
|
|
|
|
|
glenn, it's simpler than that... as soon as I get out of a meeting, I'll give you more details. Lived this for 20 years
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.
|
|
|
|
|
![Go to Parent](https://www.codeproject.com/App_Themes/CodeProject/Img/arrow-up24.png) Your question is ambiguous. Bear with me.
- "when it was connected to an old Win7 desktop via USB it worked with no problem"
Explain this please. device was plugged in directly to the PC? If the PC was old, USB 2.0?
- is the touch screen a real PC running Windows 11? I want to be clear to make sure we're not talking about a WinIOT bastard child or something.
- Forget about any power issues. The first thing to check is what type of hub are you putting the old device into? USB is allegedly universal, but I've seen issues with older devices.
Note on the power comments: this absolutely used to drive me instance - Windows helping to save power by turning off devices. Its like MS lives in some other dimension. First thing I would do after plugging your device in is go to Device Manager. See if you have a driver issue. Your device may be sol old it's just not supported under Win11. I have a basket full of these things.
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.
|
|
|
|
|
|
Thanks for the link, could be a Microchip thinks it's an ATMEL
|
|
|
|
|
Unfortunately the most intersting link (http://www.microchip.com/forums/download.axd?file=0;538194[^]) is not longer available
That was an explanation of the low level stuff. Maybe I saved some parts of that link, I will search for it.
On the other hand, it was before >10 years. Maybe @charlieg has better information. I'm keen on his advices ![Wink | ;)](https://www.codeproject.com/script/Forums/Images/smiley_wink.gif)
|
|
|
|
|
Nuts, it would be useful, at least it's not my dodgy code
|
|
|
|
|
make sure you are checking EVERY return status. Since we have no idea what this USB device is (you can go ahead and admit it's a serial interface ), I have found that software people have far more faith than most devout <whatever> believers.
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.
|
|
|
|
|
Yes, its a dodgy com port ( ) I think people were expecting it run like native USB.
|
|
|
|
|
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
![Wink | ;)](https://codeproject.global.ssl.fastly.net/script/Forums/Images/smiley_wink.gif)
|
|
|
|
|
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)'
![Wink | ;)](https://codeproject.global.ssl.fastly.net/script/Forums/Images/smiley_wink.gif)
|
|
|
|
|
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.
|
|
|
|