LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to find a modem's com port number programmably if I know the name of the modem interface?

Solved!
Go to solution

Hello there,

 

I know if I see a modem device under Device Manager, I can right click on it, go to properties, then click on Modem tab to get the com port number for this modem device. But how do I do it programmably in Labview? I'm hoping I can search by the modem name which is known to me then retrieve the com port number in labview code. I tried the Visa Find Resource.vi but didn't get anything useful. Has anyone have any experience on this?

 

Thanks,

Spring

 

 

0 Kudos
Message 1 of 15
(4,659 Views)

You are on the right track. I would start with Find Resource to find available Com ports then check any Com ports for presence of the MODEM.

 

I am not sure what the MODEM command would be but in IEEE 488.2 I would send a *IDN? (Identify) query, then check the response to see if it is the device I am looking for.   

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 2 of 15
(4,611 Views)

Hayes command set. https://en.wikipedia.org/wiki/Hayes_command_set

 

 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 3 of 15
(4,590 Views)

Have you tried perusing these properties to see if they yield anything useful?

visa.png

"If you weren't supposed to push it, it wouldn't be a button."
Message 4 of 15
(4,565 Views)

Thanks RTSLVU and Paul for trying to help. Paul, yes, I've tried all of these properties and some other ones too. They either return useless information or they don't return anything because Labview generates errors. Please see the attached pictures. What's confusing me is that I can clearly see the modem name under device manager: "u-blox ...". Why does none of these properties give me that piece of information?

Download All
0 Kudos
Message 5 of 15
(4,549 Views)

Here's some of my old device finding stuff/

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 6 of 15
(4,530 Views)

@2014spring wrote:

Thanks RTSLVU and Paul for trying to help. Paul, yes, I've tried all of these properties and some other ones too. They either return useless information or they don't return anything because Labview generates errors. Please see the attached pictures. What's confusing me is that I can clearly see the modem name under device manager: "u-blox ...". Why does none of these properties give me that piece of information?


Yeah, I don't think the property node is going to work. I believe that is only for IEEE 488.2 compatible devices.

 

Have you tried the Hayes commands on detected ports?

 

A quick skim through the Wiki it looks like ATI0 might give you the information you are looking for. 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 7 of 15
(4,520 Views)

@2014spring wrote:

Thanks RTSLVU and Paul for trying to help. Paul, yes, I've tried all of these properties and some other ones too. They either return useless information or they don't return anything because Labview generates errors. Please see the attached pictures. What's confusing me is that I can clearly see the modem name under device manager: "u-blox ...". Why does none of these properties give me that piece of information?


I think Windows gets all that information from the .INF file when you installed it.

 

I don't know how to make LabVIEW get the same information.

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 8 of 15
(4,513 Views)

Hi Paul, I can't open your files because yours is newer than my labview version which is 2014. Thanks.

0 Kudos
Message 9 of 15
(4,474 Views)

Hi RTSLVU,

 

Actually I do have a list of AT commands which work on this device including ATI0. Originally I wanted to locate the device first then send AT commands to test it. Now it looks that this path is leading to nowhere, so I guess I'll have to change the approach. I'll send AT commands to each of the found port and look for the reponse string to locate the modem. Thank you again for looking into this issue.

 

Regards,

Spring

0 Kudos
Message 10 of 15
(4,462 Views)