Errors compiling EthernetGateway with <UIPEternet.h>



  • I try to convert from my serial gateway to a ethernet gateway.
    I have downloaded the latest Lirary, tried booth the master and development ones.

    I get errors when compiling with <UIPEthernet.h>
    It works fine compiling with <Ethernet.h>
    I use the ENC28J60 shield.

    I get the following messages when compiling.

    In file included from C:\Users\Kpeson\Documents\Arduino Mysensor Master 140911\libraries\UIPEthernet/Dhcp.h:7,
    from C:\Users\Kpeson\Documents\Arduino Mysensor Master 140911\libraries\UIPEthernet/UIPEthernet.h:25,
    from EthernetGateway.ino:53:
    C:\Users\Kpeson\Documents\Arduino Mysensor Master 140911\libraries\UIPEthernet/UIPUdp.h:26:29: error: utility/mempool.h: No such file or directory
    C:\Users\Kpeson\Documents\Arduino Mysensor Master 140911\libraries\UIPEthernet/UIPUdp.h:28:28: error: utility/uip.h: No such file or directory
    In file included from EthernetGateway.ino:53:
    C:\Users\Kpeson\Documents\Arduino Mysensor Master 140911\libraries\UIPEthernet/UIPEthernet.h:27:37: error: utility/Enc28J60Network.h: No such file or directory
    C:\Users\Kpeson\Documents\Arduino Mysensor Master 140911\libraries\UIPEthernet/UIPEthernet.h:34:31: error: utility/uip_timer.h: No such file or directory
    In file included from C:\Users\Kpeson\Documents\Arduino Mysensor Master 140911\libraries\UIPEthernet/Dhcp.h:7,
    from C:\Users\Kpeson\Documents\Arduino Mysensor Master 140911\libraries\UIPEthernet/UIPEthernet.h:25,
    from EthernetGateway.ino:53:
    C:\Users\Kpeson\Documents\Arduino Mysensor Master 140911\libraries\UIPEthernet/UIPUdp.h:46: error: 'memaddress' does not name a type
    C:\Users\Kpeson\Documents\Arduino Mysensor Master 140911\libraries\UIPEthernet/UIPUdp.h:47: error: 'memhandle' does not name a type
    C:\Users\Kpeson\Documents\Arduino Mysensor Master 140911\libraries\UIPEthernet/UIPUdp.h:48: error: 'memhandle' does not name a type
    C:\Users\Kpeson\Documents\Arduino Mysensor Master 140911\libraries\UIPEthernet/UIPUdp.h:49: error: 'memhandle' does not name a type
    In file included from C:\Users\Kpeson\Documents\Arduino Mysensor Master 140911\libraries\UIPEthernet/UIPEthernet.h:28,
    from EthernetGateway.ino:53:
    C:\Users\Kpeson\Documents\Arduino Mysensor Master 140911\libraries\UIPEthernet/UIPClient.h:48: error: 'memhandle' does not name a type
    C:\Users\Kpeson\Documents\Arduino Mysensor Master 140911\libraries\UIPEthernet/UIPClient.h:54: error: 'memhandle' does not name a type
    C:\Users\Kpeson\Documents\Arduino Mysensor Master 140911\libraries\UIPEthernet/UIPClient.h:55: error: 'memhandle' does not name a type
    C:\Users\Kpeson\Documents\Arduino Mysensor Master 140911\libraries\UIPEthernet/UIPClient.h:56: error: 'memaddress' does not name a type
    C:\Users\Kpeson\Documents\Arduino Mysensor Master 140911\libraries\UIPEthernet/UIPClient.h:85: error: 'UIP_CONNS' was not declared in this scope
    C:\Users\Kpeson\Documents\Arduino Mysensor Master 140911\libraries\UIPEthernet/UIPClient.h:92: error: ISO C++ forbids declaration of 'memhandle' with no type
    C:\Users\Kpeson\Documents\Arduino Mysensor Master 140911\libraries\UIPEthernet/UIPClient.h:92: error: expected ';' before '*' token
    C:\Users\Kpeson\Documents\Arduino Mysensor Master 140911\libraries\UIPEthernet/UIPClient.h:93: error: 'memhandle' has not been declared
    C:\Users\Kpeson\Documents\Arduino Mysensor Master 140911\libraries\UIPEthernet/UIPClient.h:94: error: 'memhandle' has not been declared
    In file included from EthernetGateway.ino:53:
    C:\Users\Kpeson\Documents\Arduino Mysensor Master 140911\libraries\UIPEthernet/UIPEthernet.h:88: error: field 'periodic_timer' has incomplete type
    C:\Users\Kpeson\Documents\Arduino Mysensor Master 140911\libraries\UIPEthernet/UIPEthernet.h:90: error: 'memhandle' does not name a type
    C:\Users\Kpeson\Documents\Arduino Mysensor Master 140911\libraries\UIPEthernet/UIPEthernet.h:91: error: 'memhandle' does not name a type
    C:\Users\Kpeson\Documents\Arduino Mysensor Master 140911\libraries\UIPEthernet/UIPEthernet.h:95: error: 'Enc28J60Network' does not name a type


  • Admin

    @kpeson

    Compile using Arduino IDE 1.5.7. Turn of debug.

    Did some tests the other day using the ENC-module. But my gateway was VERY unstable (guess because of the low memory). I decided to remove the ENC-model from the recommended hardware on www.mysensors.org. I would really urge you to consider getting a W5100 shield or module to free up memory and MCU resources.



  • @hek

    Thanx Hek.
    I will order a W5100 today.
    I did turn of debug, but i don´t know if i use 1.5.7
    I have no problem compiling the <Ethernet.h>, so i go that way..


  • Hardware Contributor

    I had the same problem compiling with enc28J60 and lib 1.4.
    I solved it by download the latest version of UIPEthernet from github.



  • Will try that.Sounds like a solution.



  • I had the same problem and solved it by replacing the contents of your UIPEthernet library folder with this:
    https://github.com/ntruchsess/arduino_uip



  • FWIW, Replacing the UIPE library with the current version from github and using the current 1.5.7b IDE seems to be working fine for me here.

    You will have to edit UIPEthernet/utility/uipethernet-conf.h and change #define UIP_CONF_UDP to be 0 (line 9), or it will not fit in the available memory.

    Also remember you will have to restart the IDE after changing the libraries.

    I have not had it running very long, but have blasted loads of commands through it and it seems to be stable so far, using it with a current nano and the NRF24L01+PA+LNA radio, powered via USB.


  • Admin

    Thanks for verifying @soward.

    I'll update the supplied UIP library.


  • Plugin Developer

    Just to let you know, I've released UIPEthernet Version 1.09 / 1.59: https://github.com/ntruchsess/arduino_uip/releases. This release contains both a fix for a condition that caused the ENC28J60 chip to freeze and an improvement that reduces timer-induced latency from 250ms to 10ms aprox.

    Another hint when compiling Ethernet-gateway with UIPEthernet:

    Set UIP_CONF_UDP 0 greatly reduces flash memory footprint by not including UDP-code (has been mentioned in this thread before)

    Reduce UIP_CONF_MAX_CONNECTIONS will lower RAM-usage. As Ethernet-Gateway works as Server with only a single Client that stays connected to the gateway configuring a value of 1 should work fine.

    • Norbert

  • Admin

    Welcome @ntruchsess,
    great to see you here and the effort you've put into the UIPLibrary.

    Thanks for the hints!

    I'll update the bundled UIP-library ASAP.


  • Admin

    @ntruchsess said:

    https://github.com/ntruchsess/arduino_uip/releases

    BTW.... is there any way to have a combined version for both the 1.0 and 1.5 version of the IDE. People tends to get confused about this.


  • Plugin Developer

    As long you intent to support both 1.0 and 1.5 IDE you should stay with UIPEthernet 1.0.9 as latest 1.5.x IDE fully supports 1.0 library format. 1.59 is suitable if you intent to compile for Arduino DUE (or YUN but that is another story unrelated to UIPEthernet).

    If you have any suggestions how this could be improved please let me know. I'm not very happy with this situation either. Eventually Arduino 1.5.x will overcome beta phase so 1.0.x IDE will become deprecated, but for now it seems we have to live with it.

    BTW: I've written a MySensors-module for FHEM: http://forum.fhem.de/index.php/topic,26807.msg210234.html#msg210234


  • Admin

    Ok, I'll switch back to the 1.0.9 version then.

    BTW: I've written a MySensors-module for FHEM

    Ohh.. sweet! I would be happy adding a page on www.mysensors.org when you and @hexenmeister feel ready.



  • The FHEM module by @ntruchsess works well.
    Tested with humidity- and relay sketch (with serial gateway). I'm still testing. 😉


  • Admin

    Sounds great!

    Could perhaps you provide a few screenshots and FHEM key features by email to me?

    You can use one of the other pages as a template. E.g. http://www.mysensors.org/build/pidome


Log in to reply
 

Suggested Topics

  • 33
  • 5
  • 3
  • 6
  • 8
  • 17

0
Online

11.2k
Users

11.1k
Topics

112.5k
Posts