nRF9160 Ethernet and LTE both available but cannot open sockets under Ethernet

I've got an nRF 9160-dk board I have been able to connect over the LTE using TLS to my own data repository site and to google.com and example.com

What I've not been able to do is get a connection over the Ethernet to anything.

So far I've tried:

  • using CONFIG_NET_SOCKETS_OFFLOAD=n which results in me getting EPROTOTYPE (-107) when trying to open the socket
  • enabling CONFIG_MBEDTLS=y and CONFIG_MBEDTLS_TLS_LIBRARY=y this did not change anything
  • Setting CONFIG_DNS_RESOLVER=y and CONFIG_DNS_SERVER1="1.1.1.1"
  • I've also tried connection without TLS

Additional notes;

I have verified that I can run the DHCPv4 client code and get an address and the gateway route. I'm also able to use getaddrinfo to get the DNS address of my site with CONFIG_NET_SOCKETS_OFFLOAD=n set.

Development Setup

OS: Ubuntu 22.04 LTS

SW:

  • Visual Studio Code
    • Version: 1.75.1
    • Commit: 441438abd1ac652551dbe4d408dfcec8a499b8bf
    • Date: 2023-02-08T21:35:30.018Z
    • Electron: 19.1.9
    • Chromium: 102.0.5005.194
    • Node.js: 16.14.2
    • V8: 10.2.154.23-electron.0
    • OS: Linux x64 6.1.10-x64v1-xanmod1
    • Sandboxed: No
  • JLink (V758b X86_64 Linux)

HW:

  • Hi,

    Could you provide more information about your setup?

    Could you elaborate on what you try to achieve? 

    Best regards,
    Dejan

  • I'm trying to make it where we can use Ethernet or LTE-M to upload data over https. I've taken a snapshot of the code and put it on Github: https://github.com/zeitue/lte-and-ethernet

  • Hi,

    Could you show your setup? How are your devices connected?

    What I've not been able to do is get a connection over the Ethernet to anything.

    What have you tested? What are the results? 

    which results in me getting EPROTOTYPE (-107)

    Could you show the full application log which contains this error?

    Best regards,
    Dejan 

  • I seem to have broken my code more when I was trying to get this information, I'll reply once I get the new issues resolved.

  • Hi,

    OK. You can get back when your other code issues get resolved.

    Best regards, 
    Dejan

1 2