Pages: [1]   Go Down
Author Topic: Telnet Server for ENC28J60 Board  (Read 4909 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Aargh...a newbie with stupid questions...

Yes, i am just starting with the Arduino.
My goal is, to replace the usb/serial interface with
a telnet server. The library of the ENC28J60 looks much more cryptical
than the genuine Ethernet lib.

There are some Webservers in the net, but no telnet.

So i would appreciate if someone gives me a hint or example

DP
Logged

0
Offline Offline
Tesla Member
***
Karma: 145
Posts: 9685
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Have you searched this forum and the old forum for telnet?
Logged

Consider the daffodil. And while you're doing that, I'll be over here, looking through your stuff.   smiley-cool

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes, i searched the old/new forum as well as several other sources in the web.
There are lots of examples with http servers on the ENC28J60 , but nothing with telnet.
The ethershield lib seems to be much more cryptical than the standard ethernet lib, so
at the moment i am not sure how to handle this.

DP
Logged

Tacoma, WA
Offline Offline
Full Member
***
Karma: 4
Posts: 192
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I take it you never made any more progress on this? I'm going to take a stab at this myself. I agree that  the ENC (ethershield) library seems obtuse/cryptic. But I've managed to get it to work a little bit. It's definitely be nice to be able to just open a port (such as 23) and then from there use it like a serial connection to communicate with my sketch..
Logged

Brian from Tacoma, WA
Arduino evangelist - since Dec, 2010.

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi, guys!  Any progress with telnet server?
I met the same problem and try to handle it next week.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 24
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The library at http://srmonk.blogspot.com/2010/03/simplified-ethernet-library-for-28j60.html is somewhat simpler than the original and i suppose that what you are looking for is some kind of chat server on the arduino (use port 23 instead of 80).
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks, poliveira1978.

Little report about solving the problem:
The only library I found for ENC28J60, is so called "etherShield" library.
All other pieces of code are just wrappers for that library.
Due to lack of memory TCP stack not fully implemented and server works in "1 packet" mode.

1) Establish connection, catch packet. 
2) Modify it (put ACK, interchange source - destination, fill data)
3) Send it back.
4) Drop the connection.

This makes telnet server implementation impossible, so next solution was used:
Arduino opens serial port, stores its output, when request comes, send collected data to PC.
Special client application was written for PC side, to send requests and process arduino output.

Buffer on arduino side is small and it takes only 50 msec to fill it, so I suspect problems working with UART on full speed, but for "console" mode the solution works fine.
Logged

Tacoma, WA
Offline Offline
Full Member
***
Karma: 4
Posts: 192
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

There's a new library that replaces the ethershield one, it's "ethercard". A good solution for the lack of memory is to use a Teensy++ rather than an Atmega328. That gives you 4x as much SRAM.
I ended up just gutting the webserver example sketch and receiving my commands from the HTTP request.. so I send it http://arduinoipnumber/m5 and the sketch sees it's an m command, and I want #5.. (mode 5, in my case).. Nice and simple. I set it up to drop the connection without any kind of reply after receiving the command. It works great.
Logged

Brian from Tacoma, WA
Arduino evangelist - since Dec, 2010.

0
Offline Offline
Newbie
*
Karma: 0
Posts: 45
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm trying to do something like this. not telnet, just a straight tcp server. the last time I worked with the ethershield, I did what you did. I just gave in and used the web server example. I'm rewriting my project to make some improvements, and this time, I'm not giving in to http. I'll be working on it until I have a tcp server. I'll figure it out one way or another. I'll have my code posted on my website and a few other places.
Logged

Seattle, WA
Offline Offline
God Member
*****
Karma: 11
Posts: 673
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

These days I have been playing with uIP and have found it to be quite powerful and stable.  The avr-uip project has ported it to AVR.

In a couple hours, I was able to get a telnet server up and running and adding my own commands.  In a few more hours, I had a wget implementation working, pulling down files from websites at 180kbytes/sec.  Not rocket fast, but great for a constrained MCU.  Also it has "protosockets", so it should be able to implement higher-level protocols such as whatever you want to do with a "TCP Server".

The downside is that it is not compatible with the Arduino IDE, and it's pretty arcane.  So for any kind of newbie, I say stick to the official Ethernet boards.

Also today I stumbled across NanodeUIP which looks to be a port of uIP to work with Nanode.  Nanode is an Arduino clone plus an ENC28J60 ethernet in one, so it should be compatible with anyone else's EtherShields based on that chip.  Not sure how far along NanodeUIP is, or how it deals with the uIP configuration tradeoffs.  It's certainly worth a look, though.
Logged


Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

itead has arduino clone with wiznet eth for $29

http://iteadstudio.com/store/index.php?main_page=product_info&cPath=50_51&products_id=511

I just received 2 and am playing with them now.
Logged

Pages: [1]   Go Up
Jump to: