Hello, I new in LWIP. Now I am working on RNDIS. My target device is STM32f205. I am using LWIP with FreeRTOS. Now I can't coupe with LWIP. I did USB-RNDIS interface and my OS detects device as ethernet adapter. Next step is to get IP address for adapter.
I have IN BULK End Point (EP) 64 byte, OUT BULK EP 64 byte and INTERRUPT EP 8 byte. As I understand I had to collect all 64 bit transactions in a single Ethernet II packet and transmint to ethernet_input(frame, &netif_data)?
I do it the next way:
if (*Len == 64)
{
memcpy(rxPacketBuffer + packetSize, Buf, *Len);
packetSize += (*Len);
}
else
{
memcpy(rxPacketBuffer + packetSize, Buf, *Len);
packetSize += (*Len);
frame = pbuf_alloc(PBUF_RAW, (u16_t) packetSize, PBUF_POOL);
if (frame == NULL)
{
return USBD_OK;
}
memcpy(frame->payload, rxPacketBuffer, packetSize);
if (ethernet_input(frame, &netif_data) != ERR_OK)
pbuf_free(frame);
packetSize = 0;
}
Next question is about dhcp. To get IPv4 addres on my device should work dhcp server. What dhcp_start(netif) did? Is it dhcp server start or some thing else?