Comments (9)
Committed, thanks.
from ethercard.
Hi there!
First post so: thanks a lot for the work, I'm using this lib for a while now! Best one IMO :-)
I was actually using the following hack to cope with this issue, because I want to send the packets to the network broadcast IP, not full broadcast (i.e. 192.168.1.255) :
if ((dip[0] & 0xF0) == 0xE0 || dip[3] == 0xFF)
Thanks!
R.
from ethercard.
Indeed, works as well. But I thought the partial broadcast was not
working on the card, only the full one?
Le 01/11/2012 20:54, RaphYot a écrit :
Hi there!
First post so: thanks a lot for the work, I'm using this lib for a
while now! Best one IMO :-)I was actually using the following hack to cope with this issue,
because I want to send the packets to the network broadcast IP, not
full broadcast (i.e. 192.168.1.255) :if ((dip[0] & 0xF0) == 0xE0 || dip[3] == 0xFF)
Thanks!
R.—
Reply to this email directly or view it on GitHub
#59 (comment).
from ethercard.
You are welcome.
Le 01/11/2012 10:19, Jean-Claude Wippler a écrit :
Committed, thanks.
—
Reply to this email directly or view it on GitHub
#59 (comment).
from ethercard.
I can send broadcast packet that way without issue. The only problem I see is that it's just a partial solution as without the mask you don't know the real broadcast address.
What kind of issue do you mean? With the new lib it seems I'm not receiving my network broadcast anymore on the arduino (although I enabled broadcast), but it was working on an older project so I suppose this should be feasible.
from ethercard.
I'd be happy to change it to a single-byte check, and just make 255.255.255.0 the default netmask that way. Ought to work for msot cases.
from ethercard.
I am having problem with sendUdp() and I traced the problem to this line
if ((dip[0] & 0xF0) == 0xE0 || ((long) dip) == 0xFFFFFFFF)
EtherCard::copyMac(gPB + ETH_DST_MAC, allOnes);
After commenting out this line, and sendUdp() works nicely. With this line, the sending would fail. The problem is reported in the following post by others as well...
http://jeelabs.net/boards/7/topics/1179
Does anyone know what the problem is?
from ethercard.
I'm try use sendTcp() and doesn't work, but if comment the line proposed for shagru, then works OK.
Thanks for your trick, but why is not change in the library?
from ethercard.
The problem @shagru has might be related to the multicast check (I don't know) but @jnogues makes no sense, those lines are unrelated to sendTcp()
I also have the problem that UDP broadcast has a mac of 0x00000000, and the proposed fix doesn't work for me because I do
ether.sendUdp((char*) buf, pos, srcport, ether.broadcastip, dstport);
Would the fix be more correct if the check was for ether.broadcastip?
if ((dip[0] & 0xF0) == 0xE0 || *((unsigned long*) dip) == 0xFFFFFFFF
|| (memcmp(dip, EtherCard::broadcastip, 4) == 0)) //not subnet broadcast
EtherCard::copyMac(gPB + ETH_DST_MAC, allOnes);
?
from ethercard.
Related Issues (20)
- Several typos in README.md
- ATMega1284p not working HOT 1
- esp8266 HOT 1
- FINE ADJUSTMENTS
- Example ether.browseUrl(PSTR("/foo/"), "bar", website, my_callback); not working HOT 6
- UDP Multicast MAC not correct? HOT 5
- facing problem while using with SD card
- Concurrent requests possible?
- Custom host name while setting Static IP HOT 1
- Multicast listening HOT 1
- Rename 'master' branch to 'main'
- Reading response only 512 bytes chunk of tcpsend
- Hide response header from HTTP response
- Is there any way to use other serial port for ether.printIp()?
- UDP packet is not sent - NOT STATIC IP HOT 1
- Incorrect session id returned
- DHCP client + browse url with specific port HOT 1
- Wrong Ethernet II destination MAC address. HOT 6
- Error initializing library on Arduino Nano HOT 5
- How to handle multiple sessions?
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 ethercard.