Search found 54 matches

by MikeMyhre
Fri Aug 23, 2024 2:20 am
Forum: ESP-IDF
Topic: How to ping to all three interfaces- ethernet,GSM and Wifi-sta
Replies: 7
Views: 2677

Re: How to ping to all three interfaces- ethernet,GSM and Wifi-sta

My ping code: /* ICMP echo example This example code is in the Public Domain (or CC0 licensed, at your option.) Unless required by applicable law or agreed to in writing, this software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ #in...
by MikeMyhre
Fri Aug 23, 2024 2:16 am
Forum: ESP-IDF
Topic: How to ping to all three interfaces- ethernet,GSM and Wifi-sta
Replies: 7
Views: 2677

Re: How to ping to all three interfaces- ethernet,GSM and Wifi-sta

Yes. I have pings working in IDF version 5.2.1
I had to use a different ping code.

Here is my thread discussing it.
viewtopic.php?f=13&t=39160&p=136011#p136011
by MikeMyhre
Tue Aug 20, 2024 1:07 am
Forum: ESP-IDF
Topic: Unable to start DHCP server on ethernet port
Replies: 3
Views: 1006

Re: Unable to start DHCP server on ethernet port

Awesome. That worked. Thank you. If I wanted to take an existing port after being initialized as a non server port, is there a way I can reinitialize it as a DHCP Server port without rebooting? I can stop the state machine (down the port) but I don't see a way to unattach the glue and do a new confi...
by MikeMyhre
Sun Aug 18, 2024 2:25 pm
Forum: ESP-IDF
Topic: Unable to start DHCP server on ethernet port
Replies: 3
Views: 1006

Unable to start DHCP server on ethernet port

I am using IDF version 5.2.1 and an ESP32-WROOM module. I have a KSZ8863 3 port switch that provides two Ethernet ports (using 2 port mode). Everything is working well sending packets through the TAP interfaces. ARP, ICMP, UDP packet flow all as expected. Now I want to take one port and make it an i...
by MikeMyhre
Fri Aug 16, 2024 1:21 am
Forum: ESP-IDF
Topic: How to switch to DHCP after Static address
Replies: 1
Views: 489

Re: How to switch to DHCP after Static address

Just figured out a solution.
If I stop and start the interface after enabling the DHCP process, it grabs the DHCP address and everything works.
by MikeMyhre
Thu Aug 15, 2024 10:37 pm
Forum: ESP-IDF
Topic: How to switch to DHCP after Static address
Replies: 1
Views: 489

How to switch to DHCP after Static address

I am using a KSZ8863 and L2Tap functions. IDF 5.2.1 with ESP32S3-WROOM module. I am able to boot up and use DHCP as the default. I am also able to switch to Static IP by disabling the dhcpc function and setting the IP. The problem I have is when I try to go back to DHCP. How should I do that? Do I j...
by MikeMyhre
Wed Aug 14, 2024 5:31 pm
Forum: ESP-IDF
Topic: Print ARP table in ESP-IDF 5.1.1 version
Replies: 1
Views: 817

Re: Print ARP table in ESP-IDF 5.1.1 version

You can use the etharp_get_entry() function. Something like this: struct eth_addr *ethaddr; struct netif *netif; struct eth_addr *ea; for( int i=0;i<ARP_TABLE_SIZE;i++ ) { int ret = etharp_get_entry(i,&ipaddr,&netif,&ea); if( ret ) { // print contents of IP (ipaddress->addr), interface (netif->num),...
by MikeMyhre
Mon Aug 12, 2024 5:38 pm
Forum: ESP-IDF
Topic: Ping session starts, no callbacks or results
Replies: 6
Views: 1555

Re: Ping session starts, no callbacks or results

I put in a log statement and see lots of buffers that need to be freed.
So I guess I need to identify my packets that don't need to be freed or I need to allocate a buffer that can be freed (preferred).
by MikeMyhre
Mon Aug 12, 2024 5:26 pm
Forum: ESP-IDF
Topic: Ping session starts, no callbacks or results
Replies: 6
Views: 1555

Re: Ping session starts, no callbacks or results

I found a work around but not sure if it is complete. When calling eth_netif_receive() it wants to free the buffer, but my buffer is static and doesn't need to be freed. I created my own empty function and assigned it to myNetif->driver_free_rx_buffer to override the default. Now the pings work and ...
by MikeMyhre
Mon Aug 12, 2024 2:25 pm
Forum: ESP-IDF
Topic: Ping session starts, no callbacks or results
Replies: 6
Views: 1555

Re: Ping session starts, no callbacks or results

Once you open tap interface for specific ethertype, these frames are then only accepted by the tap interface. They are not passed to the IP stack. It's described at: https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-reference/network/esp_netif.html#e-esp-netif-l2-tap-interface Please ...