Can lwip do both IPv4 and IPv6 at the same time? Same question for the HTTP server. I know for a fact that it could be done in MQX5.0, because I did it. I don't know about lwip though. It looks as if the HTTP server can not due to the following code snipet:
static int32_t httpsrv_set_params(HTTPSRV_STRUCT *server, HTTPSRV_PARAM_STRUCT *params)
{
#if LWIP_IPV4
server->params.address.sa_family = AF_INET;
((struct sockaddr_in *)(&server->params.address))->sin_port = PP_HTONS(HTTPSRV_CFG_DEFAULT_HTTP_PORT);
#elif LWIP_IPV6
server->params.address.sa_family = AF_INET6;
((struct sockaddr_in6 *)(&server->params.address))->sin6_port = PP_HTONS(HTTPSRV_CFG_DEFAULT_HTTP_PORT);
#endif
Sure wish you guys would have just kept the MQX RTCS instead of going to lwip...
Hi @larrydemuth :
Theoretically, IPv4 and IPv6 can run at the same time. But from the code snippet you past, it seems not in MQX v5 HTTPSRV.
I would suggest you contact Embedded Access directly, who is the owner of MQX now.
Regards
Daniel
OK, after further testing I was able to get IPv4 and IPv6 ping to work, so it appears lwip can support both at the same time. However the HTTP interface does NOT! Is there a plan to update the HTTP server to do both at the same time? It shouldn't be that difficult since pretty much all of the HTTP server code was taken straight from MQX, and it supported both at the same time.
@larrydemuth I will create a feature request to the software team. Thanks for your feedback.
Regards
Daniel
I was asking about lwip and not MQX 5.0. I'm evaluating the IMXRT1024 and am using MCUXpresso and SDK 2.11.1 which uses lwip. I tried building with both LWIP_IPV4 and LWIP_IPV6 defined. When I tried to ping only IPv4 got a response, IPv6 did not. I also could not access the web page using IPv6.
I know it works using MQX 5.0 and a K66 part since I did it, I just have doubts about lwip in SDK 2.11.1.