Selecting the NIC for host communication on the xpcTarget target

조회 수: 2 (최근 30일)
Mirko Kunze
Mirko Kunze 2012년 1월 13일
Hello! I have multiple network adapters in my target machine. One I can boot from and one that is capable of gigabit communication, which I want to use for real time UDP communication.
I want to boot xpc target via network so I have to connect the host pc to the boot-able card. Xpc target boots without problems but the host cant connect to it. This is due to the fact that the target wants to communicate to the host via the gigabit card, which is not possible (it shows PCI Bus and Slot of the gigabit card in the upper right window on the target).
It does not matter which card I put in which PCI slot, xpc target always chooses the gigabit card for host communication.
Is there any way (while creating the boot image, while booting or while xpc target runs) where I can configure it to use the other card?
Thanks in advance!

답변 (1개)

Gordon Weast
Gordon Weast 2012년 2월 10일
We enumerate the Ethernet boards in the system and choose one based on the host side xPC environment variable, EthernetIndex.
By default, EthernetIndex is equal to '0'. This works for any system that has only one Ethernet board.
You can try setting EthernetIndex to '1'.
> setxpcenv('EthernetIndex', '1')
Then rebuild the kernel and reboot with the new kernel.
The particular index that points to any given card may change in R2012a. We've slightly modified the algorithm to make it more predictable. In earlier versions the assigned index was hard to predict.


Help CenterFile Exchange에서 Target Computer Setup에 대해 자세히 알아보기


Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by