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.
Socket based TCP/UDP network stack (XSOCKETS)
-
- Experienced Member
- Posts: 82
- Joined: Thu Nov 11, 2010 7:45 pm
-
- XCore Expert
- Posts: 956
- Joined: Fri Dec 11, 2009 3:53 am
- Location: Sweden, Eskilstuna
Probably not the most confused programmer anymore on the XCORE forum.
-
- XCore Expert
- Posts: 956
- Joined: Fri Dec 11, 2009 3:53 am
- Location: Sweden, Eskilstuna
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 ?
Probably not the most confused programmer anymore on the XCORE forum.
-
- Experienced Member
- Posts: 82
- Joined: Thu Nov 11, 2010 7:45 pm
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)
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)
-
- Experienced Member
- Posts: 82
- Joined: Thu Nov 11, 2010 7:45 pm
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
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
-
- Experienced Member
- Posts: 82
- Joined: Thu Nov 11, 2010 7:45 pm
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)
-
- Experienced Member
- Posts: 82
- Joined: Thu Nov 11, 2010 7:45 pm
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
It should be available for download in the next days
-
- Experienced Member
- Posts: 82
- Joined: Thu Nov 11, 2010 7:45 pm
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.
Please take a look to the release notes for details about the change.
-
- Junior Member
- Posts: 7
- Joined: Wed Nov 21, 2012 6:16 pm
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
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
-
- Experienced Member
- Posts: 82
- Joined: Thu Nov 11, 2010 7:45 pm
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
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