ESP8266_ArtNetNode_DMX icon indicating copy to clipboard operation
ESP8266_ArtNetNode_DMX copied to clipboard

Compile error

Open NPreda opened this issue 6 years ago • 3 comments

Getting the following error during compliation in the "artNet" file:

exit status 1 ambiguous overload for 'operator+' (operand types are 'IPAddress' and 'int')

relating to the following lines of code: replyBuffer[18] = highByte(subnet+1); //subnet hi-lo replyBuffer[19] = lowByte(subnet+1);

NPreda avatar Feb 03 '19 03:02 NPreda

@NPreda I had the same issue and found this answer worked for the time being.

I've found out that this only happens with the latest 2.5.0 ESP8266 Arduino core, versions before that work fine. This is because IPv6 is now internally supported by ESP8266 and it can't make sure that it's an IPv4 address for this operation. WLED Issue.

I would leave the issue open so someone can start on a PR with similar IPv6 fix (that just aint #me).

DrewAspinwall avatar Mar 11 '19 03:03 DrewAspinwall

Hi. Did this ever get resolved? What's the correct fix? I'm getting the same compile error as @NPreda.

jtthewoodworker avatar Jul 27 '19 15:07 jtthewoodworker

Hey,

I got the same error trying to put this software on a Wemos D1 Mini (clone?) using the current Arduino IDE. I solved this by replacing the lines mentioned above (artNet.ino:125-126) with

  replyBuffer[18] = highByte(subnet.v4()+1);  //subnet hi-lo
  replyBuffer[19] = lowByte(subnet.v4()+1);

(Note the calls to the v4() method that returns the v4 representation of the IPAddress.)

I don't know if that has any implications on the firmware in general, though. I don't know the specifics of the ArtNet protocol, but I'd guess that there's no support vor IPv6 yet anyways. So @mtongnz – if you don't have any objections, I could also file a PR.

(In IPAddress.h there's also a flag named LWIP_IPV6 but setting this to 0 didn't fix the problem for me. Maybe I did something wrong though, I'm not very experienced in this language.)

Best, Benjamin.

bennigraf avatar Oct 19 '19 15:10 bennigraf