Ethernet library/Wiznet chip sends hundreds of frames

Anyone have any idea why the Ethernet library sends char data one byte at a time? In my case, this results in over 200 frames being sent from the Wiznet chip, which obviously isn't too efficient. Might be something I've done, but here's a sample of code:

client.print(F("Tank: </td><td><input type=\"text\" maxlength=\"2\" size=\"2\" name=\"tank\" value=\""));
    client.print(F("<input type=\"text\" maxlength=\"2\" size =\"2\" name=\"room\" value=\""));
    client.println(F("<input type=\"submit\" value=\"Set Temperature\">"));

Thanks for any help!

The F() function causes the client.print and client.println calls to send the strings one character at a time. If you want to send the strings in one packet per client call, remove the F() calls.

Urgh! Thanks for that. Is there any way around it short of strcpy_Ping from flash to RAM before each print()? PSTR() perhaps? I can't remove the F() calls otherwise I'll run out of RAM pretty quick.

I use strcpy_P, strcat_P, and PSTR.

char tBuffer[64];

strcpy_P(tBuffer,PSTR("Tank: </td><td><input type=\"text\" maxlength=\"2\" size=\"2\" name=\"tank\" value=\""));

I thought that might be the only way. That's... inconvenient at best. But thank you very much for the answer :slight_smile: