I'm trying to send a file from my PC via LPR (lpr -S 10.0.0.13 -P lpt1 filename and lpr -S 10.0.0.13 -P raw filename) to the ethernet feathering. I'm trying to use your feathering as a print server. I get a connection but no data is received (hangs) eventually timing out ("Error: print server did not accept request"). Does the WizNet W5500 chip have a queue name. If not how can I create one. I've been trying to use "EthernetServer server(515);" port 515 also tried port 9100.
void loop() {
// ("Listening/Waiting for a Client/Data");
EthernetClient client = server.available();
if (client) {
Serial.println("New Client Connected");
while (client.connected()) {
if (client.available()) {
char readChar = client.read();
Serial.print(readChar);
}
}
if (!client.connected()) { // keep the client socket open until the remote client is closed.
client.stop(); // free up the socket
Serial.println("\n\r Client Socket Closed");
//while (true); // only one connection allowed
}
}
}
Thanks,
Last edited by Franklin97355 on Wed Aug 08, 2018 6:55 pm, edited 1 time in total.
Reason:adjusted code tags
HI ncweiler,
Thanks for the reply.
1) It is the Adafruit Ethernet FeatherWing board. (WizNet W5500)
2) No printer just trying to use LPR to send a file to the board and display it in the serial port monitor.
3) Yes the terminals have been soldered.
I can communicate and send/receive data via the PC using Putty (port 23 & port 10001) this works with no problems. So the code and the board itself does work. When using the LPR command it connects and I receive and display the -P port (ie: lpt1 or raw) but no data after that. It seams like the PC is waiting for a reply from the ethernet featherwing never gets one and then times out.