Configuration compatibility question: Can LWIP and RNDIS configurations coexist? #3245
-
Environment
I'm working on an STM32F765 project where I need to support both regular Ethernet (using LWIP) and RNDIS USB on the same device with FreeRTOS. I have two different Mongoose configurations and I'm wondering about their compatibility. For LWIP: #if defined(MG_ARCH)
#define MG_STMPACK_ARCH MG_ARCH
#undef MG_ARCH
#elif defined(__GNUC__)
#define MG_STMPACK_ARCH MG_ARCH_NEWLIB
#endif
#define MG_ENABLE_PACKED_FS 1
#define MG_ENABLE_CUSTOM_MILLIS 0
#define MG_ENABLE_MBEDTLS 0
#define MG_ARCH MG_ARCH_FREERTOS
#define MG_ENABLE_LWIP 1
#define MG_ENABLE_CUSTOM_RANDOM 1
#if MG_ENABLE_PACKED_FS
#define MG_ENABLE_FILE 0
#endif For RNDIS: #define MG_ARCH MG_ARCH_FREERTOS
#define MG_ENABLE_FREERTOS_TCP 1
#define MG_ENABLE_DRIVER_STM32F 1
#define MG_ENABLE_CUSTOM_RANDOM 1
#define MG_ENABLE_PACKED_FS 1 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Please do not open an issue to ask a question I don't understand what you mean by "compatibility". In your particular case, perhaps using FreeRTOS+TCP over Ethernet or even adding an RNDIS driver to lwIP would be a clean choice, I personally don't see a reason why you need lwIP, nor why you use FreeRTOS+TCP, both stacks can handle more than one interface. |
Beta Was this translation helpful? Give feedback.
Please do not open an issue to ask a question
Ask a question in the section for asking questions. Migrated.
I don't understand what you mean by "compatibility".
2: You are not using RNDIS, you are using FreeRTOS+TCP, whatever is behind that is not seen by Mongoose
You are using lwIP in case 1 and FreeRTOS+TCP in case 2. No, you can't have more than one TCP/IP stack at the same time. You either use one or the other.
If you would be using our built-in TCP/IP stack, that would be two drivers. You can't have two drivers, either.
In your particular case, perhaps using FreeRTOS+TCP over Ethernet or even adding an RNDIS driver to lwIP would be a clean choice, I personally don't see a reason why …