Closed benkuper closed 7 years ago
Hi Ben,
Could you try to compile with either Arduino 1.6.3 or 1.6.6 ? 1.6.4 had some issues and stalled compilations for some people was amongs those.
Also, I hope you are aware that you need to make slight modifications to the EthernetUDP.cpp and EthernetUDP.h files of the current Ethernet library. If you're not aware of it, please let me know and I'll explains the details.
thanks for the answers, i read at various places that modifications where sometimes necessary but i thought that it was meant for previous versions. Can you explain it or give a link to that ? (or maybe attach the modified EthernetUdp.h and EhternetUdp.cpp files) Also, i saw that it's using the teensy's EthernetUdp library, not the original arduino one, i don't know what is different between them, but as you tested mainly on teensy, i assume you know which file to modify :)
Indeed, with Arduino 1.6.5 r2 (1.6.6 is not out yet, is it ?) and teensyduino 1.24, i got those compile error :
In file included from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Ethernet/Dhcp.h:7:0,
from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Ethernet/Ethernet.h:9,
from D:\Documents\Arduino\libraries\EthernetBonjour\EthernetBonjour.cpp:27:
C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Ethernet/EthernetUdp.h: In constructor 'EthernetBonjourClass::EthernetBonjourClass()':
C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Ethernet/EthernetUdp.h:46:11: error: 'uint8_t EthernetUDP::_sock' is private
uint8_t _sock; // socket ID for Wiz5100
^
D:\Documents\Arduino\libraries\EthernetBonjour\EthernetBonjour.cpp:120:10: error: within this context
this->_sock = -1;
^
D:\Documents\Arduino\libraries\EthernetBonjour\EthernetBonjour.cpp: In member function 'MDNSError_t EthernetBonjourClass::_sendMDNSMessage(uint32_t, uint32_t, int, int)':
D:\Documents\Arduino\libraries\EthernetBonjour\EthernetBonjour.cpp:489:1: warning: label 'errorReturn' defined but not used [-Wunused-label]
errorReturn:
^
In file included from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Ethernet/Dhcp.h:7:0,
from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Ethernet/Ethernet.h:9,
from D:\Documents\Arduino\libraries\EthernetBonjour\EthernetBonjour.cpp:27:
C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Ethernet/EthernetUdp.h: In member function 'MDNSError_t EthernetBonjourClass::_processMDNSQuery()':
C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Ethernet/EthernetUdp.h:49:12: error: 'uint16_t EthernetUDP::_remotePort' is private
uint16_t _remotePort; // remote port for the incoming packet whilst it's being processed
^
D:\Documents\Arduino\libraries\EthernetBonjour\EthernetBonjour.cpp:554:34: error: within this context
MDNS_SERVER_PORT == this->_remotePort)
^
D:\Documents\Arduino\libraries\EthernetBonjour\EthernetBonjour.cpp:620:48: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
ir = (tr > sizeof(DNSHeader_t)) ? sizeof(DNSHeader_t) : tr;
^
In file included from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Ethernet/Dhcp.h:7:0,
from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Ethernet/Ethernet.h:9,
from D:\Documents\Arduino\libraries\EthernetBonjour\EthernetBonjour.cpp:27:
C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Ethernet/EthernetUdp.h:49:12: error: 'uint16_t EthernetUDP::_remotePort' is private
uint16_t _remotePort; // remote port for the incoming packet whilst it's being processed
^
D:\Documents\Arduino\libraries\EthernetBonjour\EthernetBonjour.cpp:667:35: error: within this context
MDNS_SERVER_PORT == _remotePort &&
^
D:\Documents\Arduino\libraries\EthernetBonjour\EthernetBonjour.cpp:762:54: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
ir = (tr > sizeof(DNSHeader_t)) ? sizeof(DNSHeader_t) : tr;
^
D:\Documents\Arduino\libraries\EthernetBonjour\EthernetBonjour.cpp:855:54: warning: value computed is not used [-Wunused-value]
ptrName[buf[0]]; // this catches uncompressed names
^
D:\Documents\Arduino\libraries\EthernetBonjour\EthernetBonjour.cpp:855:54: warning: statement has no effect [-Wunused-value]
In file included from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Ethernet/Dhcp.h:7:0,
from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Ethernet/Ethernet.h:9,
from D:\Documents\Arduino\libraries\EthernetBonjour\EthernetBonjour.cpp:27:
C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Ethernet/EthernetUdp.h:48:13: error: 'IPAddress EthernetUDP::_remoteIP' is private
IPAddress _remoteIP; // remote IP address for the incoming packet whilst it's being processed
^
D:\Documents\Arduino\libraries\EthernetBonjour\EthernetBonjour.cpp:1026:48: error: within this context
(void)this->_sendMDNSMessage(this->_remoteIP, xid, (int)MDNSPacketTypeMyIPAnswer, 0);
^
In file included from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Ethernet/Dhcp.h:7:0,
from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Ethernet/Ethernet.h:9,
from D:\Documents\Arduino\libraries\EthernetBonjour\EthernetBonjour.cpp:27:
C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Ethernet/EthernetUdp.h:48:13: error: 'IPAddress EthernetUDP::_remoteIP' is private
IPAddress _remoteIP; // remote IP address for the incoming packet whilst it's being processed
^
D:\Documents\Arduino\libraries\EthernetBonjour\EthernetBonjour.cpp:1032:48: error: within this context
(void)this->_sendMDNSMessage(this->_remoteIP, xid, (int)MDNSPacketTypeServiceRecord, j-2);
^
In file included from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Ethernet/Dhcp.h:7:0,
from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Ethernet/Ethernet.h:9,
from D:\Documents\Arduino\libraries\EthernetBonjour\EthernetBonjour.cpp:27:
C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Ethernet/EthernetUdp.h:48:13: error: 'IPAddress EthernetUDP::_remoteIP' is private
IPAddress _remoteIP; // remote IP address for the incoming packet whilst it's being processed
^
D:\Documents\Arduino\libraries\EthernetBonjour\EthernetBonjour.cpp:1038:42: error: within this context
(void)this->_sendMDNSMessage(this->_remoteIP, xid, (int)MDNSPacketTypeNoIPv6AddrAvailable, 0);
^
Error compiling.
I looked at the other issues and made the necessary changes to EthernetUdp.h / cpp and EthernetBonjour.h / cpp It now compiles fine, thanks !!
Hello, i'm trying to get your library working, for now i'm stuck at trying to compile the RegisteringService example.
It doesn't seem to have compilation error but when i hit compile, it starts and then get stuck in the middle. With verbose compilation on, here is the log
when reaching this last line, it stays here forever (compiling for teensy 3.1). I've successfully compiled sketches using Ethernet and EthernetUdp, only the EthernetBonjour seems to get it stuck.
Any idea ?
Thanks