Go Down

Topic: Ethernet library - comment out Serial. (Read 322 times) previous topic - next topic

johan_o

Hi.

I had a lot of difficulty making my sketch work, without the USB cable connected to my computer.

In the end I isolated my problem to the ethernet library and found four lines using Serial.print that isn't commented out using //. I commented them out and now the sketch is working flawless while getting power from PoE splitter.

May I suggest the four lines be commented out in a future release?

The lines are...

EthernetServer.cpp line 126 and line 150

Socket.cpp line 90 and line 154

Keep in mind however, that I'm new to Arduino (both hardware and software), so my suggestion isn't made from a position where I claim to know how the Ethernet library works in detail - I just stumbled upon a small change that made my sketch work.

Please advice me if this is not the correct place for my post.

Have a great day.

Regards Johan Ohrt

Juraj

Hi.

I had a lot of difficulty making my sketch work, without the USB cable connected to my computer.

In the end I isolated my problem to the ethernet library and found four lines using Serial.print that isn't commented out using //. I commented them out and now the sketch is working flawless while getting power from PoE splitter.

May I suggest the four lines be commented out in a future release?

The lines are...

EthernetServer.cpp line 126 and line 150

Socket.cpp line 90 and line 154

Keep in mind however, that I'm new to Arduino (both hardware and software), so my suggestion isn't made from a position where I claim to know how the Ethernet library works in detail - I just stumbled upon a small change that made my sketch work.

Please advice me if this is not the correct place for my post.

Have a great day.

Regards Johan Ohrt
they are in #if 0, so not included in compilation

johan_o

Like I said - new to Arduino... and sure enough... shortly after my post, the sketch failed again...

Since I use a PoE splitter, I started to worry that maybe the problem was the splitter it self, so tried to connect to simple USB power supply in wall socket... and sure enough, no problems so far...

I'm so happy (irony) to find out that I spend months trying to figure out why the sketch insisted on the computer USB connection... when in fact I have been working with (what appears to be) a faulty PoE splitter.

Oh well - learned a lot about debugging code, Ethernet library and tons of other stuff :-)

Thanks for setting my straight on the #if 0 part.

Go Up