IP address for virtual controller

Hi,

Does anybody know of a way to get the host IP for a virtual controller such that I can write code thats transferable between VC and real IRC? I know that rapid function GetSysInfo provides the wan IP but it simply returns "VC" if running on a VC. Right now I have to manually change the IP address before I transfer between systems, but would much prefer a more elegant solution that works out the IP automatically.

Comments

  • AlexKAlexK Sweden ✭✭
    edited November 2018
    You might be able to run 'netstat -ab | more' in an elevated cmd to get what process use which port for communication. It's worth a try at least.

    Presuming it would be RobVC one needs to communicate with you could also try to find out what ports it's listening to by finding it's PID (Process identifier) by running:

    -tasklist /fi "IMAGENAME eq RobVC.exe"

    You will then get a PID number, use that and run:

    -netstat -ano | findstr <PID>
    Best regards
    Alexander Källberg
  • AlexKAlexK Sweden ✭✭


    It will look something like this.
    Best regards
    Alexander Källberg
  • Thanks Ill give it a go, but ideally I am currently running the server on the robot. You have made me think thats where I am going wrong. Might be worth rethinking the setup so that both controllers have a known server to connect to, and their credentials aren't needed in the comms set up.
Sign In or Register to comment.