Arm Mbed OS support forum

Losing data when using the UIPEthernet Mbed library

Hello! Using the UIPEthernet by @hudakz I have a problem: more than about 90% of the packets I send over UDP are lost. I have ENC28J60 module, microcontroller with MBED
and UIPEthernet library, I accept UDP data from the computer on ENC28J60 and everything works well, But the situation manifests itself only when I send more than two packets from the computer at the same time (of course, the computer does not send them “simultaneously”, I mean that the packets go one by one close to each other) I checked on other devices and when the computer-to-computer connection via Ethernet, everything works perfectly, but when I connect the computer to my ENC28J60 chip, a problem arises.

As far as I understand, if the microcontroller does not have time to pick up from the ENC28J60 it should be stored in a special memory inside the ENC28J60 and this should solve my problem, but no. Can anyone know what I am doing wrong and what is the mistake? I am attaching a part of the code in which the UDP reception is processed. I am a beginner in development, thank you all for help!

/////the code below runs endlessly in a circle after initializing and opening a socket with the desired port 

int size = socketReceive.parsePacket();

    if (size > 0)

    {

      do
      {
        char *data = (char *)malloc(size + 1);
        int len = socketReceive.read(data, size + 1);
        data[len] = 0;
////////
///in this section, things are done with data and everything is ok
///////
        free(data);
      } while ((size = socketReceive.available()) > 0);
    }

  }

Hello,

  • Which revision of Mbed OS do you use?
  • What is your Mbed target board?

revision of Mbed OS - 6.60600.210128 (6.6.0)
target board - Nucleo f446re

I would suggest to try the new ENC28J60-EMAC driver rather than to use the old UIPEthernet library. It’s based on the native Mbed OS 6 Ethernet stacks and the hardware interface is the same as in case of the UIPEthernet. The biggest advantage of the ENC28J60-EMAC driver is that the application program code is same as in case of the native Mbed OS EMAC driver. This enables you to run all the Mbed OS 6 examples, the UDPSocket example included.

1 Like

Thanks for the answer! I will try to follow your advice, I hope this helps…

Hello! Maybe you could tell me…

I’m trying to use the new ENC28J60-EMAC driver and have some problems, when adding json files to the project.
During compilation, I see this error

“mbed build API internal error
Attempt to override undefined parameter ‘enc28j60-emac.mosi’ in ‘application [*]’”

I build the project in VS Code with Platformio. Maybe I somehow inserted your library incorrectly?
I just put the source folder “ENC28J60-EMAC” to the project directory and wrote #include “ENC28J60-EMAC / enc28j60_emac.h” in main.cpp

I will be infinitely grateful if you tell me, thanks for your time!

I’m very sorry but I am not familiar with the Platformio and I have no idea how to add a library to such projects.

1 Like

Do not include any ENC28J60-EMAC related header file into the “main.cpp”!

1 Like

Nice work! It would be great to have the Mbed OS connectivity tests passing within this component! I am interested in it too, I would be happy to contribute if I have some free time.

1 Like

These are the result using K64F:

mbedgt: test suite report:
| target       | platform_name | test suite                                                   | result | elapsed_time (sec) | copy_method |
|--------------|---------------|--------------------------------------------------------------|--------|--------------------|-------------|
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-mbedtls-tests-tests-mbedtls-multi       | OK     | 11.62              | default     |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-dns     | FAIL   | 76.66              | default     |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-tcp     | FAIL   | 76.91              | default     |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-tls     | FAIL   | 84.91              | default     |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-udp     | FAIL   | 76.83              | default     |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-network-interface | FAIL   | 76.36              | default     |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-network-l3ip      | OK     | 11.07              | default     |
mbedgt: test suite results: 2 OK / 5 FAIL
mbedgt: test case report:
| target       | platform_name | test suite                                                   | test case                                                | passed | failed | result  | elapsed_time (sec) |
|--------------|---------------|--------------------------------------------------------------|----------------------------------------------------------|--------|--------|---------|--------------------|
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-mbedtls-tests-tests-mbedtls-multi       | Crypto: sha256_multi                                     | 1      | 0      | OK      | 0.06               |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-mbedtls-tests-tests-mbedtls-multi       | Crypto: sha256_split                                     | 1      | 0      | OK      | 0.03               |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-dns     | mbed-os-connectivity-netsocket-tests-tests-netsocket-dns | 0      | 1      | FAIL    | 76.66              |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-tcp     | mbed-os-connectivity-netsocket-tests-tests-netsocket-tcp | 0      | 1      | FAIL    | 76.91              |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-tls     | mbed-os-connectivity-netsocket-tests-tests-netsocket-tls | 0      | 1      | FAIL    | 84.91              |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-udp     | mbed-os-connectivity-netsocket-tests-tests-netsocket-udp | 0      | 1      | FAIL    | 76.83              |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-network-interface | NETWORKINTERFACE_CONN_DISC_REPEAT                        | 0      | 0      | SKIPPED | 0.0                |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-network-interface | NETWORKINTERFACE_STATUS                                  | 0      | 1      | FAIL    | 61.23              |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-network-interface | NETWORKINTERFACE_STATUS_GET                              | 0      | 0      | SKIPPED | 0.0                |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-network-interface | NETWORKINTERFACE_STATUS_NONBLOCK                         | 0      | 0      | SKIPPED | 0.0                |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-network-l3ip      | L3IP_START                                               | 1      | 0      | OK      | 0.01               |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-network-l3ip      | L3IP_STOP                                                | 1      | 0      | OK      | 0.0                |

