Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

tcp client using ESP32 and ATSAME(main MCU) with lwIP

Status
Not open for further replies.

Karolina_1

Member level 3
Joined
Mar 10, 2017
Messages
67
Helped
0
Reputation
0
Reaction score
1
Trophy points
8
Activity points
639
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);
 

Are you using the ESP32 with the LUA script or any other interpreted command language, or have you compiled some C code directly from SDK to run within it? I fear that the Serial interface, unless being interrupt driven, will be a bootleneck; Anyway, even the lowest standard Ethernet speed 10Mbps would traffic data far above the maximum standard UART baud rate, typically 115.2Kbps.
 

I am using ESP32 with eclipse IDE with C and ATSAME with atmel studio IDE with C. I wıll be using uart with 921600 baudrate. I hope it will be enough. Thank you
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top