2

I am currently connecting PC with the galileo board, I am using java socket programming for connecting PC with the board,

At the client side I need to give:

Socket client = new Socket(serverName, port);

Where I will provide the IP address of the PC. But everytime I connect galileo board to a different PC, I need to go into the code and modify the IP address.

Is there any way that the galileo board will automatically get the IP address of PC and adjust the IP address in the code.

1
  • DNS. <this space is filler> Commented Oct 4, 2016 at 6:20

1 Answer 1

1

You can solve this problem in one of two ways:

  1. Assign a static IP address to the PC. It's easy if both the board and the PC are behind the same NAT, or if your ISP can assign you a static IP address.

  2. Use a dynamic DNS service such as no-ip or changeip. You'll need to install an agent on the PC for that. The agent will update the service whenever the PC's address changes. The service will then make sure to answer DNS resolution request for <your subdomain>.dynmaic-dns.net with the PC's current IP address, so you'll be able program the board to always connect to <your subdomain>.dynmaic-dns.net

Sign up to request clarification or add additional context in comments.

1 Comment

I wrote a script which assigns a static IP address on the PC side , so that my board can connect to PC easily .

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.