Microduino ENC Network (10)——How to Change the Listening Port of the Web Server

From Microduino Wiki
Jump to: navigation, search
Language: English  • 中文

Objective

This tutorial is very easy, only need to change one sentence code and change the default port the web server is listening on.

Equipment

  • Other equipment
    • USB cable

Schematic

  • Microduino-ENC28J60
  • Microduino-RJ45
  • Microduino-Core
  • Microduino-FT232R

Stack all modules and then connect the ethernet cable, as follows:

MicroduinoENCShow.jpg

Program

The change is very easy: you need only to set the port variable:

   ether.hisport=90;

You can use the program on ENC network (seven) to finish this experiment, as follows:

ChangePort.jpg

Debug

Step 1: Download the EtherCard library and copy to your libraries fold of IDE, then restart IDE. https://github.com/jcw/ethercard

Step 2: Download the code and compile it.

Step 3: Access Microduino's IP, the port is:90;

Result

Your Microduino WEB server's listen port will change to 90.

ChangePortTo90.jpg

Video