Shop OBEX P1 Docs P2 Docs Learn Events
ENC28J60 TCP/IP Sockets / Telnet Layer Wish List — Parallax Forums

ENC28J60 TCP/IP Sockets / Telnet Layer Wish List

Harrison.Harrison. Posts: 484
edited 2007-11-22 09:27 in Propeller 1
I spent the last 4 days working on a complete rewrite of my previous Propeller TCP stuff. I now have a relatively stable beta that will be turned into a release within the next few days after I get the API layer cleaned up.

The socket layer currently has tcp client/server socket support. There are 2 available concurrent sockets, each with its own 128byte circular tx/rx buffers. The socket count can be easily changed by copying and pasting the DAT sections and editing a few constants. I tried to make everything as flexible as possible, which unfortunatelly made the overall stack run a bit slower (probably 1 - 2 ms worth of inefficiency). The socket layer is accessible from any SPIN cog (it uses the SerialMirror method of sharing buffers and using DAT sections).

So what do you guys want to see in the initial release? I would appreciate any comments or suggestions. I hope to have the API set in stone so it doesn't break stuff in later releases.

Current Documentation (SPIN Documentation + Images + Specs) : code.google.com/p/proptcp/wiki/TelnetServer (Has a nice screenshot of Femto/Dongle Basic running in telnet)

I hope to have it released by Thanksgiving (I like holiday releases). Imagine, you could be eating turkey and playing with ethernet!

Harrison

Comments

  • QuattroRS4QuattroRS4 Posts: 916
    edited 2007-11-20 11:15
    Harrison,
    That's great .. looking forward to that. I was waiting and waiting for the C compiler for the prop to facilitate easier porting of the Microchip stuff (as it is pretty well documented) but alas - no compiler yet !
    Well done yet again ! Looks like I will be eating turkey in the workshop !

    John Twomey

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    'Necessity is the mother of invention'

    Post Edited (QuattroRS4) : 11/20/2007 11:20:09 AM GMT
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2007-11-20 15:33
    Somebody said...
    Looks like I will be eating turkey in the workshop

    Yeah, I was thinking the same thing... [noparse]:)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Buttons . . . check. Dials . . . check. Switches . . . check. Little colored lights . . . check.

    — Calvin, of 'Calvin and Hobbes.
  • RaymanRayman Posts: 14,162
    edited 2007-11-20 17:09
    I'm very interested in this...· I've got the ENC28J60 chips, but haven't tried to use them yet.

    Apart from work needs, I was thinking about trying to automatically download weather info from the web and display it somehow...

    I have not idea how this all works but, will the 256 byte buffer limit the kind of info you can pull from the web?

    Should we use·a SD card as a bigger buffer?
  • Harrison.Harrison. Posts: 484
    edited 2007-11-20 18:14
    The maximum 256 byte buffer allowed by the current byte sized circular pointer variables is indeed a bit small for downloading full sized web pages. I am planning on using an external server (such as an Apache web server) to provide smaller sized data to the Propeller. This way, I can mash up data and still be able to fit everything within the Propeller (YBox-style).

    Another issue is there is no DHCP or DNS yet. All connections must be made via IP, which rules out using alot of the open web services as they all require some sort of DNS (IP changes alot). Other than that, the IP connections are fully implemented, ie: the ARP code will look at the IP and figure out if it needs to go through your router/gateway to get to the host based on your subnet.

    Harrison
  • parts-man73parts-man73 Posts: 830
    edited 2007-11-20 19:28
    Looks like I received that large batch of PropNICs just in time!

    Looks like great work. I only looked at the updated HTTP server with the VGA debug info, I haven't had a chance to look at the telnet but looks promising for some applications. Would this be a good method of passing information back and forth between remote props? Like say in a multiplayer gaming environment? smile.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Brian

    uController.com - home of SpinStudio

    PropNIC - Add ethernet ability to your Propeller!

    SD card Adapter
  • Harrison.Harrison. Posts: 484
    edited 2007-11-20 20:25
    parts-man73 said...
    Would this be a good method of passing information back and forth between remote props? Like say in a multiplayer gaming environment?

    Definitely. That is the reason why I incorporated server/client sockets. There aren't many devices that will allow client-server type connections easily. The ones that do don't seem to provide extremely good integration, not to mention most only allow one active socket. The only one I have seen that is even remotely close is the Wiznet module, but that in itself looks like a pain (I have one, and I still decided to write my own stack!)

    I haven't been able to test propeller to propeller communication. I assume it will work since I have been able to successfully connect to/from Linux and Windows PCs. I still have to test Macs, but it can't be much worse then working with Linux' extraneous and annoying tcp options.

    I also have a multi packet HTTP server that's extremely hacked together. I still need to add SD card support, but it should be ready by Christmas (another holiday release?). I am hoping to emulate the PINK variables and such (hopefully Parallax won't destroy me for doing that).

    Harrison
  • parts-man73parts-man73 Posts: 830
    edited 2007-11-20 21:22
    Harrison said...
    I also have a multi packet HTTP server that's extremely hacked together. I still need to add SD card support, but it should be ready by Christmas (another holiday release?).

    That'd be a nice Christmas present for us! smilewinkgrin.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Brian

    uController.com - home of SpinStudio

    PropNIC - Add ethernet ability to your Propeller!

    SD card Adapter
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2007-11-20 21:28
    So let me see if I get this right...

    I'll load my multi-player game on the Propeller, connected to the Internet..

    Then connect to a propeller running a webserver/gameserver to find another
    player to play against... <heh!>

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Buttons . . . check. Dials . . . check. Switches . . . check. Little colored lights . . . check.

    — Calvin, of 'Calvin and Hobbes.
  • simonlsimonl Posts: 866
    edited 2007-11-21 10:14
    Great work Harrison - can't wait for Xmas!

    Just thinking about Prop-Prop comm's: would it be possible to use this stuff in a multi-prop setup without any magnetics / hub (e.g. just wiring all the prop's to a common set of PCB traces)?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cheers,

    Simon
    www.norfolkhelicopterclub.co.uk
    You'll always have as many take-offs as landings, the trick is to be sure you can take-off again ;-)
    BTW: I type as I'm thinking, so please don't take any offense at my writing style smile.gif
  • Harrison.Harrison. Posts: 484
    edited 2007-11-22 09:27
    Turns out I don't really have a stable enough version to be released. It does work fine, except it increments sequence / ack numbers too fast, thus causing telnet clients to perform local echoing. In theory this is fine since it just means the packets won't collide, but it has some weird side effects that I want to fix before releasing a stable version.

    I don't want to post a public link since it will likely cause all sorts of issues where people will get confused and I would have to explain what is wrong a million times.

    EDIT: False alarm, turns out it works completely fine. The issue lies in the way telnet works. It will only start to locally echo after a data packet with at least a byte is received. Then you have to explicitly turn off echo using NVT, which is messy. I am still figuring out a solution for telnet echo. The release date has been moved to Friday due to this weird issue.

    People who still want a beta copy can PM/email me. It will work as long as you setup a non-echoing client or implement your own NVT control stuff.

    Harrison

    Post Edited (Harrison.) : 11/22/2007 10:00:06 AM GMT
Sign In or Register to comment.