none
Loosing the serial port RRS feed

  • Question

  • Hi all,

    I'm writing a C# application for a device running Windows 7 Standard embedded.

    The application talks with an Arduino board via USB virtual serial port.

    Sometime happen that the communication is lost with an exception reporting 'Device not connected': the next calls report 'COM9 does not exist'.

    If I shut down the application and re-run it, I always receive the last error.

    If I open the Device manager I see the port on the list but if I enumerate the port fron the app I don't find it.

    I don't understand if the driver is in a mess - or maybe is the framework that is in a mess.

    Any idea?

    The only solution so far is the device reboot: is there any other solution ??

    Thanks!


    SteMMo

    Tuesday, September 18, 2018 10:43 AM

All replies

  • Any idea?

    Check two things:

    - cable, may need replacement

    - response from device, if you have option to listen to fisical signal

    > if the driver is in a mess - or maybe is the framework that is in a mess.

    Windows didn't work well with devices which didn't beheive properly.


    Sincerely, Highly skilled coding monkey.

    Tuesday, September 18, 2018 10:51 AM
  • I'm with Andrey: Check the USB-to-COM bridge driver. Sounds like it is buggy.
    Tuesday, September 18, 2018 11:17 AM
  • The driver is the standard usbser.sys towards Arduino's micro.

    The problem is visible on two different installations.


    SteMMo

    Tuesday, September 18, 2018 12:49 PM
  • >The driver is the standard usbser.sys towards Arduino's micro.

    Is this a warranty that this piece of software works perfectly in all cases? 


    Sincerely, Highly skilled coding monkey.

    Tuesday, September 18, 2018 1:05 PM
  • No, but since this is Microsoft stuff ..

    My question is: how can is possble that the Device Manager see the port and the C# port enumerator not ??

    Should it be possible that the Framework is wrong?


    SteMMo

    Tuesday, September 18, 2018 1:14 PM
  • > My question is: how can is possble that the Device Manager see the port and the C# port enumerator not ??

    Hmmm... decompile both and find the difference!!! :)

    You can find detail information about COM-ports and devices connected to USB in Registry. But I did this so long ago that do not remember the details.

    >

    I have a scanners connected to my PC over USB and converted to COM for application. It works.

    If I put a memory stick into USB port and do anything with data - I will have to format the stick. 

    Did it work? 


    Sincerely, Highly skilled coding monkey.

    Tuesday, September 18, 2018 1:38 PM
  • Which OS are you talking about exactly?

    SteMMo

    Wednesday, September 19, 2018 1:48 PM
  • Win7 Pro SP1.

    Sincerely, Highly skilled coding monkey.

    Wednesday, September 19, 2018 2:19 PM