Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Telnet Server with a Story


  • Please log in to reply
5 replies to this topic

#1 Charles

Charles

    Advanced Member

  • Members
  • PipPipPip
  • 192 posts

Posted 06 October 2010 - 07:00 AM

***** This is an old version... Look for the newer version in a newer thread! It fixes many problems. ***** I have a confession to make... I didn't even know Netduino existed until September 26th, 2010. It all started on a lazy Sunday afternoon. I was browsing SparkFun looking for parts to tinker with for a new project I have been dreaming about for months. I had been planning on using Arduino for it, but have relatively little experience with Arduino and almost no experience with electronics. As I was browsing, I saw the Netduino shield (out of stock of course) and was curious. It looked very powerful and I wanted to get one to experiment with. I started looking around and discovered the Netdiuno Plus with a built-in ethernet port!!! Limited beta though. I was thinking I wouldn't get my hands on one of those until next year for sure. Low and behold, I had managed to trip over Netduino at just the right time! The beta had just been released. No one showed any stock except LittleBird in Australia. On a wim I shelled out the $90 for shipping back to the US and ordered one. As the days passed waiting for the new toy, I started to feel a bit guilty for depriving a hardcore Netduino developer somewhere out there of the opportunity to contribute wonderful things to the beta project. I started to think about my project and read posts in the forums. I soon decided that I was going to write a Telnet Server for the Netduino Plus. This was no small task... I havn't even touched C/C++ except in the most basic form for very simple Arduino projects (think Blink) for almost 10 years. And C# was a note on a page of music in my mind. I was in deep. I got a good start from the Web Server example written by Hari Wiguna. Hari also graciously took some time to explain useful C# things to me like how to add references to a project. :-) A big thanks goes out to Hari for giving me the C# introduction I needed to get started as well as the Web Server example. Anyways, I did my research and studied up on C# and the Micro Framework... And after about 30-some odd hours of work/trial and error I'm finally ready to present what I have to the community. Please be merciful... This is my first ever C# project, my first ever Netduino project, and my first ever Micro Framework project. Enjoy!! P.S. - This was written and tested on Windows 7 using PuTTY. Your mileage may vary.

Attached Files



#2 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 06 October 2010 - 02:53 PM

Hi Charles, Thanks for the sharing this project...and for sharing your story! It sounds like you learned a lot and had a lot of fun over the last week or two! I know that a member community members (oz, you reading this?) are probably going to start tearing into this in about 3...2...1... :) Chris

#3 Omar (OZ)

Omar (OZ)

    Advanced Member

  • Members
  • PipPipPip
  • 564 posts

Posted 07 October 2010 - 08:10 PM

Hi Charles,

Thanks for the sharing this project...and for sharing your story! It sounds like you learned a lot and had a lot of fun over the last week or two!

I know that a member community members (oz, you reading this?) are probably going to start tearing into this in about 3...2...1...

:)

Chris



"OK let me see... I WANTZ... i suppose I should read some feedback first..." but sadly I can not tear into it yet, I have been busy with school. I am trying to get my plan together for my At Computer Science class project. I plan on making something with the netduino... enough about me..

I hope I get to look at this over the weekend.
Thanks a lot for the upload and congratulations on your first project Charles! :D

#4 Charles

Charles

    Advanced Member

  • Members
  • PipPipPip
  • 192 posts

Posted 07 October 2010 - 11:39 PM

"OK let me see... I WANTZ... i suppose I should read some feedback first..." but sadly I can not tear into it yet, I have been busy with school. I am trying to get my plan together for my At Computer Science class project. I plan on making something with the netduino... enough about me..

I hope I get to look at this over the weekend.
Thanks a lot for the upload and congratulations on your first project Charles! :D


Thanks for the comment! I look forward to getting some feedback on the code!

#5 Omar (OZ)

Omar (OZ)

    Advanced Member

  • Members
  • PipPipPip
  • 564 posts

Posted 09 October 2010 - 03:52 AM

Thanks for the comment! I look forward to getting some feedback on the code!

I am sorry to report that my cmd promt doesnt get a reply, it is a little strange because if I close the cmd promt while it is 'Connecting' there is an exception thrown... its probably my computer and/or router. What OS did you test this on?

#6 Charles

Charles

    Advanced Member

  • Members
  • PipPipPip
  • 192 posts

Posted 09 October 2010 - 01:52 PM

I have a feeling I already know where the exception is coming from... There is a glitch in the byte to character converters (Encoding.UTF8.GetBytes and possibly Convert.ToChar) that causes them to throw an exception if they encounter a byte representing ASCII characters above #127. The client is likely sending option commands in-line which my server is not yet set up to handle. Try it with PuTTY - possibly the best telnet client in existence. It is less picky about options. I'm working to implement the proper support but PuTTY will work in the mean time.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.