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(settings_select_status[tank_temp_location]);
    client.print(F("\">&deg;C</td></tr><tr>"));
    client.print(F("<td>Room:</td><td>"));
    client.print(F("<input type=\"text\" maxlength=\"2\" size =\"2\" name=\"room\" value=\""));
    client.print(settings_select_status[room_temp_location]);
    client.print(F("\">&deg;C"));
    client.println(F("</td></tr></table>"));
    client.println(F("<input type=\"submit\" value=\"Set Temperature\">"));
    client.print(F("</span>></form>"));

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=\""));
client.write(tBuffer);

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