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

来自Microduino Wikipedia
跳转至: 导航搜索
Language English

Objective

This tutorial is very easy, only need to change one sentence code and change the default port the webserver 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 hisport 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