Git Product home page Git Product logo

Comments (6)

JAndrassy avatar JAndrassy commented on August 31, 2024

does the other side send on the same port as it expects the response? try to send the replay to constant port number instead of Udp.remotePort()

from ethernetenc.

niallfleming avatar niallfleming commented on August 31, 2024

Like this?

    Udp.beginPacket(Udp.remoteIP(), 6454); //Udp.remotePort()
    Serial.println(ReplyBuffer);
    Udp.write(ReplyBuffer);
    Udp.endPacket();

Same behaviour.

from ethernetenc.

niallfleming avatar niallfleming commented on August 31, 2024

OK so it was related to line endings in the library. Once I had eradicated all the ^M dos line endings it seems to work with the original code.

Can you say why I don't see any serial console prints from the library - I defined

#define UIPETHERNET_DEBUG_UDP 1

prior to including EthernetENC and so on?

from ethernetenc.

JAndrassy avatar JAndrassy commented on August 31, 2024

#include is replaced with the content of the included file so the define doesn't apply to other occurrences of including the same .h

from ethernetenc.

niallfleming avatar niallfleming commented on August 31, 2024

Oh I see. Thanks.

So I've got further, I want it to listen on the broadcast (network address) as well as it's own IP, it does respond on unicast, but that's not what I need in this situation. I see that you're limiting broadcast to ARP in Enc28J60Network.cpp

  // For broadcast packets we allow only ARP packtets
  // All other packets should be unicast only for our mac (MAADR)

Is there a way to override this behaviour? I presume that there is too much broadcast traffic so it was limited for this reason? -- ArtNet packets are defined here: https://art-net.org.uk/how-it-works/streaming-packets/artdmx-packet-definition/

Here's a trace of the packet emitted from the controller (Mac) to the broadcast address:

    192.168.0.104.6454 > 192.168.0.255.6454: [udp sum ok] UDP, length 530
	0x0000:  4500 022e 6204 0000 4011 9403 c0a8 0068  [email protected]
	0x0010:  c0a8 00ff 1936 1936 021a 9d31 4172 742d  .....6.6...1Art-
	0x0020:  4e65 7400 0050 000e 3000 0000 0200 ffff  Net..P..0.......
	0x0030:  ffff ffff ffff ffff ffff ffff ff00 0000  ................
	0x0040:  0000 0000 0000 0000 0000 0000 0000 0000  ................
	0x0050:  0000 0000 0000 0000 0000 0000 0000 0000  ................
	0x0060:  0000 0000 0000 0000 0000 0000 0000 0000  ................
	0x0070:  0000 0000 0000 0000 0000 0000 0000 0000  ................
	0x0080:  0000 0000 0000 0000 0000 0000 0000 0000  ................

from ethernetenc.

JAndrassy avatar JAndrassy commented on August 31, 2024

size of the receive buffer is only 2 kB. to process broadcast every broadcast packet must be stored to receive buffer and then handled by the library. the library handles the packets by default every 100 milliseconds (only if some library function is called).

you can enable receiving of broadcast packages in Enc28J60Network.cpp

writeReg(ERXFCON, ERXFCON_UCEN|ERXFCON_CRCEN|ERXFCON_PMEN|ERXFCON_BCEN);

from ethernetenc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.