NI Linux Real-Time Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

How to manually set the IP in a RT target ?

[Sorry, posted this in wrong group instead of Real-Time]

Hello hello,

no matter what I try, my RT target refuses the DHCP info: it always gets a useless 169.254.63.83 IP address. Is it possible to set it manually from within the target ? The [Boot into safe mode] option says: "this brings up the minimal set of services necessary to configure the system's network settings", so it should be possible. Are there secret keys to do that ?

0 Kudos
Message 1 of 7
(2,910 Views)

Have you tried using the System Configuration API? Here is an example to get you started if you're not familiar with it: https://forums.ni.com/t5/Example-Programs/Configure-your-cRIO-programmatically-with-the-System/ta-p/...

0 Kudos
Message 2 of 7
(2,893 Views)

First, the problem that you hinted at before the question in the title of this post:

 

Is there anything unusual about the DHCP server for this LAN segment that you're putting the target on? Is it possible to check the logs (if the server has them) to see what's going on on the other end? If all else fails, you can install tcpdump on the target, point it to the interface that is connected to the network, capture a traffic dump, and pull that into a tool like wireshark to see what's going on, on the wire.

 

Now, for the posted question, you can certainly use the SystemAPI interface to set IP addresses, but I'm guessing if you're having connectivity issues anyway, you may not be able to deploy code, or even see the target from MAX, to use the API. What target are you using, and what version of LVRT (or, really, the OS) are you using?

0 Kudos
Message 3 of 7
(2,891 Views)

Thanks for the answers,

I'm using the RT target generated by MAX in the [Tools][Create Desktop PC Utility USB drive], so I guess this is Phar Lap ?

I haven't found how to get the logs out of VBoxNetDHCP.

I don't mind playing with tcpdump on the target... but how do I compile and install it without the NI tools ? I can find some way to mount the vmdk disk on my host, but I guess I just can't copy tcpdump from my Ubuntu...

0 Kudos
Message 4 of 7
(2,884 Views)

Ah, I massively misunderstood your use-case.

 

  1. Yes, you're using Pharlap ETS, not Linux (I assumed you were using Linux due to where you posted)
  2. I don't know if there's a version of tcpdump that you're going to be able to use, basically you'd need to plug in at levels of the OS that I don't think are part of the exposed API on the OS.
  3. Good news is that you should be able to run Wireshark from the host OS.
    1. You may need to do a bit of digging for information online, but I was able to capture traffic from a test VM with the virtual network interface configured in both NAT and bridged mode, by pointing to my primary network interface on my host machine and filtering based on the virtual network adapter's MAC address

The end-result being that, for Pharlap ETS, I don't think there's a way to set the IP address manually unless you're able to connect to it through some network-enabled mechanism (MAX, Syscfg, even FTP)

 

0 Kudos
Message 5 of 7
(2,879 Views)

I assumed you were using Linux due to where you posted.

 

I saw that right after I first posted, but I didn't see a way to delete the message... Anyway I got more insightful answers here than in the appropriate forum !

 

0 Kudos
Message 6 of 7
(2,876 Views)

wrote:

I assumed you were using Linux due to where you posted.

 

I saw that right after I first posted, but I didn't see a way to delete the message... Anyway I got more insightful answers here than in the appropriate forum !

 


Glad to be of assistance, hopefully you can get the root issue (DHCP not working correctly) resolved with some of the tips mentioned. Hopefully you have a pretty flexible and understanding IT dept. to help look at what's going on with the logs

0 Kudos
Message 7 of 7
(2,870 Views)