Jump to content
The simFlight Network Forums

Scan COM ports for connections?


Recommended Posts

Quick question: With the possibilities of FSUIPC and lua only, how could I get a list of devices that have an active com port? It basically would be the list delivered by HidScanner.exe with the addition of a com port number for devices where it is available.

 

Thank you,

Karl

Link to comment
Share on other sites

18 minutes ago, kaha said:

Quick question: With the possibilities of FSUIPC and lua only, how could I get a list of devices that have an active com port? It basically would be the list delivered by HidScanner.exe with the addition of a com port number for devices where it is available.

 

Thank you,

Karl

For COM devices, or USB devices which are not classed as HID by Windows, you need to refer to the Windows Device Manager.

Pete

 

Link to comment
Share on other sites

My question aimed at finding a possiblity within lua to clearly identify the Arduinos I have connected to my rig, they are not HIDs. I use Teensy 3.2, 3.5, 2.6, 4.0 and 4.1. Anyway, I stick to what I have. I wanted to be able to identify the Arduinos automatically regardless on which port they connect. The main criteria I use for recognition is the baudrate of 115200 that I use for all my connected Teensys.

 

Anyone wants to share how he handles this?  Here is my code (Identify_Arduinos.lua), but it's surely far from being an ideal solution. I'm more a C/C++ coder, not a lua coder. Also my string tweaks (String_Tweak.lua) are needed to run it.

 

Karl

 

String_Tweak.lua Identify_Arduinos.lua

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.