XSocket Ethernet library

Post Reply
User avatar
Berni
Respected Member
Posts: 363
Joined: Thu Dec 10, 2009 10:17 pm
Contact:

XSocket Ethernet library

Post by Berni »

If you have tried to use the web server example to get your Ethernet project going you probably cant count how much hair you lost over trying to make something with it. Its really hard to figure out how to use it and the code in the end is very messy. It doesn't have to be this way. Using ethernet on a PC is a breaze with the windows sockets interlace or WinSock for short. It simplifys the whole networking thing down to a few commands to listen,connect,and read/write the built in receive and transmit buffers. Why not bring this simplicity to the xmos platform so even someone realtivly new to C can get a basic networking app running in minutes.
The goal is to create a proper library that can mimic the basic functions of the winsock API to make networking on xmos a breeze. Basic idea is to create these sockets that each can have 1 connection open on it and a few basic commands to control them and transfer data on that socket.With this simplified API we can create a webserver in about 10 lines of easy to read code.
So we got a basic implementation of the API that works but is still very messy.I do not recommend using it yet, but highly encourage people to take a look and improve on it. There are a lot of xmos boards with built in ethernet but no framework for creative users to build on.
If this project really takes off we might see a upgrade to the API that has built in modules like webservers, FTP servers, E-mail clients etc to even further simplify the creation of networked apps
Project page: Winsock API Ethernet driver
Its time to make networking simple as it was meant to be!
Read


User avatar
shawn
XCore Addict
Posts: 238
Joined: Thu Dec 17, 2009 5:15 am

Post by shawn »

Smoking banner! this groups has taste.
I'm still checking the big diffence between
OSI4, IPv4, IPv6...
looks like I have more to learn.
I'll check backs soon as this project is hot.
Is that smoke rising off the jack, joking ; )
User avatar
BEBDigitalAudio
Experienced Member
Posts: 82
Joined: Thu Nov 11, 2010 7:45 pm

Post by BEBDigitalAudio »

I have just uploaded the very first version (V0.1) of the xtcp_sockets library on my project page. Take care : this version only supports UDP for now (no TCP at all). I have extensively tested it, but if you find any bug or have any suggestion, please report them to me.
Important thing to know : this is not a port from Berni's library, so the use is completely different (the two projects ARE different... but since this group is about XTCP and sockets, I thought it was important to inform all members about it)
User avatar
BEBDigitalAudio
Experienced Member
Posts: 82
Joined: Thu Nov 11, 2010 7:45 pm

Post by BEBDigitalAudio »

V0.2 of my xsockets stack is available for download on my project page.
TCP server support has been added and most of code cleanup is done now.
User avatar
BEBDigitalAudio
Experienced Member
Posts: 82
Joined: Thu Nov 11, 2010 7:45 pm

Post by BEBDigitalAudio »

Hello all,
I just uploaded the xsockets 0.3 package on the projects page.

This versions corrects a small compilation problem that occurs if the application tries to deactivate TCP or UDP (V0.2 could be compiled only if there was at least one UDP and one TCP socket). Now you can deactivate TCP or UDP sockets (for UDP only applications for example)

I also removed the code to control the XC2 LEDs (the code was just switching them off, and it leads to problems on other targets like the XDK)

Removed also some uIP and xsockets logging messages being displayed even if UIP_CONF_LOGGING was set to 0.
User avatar
BEBDigitalAudio
Experienced Member
Posts: 82
Joined: Thu Nov 11, 2010 7:45 pm

Post by BEBDigitalAudio »

Here are the main changes from previous version :

Status changed to alpha release
Bugs corrected in some low level functions
New functions added in client

More details available in release_notes.txt file
User avatar
BEBDigitalAudio
Experienced Member
Posts: 82
Joined: Thu Nov 11, 2010 7:45 pm

Post by BEBDigitalAudio »

The xsockets V0.6 is available. This version corrects the bug found in V.05 (TCP sockets were closing unexpectedly after sending a packet) and adds an important feature (memory pool for buffers, allowing each socket to have a different buffer, avoiding memory waste)
Post Reply