EthernetBonjour icon indicating copy to clipboard operation
EthernetBonjour copied to clipboard

arduino + ethernet shield - stops working at EthernetBonjour.addServiceRecord

Open Collie147 opened this issue 7 years ago • 2 comments

Hi

I've got the library to compile ok but it seems to freeze at addServiceRecord(); (no serial output after this line).

I'm using the example RegisteringServices.ino code, with a few minor changes, as the example doesn't work, mainly static IP and some Serial.println() lines to output status of each command and it doesn't seem to get past addServiceRecord.

I've updated to the latest Ethernet library (1.1.2) along with the latest boards (1.6.19)

` #include <SPI.h> #include <Ethernet.h> #include <EthernetBonjour.h>

byte mac[] = { 0x90, 0xA2, 0xDA, 0x00, 0x59, 0x67 };

IPAddress ip( 192, 168, 1, 201 ); IPAddress gateway( 192, 168, 1, 1 ); IPAddress subnet( 255, 255, 255, 0 );

EthernetServer server(80);

void setup() { Ethernet.begin(mac, ip, gateway, gateway, subnet); Serial.begin(115200); Serial.println("Starting..."); server.begin();

if (EthernetBonjour.begin("Arduino")) { Serial.println(F("Bonjour Service started")); EthernetBonjour.addServiceRecord("Arduino._http", 80, MDNSServiceTCP); Serial.println("Service Record Set"); } else { Serial.println(F("Bounjour Service failed")); } Serial.println("Ready"); } `

Collie147 avatar Jul 11 '17 14:07 Collie147

Hello.

I have had the same issue, but i am not sure as why it wasn't working. I will check your sketch when i have time.

  • Marcel

DeltaCore avatar Aug 27 '17 21:08 DeltaCore

Hello, I am using the same example (RegisteringServices.ino), but for me does not work. I try aceess arduino.local/, just work with IP. What is problem?

LucasSantosSilva avatar Oct 27 '17 18:10 LucasSantosSilva