HTTP Request Raspberry

PAFL
2020-11-18
2020-11-20
  • PAFL - 2020-11-18

    Hey,
    I want to implement a function to post or get some data to a server and found the example in following link.
    https://store.codesys.com/http-client-example.html?___store=en
    Unfortunately it does not work...

    I am developing with codesys control 3.5.16.1 on a raspberry pi.
    The example looks easy, but when I test it with e.g. https://httpbin.org/anything the status change to Error after timeout. I also donΒ΄t get a error-number.

    When I test a curl / wget vie putty on raspi, it works fine. So the connection should be OK.
    Does anyone have an idea why it is not working in codesys? Is there some additional configuration a have to make (e.g. in CODESYSControl.cfg)?

    Thanks a lot, Patrick

     
  • PAFL - 2020-11-18

    Thank you, that explains a lot! :-)

     
  • PAFL - 2020-11-20

    Hey,
    I tried the Web Client SL too and it still does not work on a Raspberry Pi. I am testing in Demo-Mode, where the first 30min it should be possible to use the lib.
    I donΒ΄t even get any error message and canΒ΄t figure out how to get more detailed informations where the problem might be. The status change to Error after timeout. on linux termial it works with curl or wget...
    Is there maybe some configuration to change in CODESYSControl.cfg? Any Ideas/Tipps?

    Thanks, Patrick

     
  • i-campbell

    i-campbell - 2020-11-20

    Try using PLC Shell to cert-gendhparams

     
  • PAFL - 2020-11-20

    Thanks! Generation of parameter started...

    But in the meantime I found a warning in the Log Menu. Somehow this is not shown in /tmp/codesyscontrol.log.
    The warning is pushed, as soon as I activate the request:
    "SetOption unable to set SOCKET_SO_REUSEPORT."

    I already use port 8080 for webvisualization. Maybe it is because of that?

    Patrick

     

Log in to post a comment.