Page 2 of 3

Re: Socket based TCP/UDP network stack (XSOCKETS)

Posted: Fri Jan 14, 2011 8:23 am
by BEBDigitalAudio
This version corrects some major problems found in 0.4 (especially a potential deadlock between Ethernet and uIP threads). Please look the release notes file included.

Re: Socket based TCP/UDP network stack (XSOCKETS)

Posted: Fri Jan 14, 2011 9:08 am
by lilltroll

Re: Socket based TCP/UDP network stack (XSOCKETS)

Posted: Fri Jan 14, 2011 5:54 pm
by lilltroll
I have merged sockets 0.5 & my module_XDKconsole.0v22 to be able to use the XDK stand alone in networks. Maybe a co-op when it starts to mature ?

Re: Socket based TCP/UDP network stack (XSOCKETS)

Posted: Fri Jan 21, 2011 8:09 am
by BEBDigitalAudio
Hey liltroll,
no problem for a future collaboration. The 1.0 version is coming (as soon as I correct a stupid bug I introduced), I think it will be the correct moment to do that (I will also GIT the package at this moment)

Re: Socket based TCP/UDP network stack (XSOCKETS)

Posted: Tue Jan 25, 2011 10:17 pm
by BEBDigitalAudio
Hi all,
as I was working on V0.6, I had the very bad surprize to see a serious crash in TCP server sockets. The TCP socket closes after the first transmission, with a superb event_timedout() error. I made the same test with v0.5 and arrrgggg... the bug is here also.
So I recommend to use V0.4 until the next release if you want to use TCP sockets. UDP sockets are not concerned by this bug (so you can use V0.5 if your application does not use TCP)
I will release the V0.6 with a correction for this bug as soon as possible

Re: Socket based TCP/UDP network stack (XSOCKETS)

Posted: Thu Feb 17, 2011 7:44 am
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)

Re: Socket based TCP/UDP network stack (XSOCKETS)

Posted: Tue Mar 29, 2011 6:02 pm
by BEBDigitalAudio
I am about to release V0.7. This new version will mainly include two new functions, which allow a socket to be closed and reopened (which is not possible right now, since the buffers would be reallocated in the memory pool)
It should be available for download in the next days

Re: Socket based TCP/UDP network stack (XSOCKETS)

Posted: Mon May 09, 2011 7:56 pm
by BEBDigitalAudio
V0.7 is a major update compared to V0.6. Some major bugs have been corrected.
Please take a look to the release notes for details about the change.

Re: Socket based TCP/UDP network stack (XSOCKETS)

Posted: Wed Nov 21, 2012 6:47 pm
by colinbroad
Hi
Sorry if this is the wrong place but I am new at this and did not know who to ask!

I have just started playing with the xmos chipset and I am looking at their ethenet interface. I want to be able receive udp broadcast messages, The settings I am using are as follows

IP 192.168.0.20
Mask 255.255.255.0
Port 28283

No Problem with unicast message to IP 192.168.0.20
No Problem with Broadcast Message to IP 255.255.255.255
BUT there is no reception of Broadcast message to IP 192.168.0.255

I have tried adding

// Join broadcast group
xtcp_ipaddr_t bcast_addr = {192,168,0,255};
xtcp_join_multicast_group(c_xtcp, bcast_addr);

any ideas?

Thanks

Colin




Re: Socket based TCP/UDP network stack (XSOCKETS)

Posted: Mon Nov 26, 2012 4:00 pm
by BEBDigitalAudio
Hello Colin,
no problem, even if it's not really the good place for XTCP question, XCore is nice group of friends, where everybody tries to help the others 8-)

First thing : you are mixing the multicast and the broadcast things. Everything related to join() is related to multicast, and has nothing to see with broadcast. So, there is no need to join any group to receive limited broadcast (in other terms, you can remove the second line in your code example)

Second thing : the problem you see comes from a bug within uIP, on which XTCP is based. You have to modify the reception code in uIP, otherwise it considers 192.168.0.255 destination address as a unicast address. uIP then rejects it when it receives a message, since your local address will always be different from this one.

I do not know if you have the heart to modify uIP source code, it is not really an easy task, that I do not recommend to beginners. If you think you want to try it, tell it to me, I will give here the patch which solve the problem in uIP

Benoit