Karolina_1
Member level 3
I interfaced ethernet and GPRS module with ATSAME53N20A MCU to access internet using lwIP and its working.
I also used ready to use esp-idf examples to create tcpip_client in eclipse with ESP32(standalone) and it is working as well.
Now, I want to make a tcpip_client(lwIP netconn) using ESP32 module together with ATSAME53. ATSAME will be acting as the main MCU and I want to create a client using netconn APIs in lwip which will be in ATSAME. ESP32 uart pins connected to uart pins in ATSAME. I want ESP32 to be just bridge and give data from the router(internet) to ATSAME which will use lwip to process it and create a netconn client.
My theory:
(ESP-->ATSAME)
I changed inside wlanif_input(struct netif *netif, void *buffer, u16_t len, void* eb) function in ESPlwip and send the buffer(packet) to ATSAME using uart(instead of tcpip_thread to process). I want packets to be processed in ATSAMElwip. When I received packets from ESP32 in ATSAME side, I called tcpip_input(p, &TCPIP_STACK_INTERFACE_0_desc) to send it to tcpip_thread to be processed.
(ATSAME-->ESP)
Coming packets from ATSAMElwip were sent to esp using tcpip_output_raw (I created it and called from TCPIP_STACK_INTERFACE_0_stack_init fn) and received in ESP using low_level_output function and sent using esp_wifi_internal_tx(wifi_if, q->payload, q->len);
I also used ready to use esp-idf examples to create tcpip_client in eclipse with ESP32(standalone) and it is working as well.
Now, I want to make a tcpip_client(lwIP netconn) using ESP32 module together with ATSAME53. ATSAME will be acting as the main MCU and I want to create a client using netconn APIs in lwip which will be in ATSAME. ESP32 uart pins connected to uart pins in ATSAME. I want ESP32 to be just bridge and give data from the router(internet) to ATSAME which will use lwip to process it and create a netconn client.
My theory:
(ESP-->ATSAME)
I changed inside wlanif_input(struct netif *netif, void *buffer, u16_t len, void* eb) function in ESPlwip and send the buffer(packet) to ATSAME using uart(instead of tcpip_thread to process). I want packets to be processed in ATSAMElwip. When I received packets from ESP32 in ATSAME side, I called tcpip_input(p, &TCPIP_STACK_INTERFACE_0_desc) to send it to tcpip_thread to be processed.
(ATSAME-->ESP)
Coming packets from ATSAMElwip were sent to esp using tcpip_output_raw (I created it and called from TCPIP_STACK_INTERFACE_0_stack_init fn) and received in ESP using low_level_output function and sent using esp_wifi_internal_tx(wifi_if, q->payload, q->len);