Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Question about PC's & USB

Question about PC's & USB

Scheduled Pinned Locked Moved The Lounge
helpquestioncom
32 Posts 7 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J jochance

    It's sometimes hard to say what is windows versus what is a device manufacturer doing something in their driver. I'm pretty sure I have had Windows 10 tell me I was pulling too much current on the USB and shut the port down temporarily (not a timer - it tells you to go turn it back on if it's OK).

    G Offline
    G Offline
    glennPattonPub
    wrote on last edited by
    #18

    Lost a couple of hours to that this afternoon!

    1 Reply Last reply
    0
    • P Peter_in_2780

      Slot in a powered hub? Or I think they still make power injectors - signals straight through, solid +5 comes in the side.

      Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012

      G Offline
      G Offline
      glennPattonPub
      wrote on last edited by
      #19

      I will try that... have search my pile for an 9way RS232 cable, 'we don't have those things, why do you want one?'from IT... it gets worse! :omg:

      1 Reply Last reply
      0
      • G glennPattonPub

        Thanks for the link, could be a Microchip thinks it's an ATMEL

        0 Offline
        0 Offline
        0x01AA
        wrote on last edited by
        #20

        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 ;)

        G 1 Reply Last reply
        0
        • 0 0x01AA

          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 ;)

          G Offline
          G Offline
          glennPattonPub
          wrote on last edited by
          #21

          Nuts, it would be useful, at least it's not my dodgy code ;)

          C 1 Reply Last reply
          0
          • G glennPattonPub

            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.

            C Offline
            C Offline
            charlieg
            wrote on last edited by
            #22

            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.

            G 1 Reply Last reply
            0
            • G glennPattonPub

              Nuts, it would be useful, at least it's not my dodgy code ;)

              C Offline
              C Offline
              charlieg
              wrote on last edited by
              #23

              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 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.

              G 0 2 Replies Last reply
              0
              • C charlieg

                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.

                G Offline
                G Offline
                glennPattonPub
                wrote on last edited by
                #24

                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.

                0 1 Reply Last reply
                0
                • C charlieg

                  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 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.

                  G Offline
                  G Offline
                  glennPattonPub
                  wrote on last edited by
                  #25

                  Yes, its a dodgy com port ( :sigh: ) I think people were expecting it run like native USB.

                  1 Reply Last reply
                  0
                  • C charlieg

                    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 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.

                    0 Offline
                    0 Offline
                    0x01AA
                    wrote on last edited by
                    #26

                    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 believers.

                    is wrong and is just striking. It looks like you just want to appear omniscient here ;)

                    C 1 Reply Last reply
                    0
                    • G glennPattonPub

                      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.

                      0 Offline
                      0 Offline
                      0x01AA
                      wrote on last edited by
                      #27

                      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)' ;)

                      G 1 Reply Last reply
                      0
                      • 0 0x01AA

                        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)' ;)

                        G Offline
                        G Offline
                        glennPattonPub
                        wrote on last edited by
                        #28

                        Oh dear :bob:! I wasnt thinking of that, I will have a better look over the weekend. A timer. and the eNums oh heck!

                        0 1 Reply Last reply
                        0
                        • G glennPattonPub

                          Oh dear :bob:! I wasnt thinking of that, I will have a better look over the weekend. A timer. and the eNums oh heck!

                          0 Offline
                          0 Offline
                          0x01AA
                          wrote on last edited by
                          #29

                          ;P :laugh:

                          G 1 Reply Last reply
                          0
                          • 0 0x01AA

                            ;P :laugh:

                            G Offline
                            G Offline
                            glennPattonPub
                            wrote on last edited by
                            #30

                            If I only could directly contact that Guru, all my problems would be solved! :laugh:

                            1 Reply Last reply
                            0
                            • 0 0x01AA

                              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 believers.

                              is wrong and is just striking. It looks like you just want to appear omniscient here ;)

                              C Offline
                              C Offline
                              charlieg
                              wrote on last edited by
                              #31

                              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.

                              0 1 Reply Last reply
                              0
                              • C charlieg

                                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.

                                0 Offline
                                0 Offline
                                0x01AA
                                wrote on last edited by
                                #32

                                Thanks for your reply

                                1 Reply Last reply
                                0
                                Reply
                                • Reply as topic
                                Log in to reply
                                • Oldest to Newest
                                • Newest to Oldest
                                • Most Votes


                                • Login

                                • Don't have an account? Register

                                • Login or register to search.
                                • First post
                                  Last post
                                0
                                • Categories
                                • Recent
                                • Tags
                                • Popular
                                • World
                                • Users
                                • Groups