enc28J60 and Arduino (10)

by luca
9 comments

This quick tutorial comes from a request Antonio posted in a comment: how to change the default port the webserver is listening on.

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

With the code above, you can connect to the webserver specifying port 90:

Related Posts

9 comments

Steve Sunday December 16th, 2012 - 12:13 AM

Thanks very much for your excellent tutorials, Luca. They are extremely useful for a beginner like me.

I am trying to write sketches for an Arduino-compatible device called Nanode Gateway which has on-board enc28j60.

If you are looking for an idea to develop the theme of your tutorials 8, 9 & 10, please may I propose looking at controlling an Arduino output using a service like cosm.com or similar?

It seems like a natural progression in controlling the Arduino from the web. I am having great difficulty making my device work with such a service however. Thanks for your help and keep up the good work.

Reply
luca Sunday December 16th, 2012 - 12:44 PM

Hi Steve,

that’s a good suggestion… I’ll work on it!
thanks

Reply
Paolo Tuesday April 23rd, 2013 - 09:04 PM

Complimenti per i tutorial.
Sto lavorando a uno sketch per mandare una mail tramite la 28j60, ma ho problemi ad aprire una sessione telnet. Sapresti darmi qualche consiglio?
Grazie

Reply
luca Wednesday April 24th, 2013 - 04:07 PM

ciao Paolo,

farò di più… prossimo tutorial: inviare mail con Arduino 😉

Reply
Tristán Grimaux Wednesday October 2nd, 2013 - 07:33 PM

I’m trying to set up a server that will replicate everything that comes from the Arduino serial port.

But “ether” is an http server, how do I set up plain tcp server? I was trying to get something like a telnet server, and connect it to the serial port of the Arduino.

My final goal is to create a physical “serial 2 telnet” to help me to remotely access a server via serial port when it has network problems.

Thanks!

Reply
Pawel Wednesday February 19th, 2014 - 09:28 AM

Ciao Luca,
hisport works perfect when accessing Arduino from browser. However when I try to send some data (using GET from your web temperature tutorial) to webpage it doesn’t work. Ofc there’s no response as well. How to use tcpSend, when hisport is changed? Thank you in advance for your help.

Reply
luca Wednesday February 19th, 2014 - 09:19 PM

Hi Pawel: are you trying to send data to a webserver/application that listens on a port different from 80? Give a look to this tutorial: my app is listening on port 1000.

Reply
Pawel Saturday February 22nd, 2014 - 09:10 AM

Hi Luca,
I’m trying to send data to php file saveTemp.php from your tutorial no 14. I guess it only listens on port 80, but I can’t use that one.. Response is not that important, but I wish to send data to port 80 from 8000 – defined by hisport (correct me if I’m wrong). Thanks

Reply
luca Sunday March 2nd, 2014 - 01:42 PM

Hi Pawel,

yes you can change the “remote” tcp port with the hisport parameter

Reply

Leave a Comment

seventeen − 1 =