Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

Capture UDP Traffic

2016-01-05
2019-02-19
  • miquel.rubioc - 2016-01-05

    Hi guys,

    I'm trying to find the way to build a sniffer on a Raspberry to read state (capture traffic from) of ARTNET-DMX devices, but i have no way to do it..
    Normally ARTNET devices send broadcast UDP to lan on a specific port - 6454 - but after some test with UDP programs i was unable to get it.

    Has anyone dealt with a problem like this?

    Thanks for your help !!

    Mqiuel

     
  • eschwellinger

    eschwellinger - 2016-01-05

    Hi Miquel,

    maybe my example which I've sent from support department... was not clear enough,
    attached a modfied example.
    Raspberry Pi is the UPD receiver which receive the udp telegrams on port 6454.
    Control Win (this is your local plc which runs on your CODESYS pc) send to port 6454.

    Next step is to remove Control Win plc from the Project and modify the pi application to your needs.

    BR
    Edwin

    IMG: wireshark.jpg

    IMG: UDPReceiverPi.jpg

    NBS_UDP_Receiver_RaspberryPi.project [102.82 KiB]

     
  • miquel.rubioc - 2016-01-11

    Hello Edwin,

    Thanks for your reply..

    I have checked your code, and it seems to work, but not always.. Most of times, Peer it doesn't initialize properly, it remains to FALSE. Connection to target is ok, no errors, there is traffic on 6454 port (i have a traffic artnet generator software), but socket is not open on Raspberry..

    I have review all options, but i have no found any clue..

    IMG: 2016

     
  • eschwellinger

    eschwellinger - 2016-01-11

    Hi Miquel,

    after rechecked this.. in my case it does work always, never seen a false on Peer init.

    How could we proceed?
    Is there any other program which uses the port on the pi.
    Is it possible to send me your artnet generator Software to check?

    BR
    Edwin

     
  • miquel.rubioc - 2016-01-27

    Hi Edwin,

    I have been 'fighting' in my scenario... I have no found any reason to explain this issue. Sometimes it works, and suddenly it stops, and there is no peer !!

    1. I have a raspberry running with app that you send me.
    2. There is an app (Qlcplus on same Raspberry) that send traffic DMX to an ARTNET (ip) device on same subnet, port 6454.

    I have try to generate DMX on other pc (stopping Qlcplus on Raspberry), and get traffic with your app, but also is no peer !!

    Thanks for your support..

    Regards,

    Miquel

     
  • eschwellinger

    eschwellinger - 2016-01-27

    Hi Miquel,

    if you give me some details on what I need to call/install for Qlcplus on Raspberry Pi
    I would try to investigate the reason..
    BR
    Edwin

     
  • miquel.rubioc - 2016-02-03

    Hi Edwin,

    After some tests, i have found the problem - not the solution - .. When OLA service (https://www.openlighting.org/ola/) is running and setup as a ARTNET node for output DMX streams, the codesys code for decoding UDP data, stucks, no Peer is established..

    If the OLA service is running in other raspberry different thant codesys is running, then UDP decode program works.. It seems _ service block connections on 6454 port (as we can see on snapshot)

    Thanks for your support Edwin.

    IMG: olad.png

     
  • jeremyshubert - 2017-03-29

    How can I add the data type UDPData to my project? I can't seem to find this "Structured Type" in any library.

     
  • mlyles00 - 2019-02-15

    Hello Edwin. Can you adjust your project above to enable Multicast instead of Unicast? I would like to have the sender data received by multiple receivers in a Multicast group. I've tried manipulating the .ipMultiCast and the .ipAddr but have not had any luck.

    Regards,
    Matt

     
  • e.kislov - 2019-02-16

    mhlyles1 hat geschrieben:
    Hello Edwin. Can you adjust your project above to enable Multicast instead of Unicast? I would like to have the sender data received by multiple receivers in a Multicast group. I've tried manipulating the .ipMultiCast and the .ipAddr but have not had any luck.
    Regards,
    Matt

    It should works only since CODESYS V3.5 SP13.

     
  • mlyles00 - 2019-02-18

    e.kislov hat geschrieben:
    It should works only since CODESYS V3.5 SP13.

    So, Multicast is not functional in SP12?

     
  • e.kislov - 2019-02-19

    Just as says:

    IMG: 19

     

Log in to post a comment.