I have lwip running on my board, I can successfully ping the board and also tested the supplied webserver (web.c) and this is working perfect.
Currently I am trying to open a UDP socket the following way using "lwip/sockets.h":
Code: Select all
int iBytesWritten = 0;
struct sockaddr_in sa;
memset(&sa, 0, sizeof(struct sockaddr_in));
sa.sin_family = AF_INET;
sa.sin_len = sizeof(sa);
sa.sin_addr.s_addr = inet_addr("192.168.82.20");
sa.sin_port = htons(5060);
int sockfd = lwip_socket(AF_INET, SOCK_DGRAM, 0);
iBytesWritten = lwip_sendto(sockfd, (char*)"hallo", (int)5, 0, (struct sockaddr*)&sa, sizeof(sa));
The ip for the board is "192.168.82.160" and target host is "192.168.82.20" .
The 'iBytesWritten' variable nicely holds 5 bytes written when it returns, but no connection to my socket test program on the target host, also with wireshark no visible traffic.
Does anyone have an idea why this wouldn't work properly?
Cheers,
Gerard