[lwip-users] Consecutive calls to sendto() and recvfrom() functions
Hi guys! I've been trying to implement UDP server application on my custom ZYNQ board. I am using lwip141 1.5 with FreeRTOS. This is a simple UDP server example I am trying to implement: while ( TRUE ) { for ( i = 0; i < 4; i++) { printf("waiting for message...\r\n"); bytes_received = recvfrom(socket_value, buffer, MAX_UDP_PACKET_SIZE, 0, (struct sockaddr*) _addr, _size); printf("message received: %s\n", buffer); } buffer[0] = 'e'; for ( i = 0; i < 4; i++) { temp = buffer[0] + i; sendto(socket_value, , 1, 0, (struct sockaddr*) _addr, addr_size); } } Note: before this while loop I have only calls to socket and bind, and of course, part of code that sets sockaddr_in struct for server. So, it's really simple app. On the client side, of course, it is vice versa, I have 4 sendto() calls and than 4 recvfrom() calls. I have tried these applications on PC (with windows sockets), both server and client were run at the same PC, and that works in an expected way. However, when I run my server application on ZYNQ board it behaves quite randomly. For example, server receives only the last message, while the first three are not received/detected. Can anyone help me with problem, I would be really grateful? If there is any other information I need to give, please tell me, I am not sure whether I forgot to mention something. Thank you ___ lwip-users mailing list lwip-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/lwip-users
Re: [lwip-users] Consecutive calls to sendto() and recvfrom() functions
And yeah, the most important thing, PC and ZYNQ board are connected directly with Ethernet cable, so packets are not going out to network. On 24.10.2016 13:44, pekez wrote: Hi guys! I've been trying to implement UDP server application on my custom ZYNQ board. I am using lwip141 1.5 with FreeRTOS. This is a simple UDP server example I am trying to implement: while ( TRUE ) { for ( i = 0; i < 4; i++) { printf("waiting for message...\r\n"); bytes_received = recvfrom(socket_value, buffer, MAX_UDP_PACKET_SIZE, 0, (struct sockaddr*) _addr, _size); printf("message received: %s\n", buffer); } buffer[0] = 'e'; for ( i = 0; i < 4; i++) { temp = buffer[0] + i; sendto(socket_value, , 1, 0, (struct sockaddr*) _addr, addr_size); } } Note: before this while loop I have only calls to socket and bind, and of course, part of code that sets sockaddr_in struct for server. So, it's really simple app. On the client side, of course, it is vice versa, I have 4 sendto() calls and than 4 recvfrom() calls. I have tried these applications on PC (with windows sockets), both server and client were run at the same PC, and that works in an expected way. However, when I run my server application on ZYNQ board it behaves quite randomly. For example, server receives only the last message, while the first three are not received/detected. Can anyone help me with problem, I would be really grateful? If there is any other information I need to give, please tell me, I am not sure whether I forgot to mention something. Thank you ___ lwip-users mailing list lwip-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/lwip-users
Re: [lwip-users] LLDP Implementation for 1.4.1
Hello Sergio I run a windows system and Unix does not allow to run Git. I would definitely put in the ReadMe document. I will try to see if I can run Git on Windows system, but then which Git branch do I need to pull in and what permissions I need to have. The one listed on savannah does not seem to work on TI's windows system, so need to double check. Regards Amit On Mon, Oct 24, 2016 at 7:54 AM, Sergio R. Caprilewrote: > If you run a un*x flavor, you can have a fresh 1.4.1 tree and your > modified tree, and run a simple 'diff -pu -r fresh mod >lldp.patch' > standing at the parent for both trees. > A readme will be nice in case the developers decide not to include it as > built-in and there is 'user installation' needed for interested parties. > Your chances of it being considered for inclusion might improve if you > patch against git head instead of 1.4.1 > > > ___ > lwip-users mailing list > lwip-users@nongnu.org > https://lists.nongnu.org/mailman/listinfo/lwip-users > ___ lwip-users mailing list lwip-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/lwip-users
Re: [lwip-users] LLDP Implementation for 1.4.1
If you run a un*x flavor, you can have a fresh 1.4.1 tree and your modified tree, and run a simple 'diff -pu -r fresh mod >lldp.patch' standing at the parent for both trees. A readme will be nice in case the developers decide not to include it as built-in and there is 'user installation' needed for interested parties. Your chances of it being considered for inclusion might improve if you patch against git head instead of 1.4.1 ___ lwip-users mailing list lwip-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/lwip-users