How to change the IP address

This software has an IP address compiled in. This IP address can be changed at run time without re-compiling.

The IP address as defined at compile time can be found in file main.c:
static uint8_t myip[4] = {10,0,0,29}; // IP= 10.0.0.29

Procedure to change this default IP address:
  1. Connect pin PD2 to GND with a short blank wire
  2. Power-on the web server board
  3. Connect the board with an ethernet patch cable to the same LAN as your PC. You can also use a straight (not a cross-over) ethernet cable and connect it directly to your PC.
  4. Configure your PC such that it can connect to the board directly without going via a router (see description below).
  5. open http://10.0.0.29 in your web browser and change the IP address.
  6. power down the board and remove the blank wire. The IP address is now permanently changed.


It is important that the jumper wire between GND and PD2 is there during power-up of the board. This jumper wire would have no effect once the board is already powered up.



Background information: IP address and routing on your PC

One way to ensure that your PC sends the IP packets directly to the tuxgraphics web server is to give it an IP address in the same network. E.g assign it the IP 10.0.0.28 (the web server's default IP is 10.0.0.29).

Under windows the current IP address can be seen with the command ipconfig and under Linux, Mac or any unix system the command ifconfig can be used. The command ifconfig can also be used to change the IP address. Windows has a graphical user interface to change the IP address.

Another possibility is to not change the PC's IP address and instead add a new routing table entry which does not route 10.0.0.29 via a gateway router.

Windows:
route ADD 10.0.0.29 MASK 255.255.255.255 YourPCsIP
replace YourPCsIP with the IP address corresponding to the ethernet interface of your PC.

Linux:
route add -host 10.0.0.29 dev eth0

Reseting the IP address to the factory default

The above change of the web server's IP address is permanent. Once changed the IP address will remain changed even when the board is without power. In the event that you want the change the IP address again then you need to use the IP address that was set before and connect to the board using that IP address.

It is however also possible to reset the board temporarily to the factory default IP address of 10.0.0.29 by connecting pin PD3 at power-up to GND. To set the IP to 10.0.0.29 and change it at the same time you would connect both PD2 and PD3 to GND.



© tuxgraphics.org