Configuring serial port

Hi friends,

We are trying to connect our IR enabled mobile with PC. But while doing that the port selected by the device driver is changing at each time of connection. This is hard for us to program. We need to know how to configure the mobile always at one port.... your comments and views are worth for us. Bye.

Cheers,

Devi.




Answer this question

Configuring serial port

  • Nenad Vicentic

    You have to look in the active drivers list in the registry for the port number if you are using device drivers that create serial ports. This can be done by enumerating the HKLM\Drivers\Active registry and comparing the "Key" value with the expected. Since Visual Studio doen't have a Remote Registry Editor I suggest getting a copy of EVC4 just for this tool in case you aren't already using it. This will help determiine what the key value should be.

  • cartoon

    The devices actual port really isn't important, in fact, whatever your programming the device with should already know the port of the device, even if it changes. Find the function that does that, asks the operating system which port the device is on and check that value in your code.

    Just for reference, could you provide a sample of the code your using

    David



  • Configuring serial port