LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why isn't DHCP working on my ARM application?

I'm using the LM3s8962 ARM evaluation board with LabVIEW embedded and trying to do TCP/IP communication.  I am using the TCP.lvproj from the example finder to run ARM as server and PC and client, but it only works in a certain scenario.  The only way I can communicate is if I change my PC's alternate TCP/IP setting from automatic to static and then uncheck DHCP on the arm build to a static IP address.  I have tried this with both crossover and normal ethernet cable direct from PC to ARM board.  Is there any way to get DHCP to work?

 

Based on the description in the example, I should be able to ping the ARM board and get the IP address.  However the only time I can get a response is if I have my TCP settings set up as I described above.  If I use DHCP and automatically acquire an IP address, it doesn't seem to get one.  Anyone else have this issue?

 

Thanks,

Jeff

0 Kudos
Message 1 of 9
(3,438 Views)

What are you using for a DHCP server? DHCP is not simply "there". A server must be running on the network in order to assign and manage the IP addresses. Enabling DHCP on either the ARM or the PC just means that they will try to get an address from the DHCP server running on the network. There are some free, small and limited DHCP servers that your PC. Some simple switches have DHCP servers in them and most wireless access points/routers have DHCP servers. That might be your simplest and cheapest option even if you aren't using the WiFi connections. Use the AP as a switch and a DHCP server.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 2 of 9
(3,436 Views)

Well that could be it right there.  I haven't done much in the realm of TCP/IP communication.

 

I may call back in to NI support because when working through some of this, I had contacted them and recieved some help.  The associate I worked with was able to run the example exactly as it stated without changing any settings and using a crossover like I was.  They were able to do it and I was not.  We moved on to other topics and I never circled back.

 

Thanks for the response.

0 Kudos
Message 3 of 9
(3,434 Views)

Do you have multiple ethernet adapters on either end?  If so, have you tried swapping the ones you're using?  If its on the listener end, sometimes I've had to wire the "net address" optional input on TCP create listener.vi

-Barrett
CLD
0 Kudos
Message 4 of 9
(3,425 Views)

 


@blawson wrote:

Do you have multiple ethernet adapters on either end?  If so, have you tried swapping the ones you're using?  If its on the listener end, sometimes I've had to wire the "net address" optional input on TCP create listener.vi


This still won't resolve the address issue. A DHCP server must be running somewhere in order to assign addresses to devices that request them. This is not a standard part of your basic workstation computers. This is a function of a server (WIndows 2008 Server, Linux server, etc.). When the NIC is coming up the stack is requesting an address from the network. If there is no server then it will not get an address.

 



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 5 of 9
(3,419 Views)

Thanks for your input.  It pointed me to a solution that I can use.  Windows has an IP address range and subnet that are reserved for scenarios in which a DHCP does not respond to a request (called APIPA).  If you leave the PC TCP/IP settings alone and set the ARM board to static IP within the right range and on the default subnet you can communicate.  In case there are others interested, see link below regarding the information I found.

 

Resereved range: 169.254.0.0 through 169.254.255.255

Subnet: 255.255.0.0

 

http://support.microsoft.com/kb/220874

Message 6 of 9
(3,402 Views)

Very nice, thank you for sharing that.

 

Is this a reliable way to do direct computer-to-computer ethernet connections?  In the past my shop has always done static IP addressing for both client and server, but the setup step can be a pain (and forgetting it, also).

-Barrett
CLD
0 Kudos
Message 7 of 9
(3,390 Views)

Here is a free DHCP server you can use as well.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 8 of 9
(3,387 Views)

Thanks a lot for this post. It really helped me.Smiley Happy

 

I was trying to run TCP example ( TCP Data Server - ARM and TCP Data Client - PC) and was facing problem in detemining server IP address. Because 'ping labview-tcp' in command prompt could not find server IP address. I have attached here some snaps and hope this might be helpful to somebody else.

 

Cheers,

Bhaumik

Download All
0 Kudos
Message 9 of 9
(3,190 Views)