Ethernet Featherwing

Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
Jimbee
 
Posts: 45
Joined: Wed Aug 01, 2018 12:49 pm

Ethernet Featherwing

Post by Jimbee »

Hello,

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.

Code: Select all

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

User avatar
ncweiler
 
Posts: 13
Joined: Tue Apr 24, 2018 6:31 pm

Re: Ethernet Featherwing

Post by ncweiler »

From my experience with Feather boards and FeatherWings, I don't think a Feather board can be a print server.

But I'm going ask a bunch of questions anyways and see how far it gets you.

1) Which Feather board are you using?

2) How are you connecting the printer to the Feather board?

3) Have you soldered the headers to the FeatherWing and Feather board?

4) Is the code you uploaded the code you've been using or is it a simplified sketch?

User avatar
Jimbee
 
Posts: 45
Joined: Wed Aug 01, 2018 12:49 pm

Re: Ethernet Featherwing

Post by Jimbee »

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.

Thanks,
Jim

User avatar
ncweiler
 
Posts: 13
Joined: Tue Apr 24, 2018 6:31 pm

Re: Ethernet Featherwing

Post by ncweiler »

I think your problem is that you might be using the wrong command to send the files.

Lpr is intended to send a file (Word document, PDF, image) to an actual printer.

On *nix, I'd try using the nc (netcat) command.

Code: Select all

nc 10.0.0.13 <port> < filename.in

User avatar
Jimbee
 
Posts: 45
Joined: Wed Aug 01, 2018 12:49 pm

Re: Ethernet Featherwing

Post by Jimbee »

Thanks, I will give that a try.

Locked
Please be positive and constructive with your questions and comments.

Return to “Feather - Adafruit's lightweight platform”