Comments (6)
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.
Like this?
Udp.beginPacket(Udp.remoteIP(), 6454); //Udp.remotePort()
Serial.println(ReplyBuffer);
Udp.write(ReplyBuffer);
Udp.endPacket();
Same behaviour.
from ethernetenc.
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.
#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.
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.
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)
- Sending UDP message Error HOT 7
- [FR] Project Examples for PlatformIO Registry HOT 1
- not pingable after a while HOT 12
- conflict with webthing HOT 1
- Usage with earlephilhower / arduino-pico
- Use pico-w with EthernetENC and WiFi problem HOT 1
- can esp32-s2 use this library ? HOT 1
- Can I integrate this lib. with esp32 HTTPClient? HOT 1
- Request setting custom hostName HOT 1
- STM32F103C8 After Inactive Connection.
- trying to send broadcast SSDP message HOT 2
- Problem by traffic through switches HOT 3
- Ping command with ENC28J60 + D1 mini Wemos ESP8266 HOT 3
- no function `ethernet.MACAddress()` to drop-in replace ethernet.h HOT 2
- Port Reuse on TCP Connections HOT 2
- UDP totally broken with Arduino Nano HOT 8
- Teensy 4.1 connection issues HOT 4
- client.stop() not sending FIN packet to peer device? HOT 1
- ENC28J60 with Esp32 HTTP request
- Creating a PING request using EthernetENC
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ethernetenc.