Jump to content

TCP Open selecting wrong interface


Recommended Posts

I am having some problems with a LabVIEW application of mine. It is set to auto-run on startup, and the OS is Windows XP Embedded. I am trying to add a NIC to the system to allow for Ethernet communication. That makes two network interfaces, since there is one built-in network interface that is being used for control of some internal RF ComBlocks.

The problem I am seeing is when I attempt to open the connection to the ComBlocks I get an error because the correct connection is not made. Disabling the second NIC solves the problem, but even trying to hard-route a connection using ROUTE ADD doesn't. The only thing that has worked has been to have a launcher executable run at startup instead, and then after some delay launch the real program. However, if I put the same delay within and at the beginning of the 'real program', it fails.

This all seems to indicate that the OS has not properly initialized the Ethernet connections at the time my application runs. I am almost resigned to just having a launcher executable, but I wanted to check and see if there was some way of querying the active interfaces available. Or if there was some way to force TCP Open to choose the correct interface that would be nice too.

Ideas?

Edited by JDave
Link to comment
I am having some problems with a LabVIEW application of mine. It is set to auto-run on startup, and the OS is Windows XP Embedded. I am trying to add a NIC to the system to allow for Ethernet communication. That makes two network interfaces, since there is one built-in network interface that is being used for control of some internal RF ComBlocks.

The problem I am seeing is when I attempt to open the connection to the ComBlocks I get an error because the correct connection is not made. Disabling the second NIC solves the problem, but even trying to hard-route a connection using ROUTE ADD doesn't. The only thing that has worked has been to have a launcher executable run at startup instead, and then after some delay launch the real program. However, if I put the same delay within and at the beginning of the 'real program', it fails.

This all seems to indicate that the OS has not properly initialized the Ethernet connections at the time my application runs. I am almost resigned to just having a launcher executable, but I wanted to check and see if there was some way of querying the active interfaces available. Or if there was some way to force TCP Open to choose the correct interface that would be nice too.

Ideas?

A few ideas;

1. Use StringToIP configured to output multiple IPs (right click and select Multiple Output) to see if your application sees your NICs

2. Make sure the NICs are on different subnets, If not, I believe Windows will select the first NIC matching your requested IP address.

 

/J

Link to comment
A few ideas;

1. Use StringToIP configured to output multiple IPs (right click and select Multiple Output) to see if your application sees your NICs

2. Make sure the NICs are on different subnets, If not, I believe Windows will select the first NIC matching your requested IP address.

 

/J

Thanks for the ideas. The NICs are on different subnets, but I was not aware of that usage of StringToIP. Oddly the function shows both NICs even though the TCP Open does not correctly connect. I don't know whether it has anything to do with the XP Embedded, but I am going to just use a launcher executable. I have already spent way too long on this and I just can't make sense of why it is acting strange. Edited by JDave
Link to comment

Never worked with XP Embedded, but was curious.

 

After reading this from the dark side, I wonder if you need to create a new target image that includes the second Ethernet drivers and related configuration.

 

Note: The Target Analyzers import the drivers necessary to functionally utilize as much of your system's hardware as Windows XP recognizes. If you don't need/want some of this functionality, you can remove some of these now. For example, if your target has an integrated ethernet card but you don't want network functionality, you can remove the ethernet controller and other network-related drivers from the list and thereby prevent internet- and network-related components (such as Internet Explorer) from being added by the Dependency Check in the next step. Or you can remove these components individually after they have been added by the Dependency Check. This is also a good time to add any additional features you may want.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.