If I manually set a MAC address in the get_default_instance method these are the results. Please take a look and give me a feedback if you can @hudakz

mbedgt: test suite report:
| target       | platform_name | test suite                                                   | result  | elapsed_time (sec) | copy_method |
|--------------|---------------|--------------------------------------------------------------|---------|--------------------|-------------|
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-mbedtls-tests-tests-mbedtls-multi       | OK      | 11.46              | default     |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-dns     | TIMEOUT | 615.85             | default     |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-tcp     | TIMEOUT | 616.4              | default     |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-tls     | TIMEOUT | 624.51             | default     |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-udp     | TIMEOUT | 1216.14            | default     |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-network-interface | OK      | 66.3               | default     |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-network-l3ip      | OK      | 11.05              | default     |
mbedgt: test suite results: 3 OK / 4 TIMEOUT
mbedgt: test case report:
| target       | platform_name | test suite                                                   | test case                                     | passed | failed | result  | elapsed_time (sec) |
|--------------|---------------|--------------------------------------------------------------|-----------------------------------------------|--------|--------|---------|--------------------|
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-mbedtls-tests-tests-mbedtls-multi       | Crypto: sha256_multi                          | 1      | 0      | OK      | 0.07               |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-mbedtls-tests-tests-mbedtls-multi       | Crypto: sha256_split                          | 1      | 0      | OK      | 0.04               |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-dns     | ASYNCHRONOUS_DNS                              | 1      | 0      | OK      | 0.06               |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-dns     | ASYNCHRONOUS_DNS_CACHE                        | 0      | 0      | SKIPPED | 0.0                |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-dns     | ASYNCHRONOUS_DNS_CANCEL                       | 0      | 0      | SKIPPED | 0.0                |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-dns     | ASYNCHRONOUS_DNS_EXTERNAL_EVENT_QUEUE         | 0      | 0      | SKIPPED | 0.0                |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-dns     | ASYNCHRONOUS_DNS_INVALID_HOST                 | 0      | 0      | SKIPPED | 0.0                |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-dns     | ASYNCHRONOUS_DNS_MULTI_IP                     | 0      | 0      | SKIPPED | 0.0                |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-dns     | ASYNCHRONOUS_DNS_NON_ASYNC_AND_ASYNC          | 0      | 0      | SKIPPED | 0.0                |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-dns     | ASYNCHRONOUS_DNS_SIMULTANEOUS                 | 0      | 2      | FAIL    | 102.43             |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-dns     | ASYNCHRONOUS_DNS_SIMULTANEOUS_CACHE           | 0      | 2      | FAIL    | 102.48             |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-dns     | ASYNCHRONOUS_DNS_SIMULTANEOUS_REPEAT          | 0      | 0      | SKIPPED | 0.0                |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-dns     | ASYNCHRONOUS_DNS_TIMEOUTS                     | 0      | 0      | SKIPPED | 0.0                |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-dns     | SYNCHRONOUS_DNS                               | 0      | 0      | SKIPPED | 0.0                |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-dns     | SYNCHRONOUS_DNS_CACHE                         | 0      | 0      | ERROR   | 0.0                |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-dns     | SYNCHRONOUS_DNS_INVALID                       | 0      | 0      | SKIPPED | 0.0                |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-dns     | SYNCHRONOUS_DNS_MULTIPLE                      | 0      | 0      | SKIPPED | 0.0                |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-dns     | SYNCHRONOUS_DNS_MULTI_IP                      | 0      | 0      | SKIPPED | 0.0                |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-tcp     | TCPSOCKET_BIND_ADDRESS                        | 0      | 0      | SKIPPED | 0.0                |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-tcp     | TCPSOCKET_BIND_ADDRESS_INVALID                | 0      | 0      | SKIPPED | 0.0                |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-tcp     | TCPSOCKET_BIND_PORT                           | 0      | 0      | SKIPPED | 0.0                |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-tcp     | TCPSOCKET_BIND_PORT_FAIL                      | 0      | 0      | SKIPPED | 0.0                |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-tcp     | TCPSOCKET_BIND_UNOPENED                       | 0      | 0      | SKIPPED | 0.0                |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-tcp     | TCPSOCKET_BIND_WRONG_TYPE                     | 0      | 0      | SKIPPED | 0.0                |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-tcp     | TCPSOCKET_CONNECT_INVALID                     | 0      | 0      | SKIPPED | 0.0                |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-tcp     | TCPSOCKET_ECHOTEST                            | 0      | 0      | ERROR   | 0.0                |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-tcp     | TCPSOCKET_ECHOTEST_BURST                      | 0      | 0      | SKIPPED | 0.0                |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-tcp     | TCPSOCKET_ECHOTEST_BURST_NONBLOCK             | 0      | 0      | SKIPPED | 0.0                |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-tcp     | TCPSOCKET_ECHOTEST_NONBLOCK                   | 0      | 0      | SKIPPED | 0.0                |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-tcp     | TCPSOCKET_ENDPOINT_CLOSE                      | 0      | 0      | SKIPPED | 0.0                |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-tcp     | TCPSOCKET_OPEN_CLOSE_REPEAT                   | 0      | 0      | SKIPPED | 0.0                |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-tcp     | TCPSOCKET_OPEN_DESTRUCT                       | 0      | 0      | SKIPPED | 0.0                |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-tcp     | TCPSOCKET_OPEN_LIMIT                          | 1      | 0      | OK      | 0.0                |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-tcp     | TCPSOCKET_OPEN_TWICE                          | 0      | 0      | SKIPPED | 0.0                |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-tcp     | TCPSOCKET_RECV_100K                           | 0      | 0      | SKIPPED | 0.0                |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-tcp     | TCPSOCKET_RECV_100K_NONBLOCK                  | 0      | 0      | SKIPPED | 0.0                |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-tcp     | TCPSOCKET_RECV_TIMEOUT                        | 0      | 0      | SKIPPED | 0.0                |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-tcp     | TCPSOCKET_SEND_REPEAT                         | 0      | 0      | SKIPPED | 0.0                |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-tcp     | TCPSOCKET_SEND_TIMEOUT                        | 0      | 0      | SKIPPED | 0.0                |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-tcp     | TCPSOCKET_SETSOCKOPT_KEEPALIVE_VALID          | 0      | 0      | SKIPPED | 0.0                |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-tcp     | TCPSOCKET_THREAD_PER_SOCKET_SAFETY            | 0      | 0      | SKIPPED | 0.0                |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-tls     | TLSSOCKET_CONNECT_INVALID                     | 1      | 0      | OK      | 18.26              |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-tls     | TLSSOCKET_ECHOTEST                            | 0      | 1      | FAIL    | 300.37             |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-tls     | TLSSOCKET_ECHOTEST_BURST                      | 0      | 1      | FAIL    | 100.0              |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-tls     | TLSSOCKET_ECHOTEST_BURST_NONBLOCK             | 0      | 0      | ERROR   | 0.0                |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-tls     | TLSSOCKET_ECHOTEST_NONBLOCK                   | 0      | 1      | FAIL    | 99.99              |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-tls     | TLSSOCKET_ENDPOINT_CLOSE                      | 0      | 0      | SKIPPED | 0.0                |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-tls     | TLSSOCKET_HANDSHAKE_INVALID                   | 0      | 0      | SKIPPED | 0.0                |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-tls     | TLSSOCKET_NO_CERT                             | 0      | 0      | SKIPPED | 0.0                |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-tls     | TLSSOCKET_OPEN_DESTRUCT                       | 0      | 0      | SKIPPED | 0.0                |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-tls     | TLSSOCKET_OPEN_LIMIT                          | 0      | 0      | SKIPPED | 0.0                |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-tls     | TLSSOCKET_OPEN_TWICE                          | 0      | 0      | SKIPPED | 0.0                |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-tls     | TLSSOCKET_RECV_TIMEOUT                        | 0      | 0      | SKIPPED | 0.0                |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-tls     | TLSSOCKET_SEND_CLOSED                         | 0      | 0      | SKIPPED | 0.0                |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-tls     | TLSSOCKET_SEND_REPEAT                         | 0      | 0      | SKIPPED | 0.0                |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-tls     | TLSSOCKET_SEND_TIMEOUT                        | 0      | 0      | SKIPPED | 0.0                |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-tls     | TLSSOCKET_SEND_UNCONNECTED                    | 0      | 0      | SKIPPED | 0.0                |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-udp     | UDPSOCKET_BIND_ADDRESS                        | 1      | 0      | OK      | 0.01               |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-udp     | UDPSOCKET_BIND_ADDRESS_INVALID                | 1      | 0      | OK      | 0.01               |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-udp     | UDPSOCKET_BIND_PORT                           | 1      | 0      | OK      | 0.0                |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-udp     | UDPSOCKET_BIND_PORT_FAIL                      | 1      | 0      | OK      | 0.0                |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-udp     | UDPSOCKET_BIND_UNOPENED                       | 1      | 0      | OK      | 0.0                |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-udp     | UDPSOCKET_BIND_WRONG_TYPE                     | 1      | 0      | OK      | 0.0                |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-udp     | UDPSOCKET_ECHOTEST                            | 0      | 0      | ERROR   | 0.0                |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-udp     | UDPSOCKET_ECHOTEST_BURST                      | 0      | 0      | SKIPPED | 0.0                |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-udp     | UDPSOCKET_ECHOTEST_BURST_NONBLOCK             | 0      | 102    | FAIL    | 200.29             |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-udp     | UDPSOCKET_ECHOTEST_CONNECT_SEND_RECV          | 0      | 0      | SKIPPED | 0.0                |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-udp     | UDPSOCKET_ECHOTEST_NONBLOCK                   | 0      | 1      | FAIL    | 595.27             |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-udp     | UDPSOCKET_ECHOTEST_NONBLOCK_CONNECT_SEND_RECV | 0      | 22     | FAIL    | 100.08             |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-udp     | UDPSOCKET_OPEN_CLOSE_REPEAT                   | 1      | 0      | OK      | 0.0                |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-udp     | UDPSOCKET_OPEN_DESTRUCT                       | 1      | 0      | OK      | 0.01               |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-udp     | UDPSOCKET_OPEN_LIMIT                          | 1      | 0      | OK      | 0.01               |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-udp     | UDPSOCKET_OPEN_TWICE                          | 1      | 0      | OK      | 0.01               |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-udp     | UDPSOCKET_RECV_TIMEOUT                        | 1      | 0      | OK      | 10.27              |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-udp     | UDPSOCKET_SENDTO_REPEAT                       | 0      | 101    | FAIL    | 100.28             |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-netsocket-udp     | UDPSOCKET_SENDTO_TIMEOUT                      | 1      | 0      | OK      | 0.0                |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-network-interface | NETWORKINTERFACE_CONN_DISC_REPEAT             | 1      | 0      | OK      | 4.97               |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-network-interface | NETWORKINTERFACE_STATUS                       | 1      | 0      | OK      | 36.02              |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-network-interface | NETWORKINTERFACE_STATUS_GET                   | 1      | 0      | OK      | 4.98               |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-network-interface | NETWORKINTERFACE_STATUS_NONBLOCK              | 1      | 0      | OK      | 4.99               |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-network-l3ip      | L3IP_START                                    | 1      | 0      | OK      | 0.01               |
| K64F-GCC_ARM | K64F          | mbed-os-connectivity-netsocket-tests-tests-network-l3ip      | L3IP_STOP                                     | 1      | 0      | OK      | 0.01               |
mbedgt: test case results: 23 OK / 46 SKIPPED / 9 FAIL / 4 ERROR

Hello David,

Thank you for running all these tests. However I’m just a hobbyist and have no idea how to use them to improve the ENC28J60-EMAC driver. So far I had success to use the driver for building a TCP (HTTP) server, TCP (MQTT) client, UDP server and a UDP client. However, the UDP client cannot receive data from an official NTP server but only from a “local” UDP server.

Ok, don’t worry. Thank you by your work. If I have time I can take a look to the implementation and try to make it pass the tests.

Hello Hudakz!
I managed to run your new emac driver in platformio but still have some confusion…
maybe you know why UDP messages can be sent this way?

the screenshot shows UDP messages on the receiving side of the connection, but for some reason, what I send via UDPsocket is sent only the first time, as UDP, and then as some unnamed packet.

I also noticed a strange behavior that if you remove printf from the code below, then no UDP is sent at all.

 char sbuffer[] = "test!!";
 int scount = socketTransceive.send((uint8_t *)sbuffer, sizeof sbuffer);
 printf("sent %d [%.*s]\n", scount, strstr(sbuffer, "\r\n") - sbuffer, sbuffer);

maybe you know what could be the problem? maybe you can give me some documentation about porting EMAC? thank you in advance for your time

Sorry, but I don’t know what’s wrong. You can find the porting guide here.