I run LWIP on a RX63, this is NOT an ESP device.
I had some trouble to get it working. The problem is the allignment in LWIP on Renesas.
When using the list from [getaddrinfo] it is not 4-byte alligned. Because of that it will fail the [connect] function.
Using a helper-variable it will avoid this problem.
After this it worked like a charm.
---------- SNIP -- blynk.c line 684 ----
int fd = -1;
struct addrinfo *r;
struct sockaddr addr;
for (r = result; r != NULL; r = r->ai_next) {
fd = socket(r->ai_family, r->ai_socktype, r->ai_protocol);
if (fd < 0) {
continue;
}
// Copy the result into the helper for getting 4bytes allignment
addr = *r->ai_addr;
if (connect(fd, &addr, sizeof(addr)) < 0) {
close(fd);
fd = -1;
continue;
}
break;
}
----------- SNIP -------------
I run LWIP on a RX63, this is NOT an ESP device.
I had some trouble to get it working. The problem is the allignment in LWIP on Renesas.
When using the list from [getaddrinfo] it is not 4-byte alligned. Because of that it will fail the [connect] function.
Using a helper-variable it will avoid this problem.
After this it worked like a charm.
---------- SNIP -- blynk.c line 684 ----
int fd = -1;
struct addrinfo *r;
struct sockaddr addr;
for (r = result; r != NULL; r = r->ai_next) {
fd = socket(r->ai_family, r->ai_socktype, r->ai_protocol);
if (fd < 0) {
continue;
}
// Copy the result into the helper for getting 4bytes allignment
addr = *r->ai_addr;
if (connect(fd, &addr, sizeof(addr)) < 0) {
close(fd);
fd = -1;
continue;
}
break;
}
----------- SNIP -------------