OpenSprinkler Forums OpenSprinkler Unified Firmware ipv6 for OSPi appears to be required

Tagged: 

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #51392

    tomnykds
    Participant

    To add to the threads about ipv6 requirements, I just set up a new RPi with latest raspbian, installed OpenSprinkler and was able to bring it up and fiddle around. I spent some more time cleaning up the RPi install, setting IP address, disabling ipv6, etc. because I “know” I don’t need it, and a few other things. Low and behold, I can’t start OS anymore, it fails with:
    pi@pi2b:~/OpenSprinklerGen2 $ sudo ./OpenSprinkler
    /home/pi/OpenSprinklerGen2/
    can’t create shell listen socket
    network failed.
    I found this in etherport.cpp (same message):
    if ((m_sock = socket(PF_INET6, SOCK_STREAM, 0)) < 0) {
    DEBUG_PRINTLN(“can’t create shell listen socket”);
    return false;
    Once I re-enabled ipv6 in /boot/cmdline.txt and rebooted, then OS would start and I could talk to it over the web.
    What’s truely odd, is that netstat reports the process listening on tcp6 with an ipv4 address (more not listed):
    pi@pi2b:~/OpenSprinklerGen2 $ netstat -an |& grep 8080
    tcp6 0 0 :::8080 :::* LISTEN
    tcp6 0 0 192.168.0.69:8080 192.168.0.183:49292 TIME_WAIT
    tcp6 0 0 192.168.0.69:8080 192.168.0.183:49289 TIME_WAIT

    In any case, at least on an RPi, ipv6 is “required” to get the software to run, whether or not
    it’s actually being used properly.

    Chris

    #51456

    Ray
    Keymaster

    The firmware has dual support for ipv4 and ipv6. There is no need to disable ipv6. You can still use ipv4 since it has dual support.

    #51458

    tomnykds
    Participant

    The issue appears to be that you can’t disable ipv6, even if you don’t need it, because
    of how the one piece of code is written. The web interface messes up the formatting, but
    the error message matches the code block in the original note, and it only occurs here:

    pi@pi2b:~/OpenSprinklerGen2 $ grep -B3 -A1 -n ‘create shell listen socket’ *
    etherport.cpp-57-
    etherport.cpp-58- if ((m_sock = socket(PF_INET6, SOCK_STREAM, 0)) < 0)
    etherport.cpp-59- {
    etherport.cpp:60: DEBUG_PRINTLN(“can’t create shell listen socket”);
    etherport.cpp-61- return false;

    Chris

    #51468

    Ray
    Keymaster

    Is there any particular reason you want to disable IPv6 in your Linux system?

    #51473

    tomnykds
    Participant

    Other than I have no real ipv6 traffic, it’s just to avoid loading something that doesn’t get used.
    At least in terms of the documentation, a mention of the requirement would be nice.
    There are a couple related threads from earlier. Anyhow, I’ll let this go for now as the
    software works with ipv6 enabled.
    Thx, Chris

    #51486

    dman776
    Participant

    [upgraded Raspbian]

    #51514

    Ray
    Keymaster

    In the next version we will probably add some additional code so that if it can’t bind ipv6 it will go back to ipv4 only. Initially the ipv6 feature was added due to a pull request:
    https://github.com/OpenSprinkler/OpenSprinkler-Firmware/pull/49
    and those who had trouble with it are generally due to using a very old version of Raspbian that doesn’t support ipv6. The solution is to either upgrade Raspbian or roll back to an earlier version of firmware. Upgrading Raspbian is a better solution since the future firmwares may rely on other features that are not available in older Raspbians.

    #68773

    Wolf
    Participant

    This bit me too.

    In my environment, I’ve forcefully removed ipv6. (necessary for reasons, vpn + mtu problems, DNS woes, long story.)

    if ip6 is disabled, Opensprinkler (latest) will RUN, but won’t bind to a port. This was NOT obvious, as there’s no log emissions about problems.

    I’d really like to encourage the team to allow ospi to behave as expected if ip6 is not enabled/present, rather than silently failing to function.

    … Don’t get me wrong. I’m *VERY* thankful for OsPi’s existence. It’s really cool. AND, this is a bug, not a feature 🙂

    Thanks!

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.

OpenSprinkler Forums OpenSprinkler Unified Firmware ipv6 for OSPi appears to be required