Welcome, Guest. Please login or register.

Author Topic: i made a POC parallel port device that allows printing to a networked printer  (Read 3778 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline scm2000Topic starter

  • Newbie
  • *
  • Join Date: May 2024
  • Posts: 32
  • Country: us
    • Show only replies by scm2000
i don’t know if this has been done before, but short of getting some kind of ethernet port for my amiga 500, i wired an ESP32micro to a db25 connector, with some python code it acts like a printer to the amiga but passes the byte stream over wifi to my network laserjet printer.

right now its a mess of jumper wires, but after i shake it down for a few days im going to make a pcb design that basically will just have a male db25 connector and a socket to plug in the esp32 board.

also once im sure im done with the code ill rewrite it in c.

if theres interest ill make the design availabe on github so anyone can build one. 


for me the goal was to get program listings out of the amiga without having to buy a printer to attach to it. that seems to be working well
 

Offline TribbleSmasher

Imteresting!

Will it have some kind of web interface for configuration, or something like a script yo have to copy "onto" the micro controller?

How does it work in general?
 

Offline scm2000Topic starter

  • Newbie
  • *
  • Join Date: May 2024
  • Posts: 32
  • Country: us
    • Show only replies by scm2000
Imteresting!

Will it have some kind of web interface for configuration, or something like a script yo have to copy "onto" the micro controller?

How does it work in general?

right now there is just a python script and a data file on the board's flash file system...   So you'd install micropython on the board, then use a tool such as ampy or rshell to copy the python script onto it, and a data file with your network ssid and password. hit reset or power cycle it and it will be up and running.

I could also add the printer hostname/ip address and port number to the data file for configuration, as it is right now I'd edit the python code for that.

Eventually this goes into C, in that case I'd use PlatformIO to compile it and download to the board, and PlatformIO has a tool to install files into the boards flash file system.    You could also use Arduino IDE, but I haven't used that in ages, so I'm not sure if it will manage the boards file system.

Today I wired up the parallel port reset pin to the esp32's rst pin...   That will cause the board to reset whenever the amiga is rebooted, or powered up. and If i can find a reference to help me, I should be able to write a cli tool to strobe the port's reset pin so you can reset the esp32 from a command line...  as it is not completely robust at the moment, I have found I've had to reset it a few times since I got it working. Once it's in a case, it would complicate the case design to provide a pushbutton for the manual reset button on the board.

Here is a photo of it's current state:

The USB cable is for power and reprogramming.   I thought about the fact that it looks like I could mod the Amiga 500 motherboard to not have a resistor inline on the pin that has 5 volts... as it is normally you only get 10ma, an ESP32 running wifi would need more like 200ma.

That mess of wires needs to be cleaned up by making a PCB board and 3d printed shell. it would be nice and compact.  I'm waiting on making the PCB because I'm still deciding things, like should I really have the reset capability? and if so I probably should put in a pull up resistor.. Also... this ESP32 board is nice and small, but I barely have enough non-conflicting GPIO pins for this... I might go with a slightly larger board with more safe GPIO pins...   the PCB would be tailored to the specific ESP32 board pin headers.
  Also right now it only uses the data lines D0--D7, nStrobe from the amiga, and nAck back to the amiga, and Busy back to the amiga.   Others' that could be wired: PaperOut that might be handy if I can figure out how to get that kind of status from the printer, Select -- so far mysterious to me, it can be either an input or output, but with my logic analyser, I've never seen it change state,  I do know online sources say it's an input to the host computer, but if I assert voltage on that pin, the amiga won't even send an nStrobe... 

Also I need to give some credit to ChatGPT... I used it to bounce ideas for writing the code, and selecting which GPIO pins to use.
 

Offline Boing-ball

Excellent stuff. You need to get this on sale over at Amibay when it’s ready 👍🏻
 

Offline Xanxi

  • Hero Member
  • *****
  • Join Date: Aug 2005
  • Posts: 900
    • Show only replies by Xanxi
Very nice, but what about drivers?
So far i have never been able to print to my Samsung network printer from an Amiga without wasting a lot of paper, even when messing with postcript.
10 Classic Amiga Computers so far: I have too many computers!!
 

Offline scm2000Topic starter

  • Newbie
  • *
  • Join Date: May 2024
  • Posts: 32
  • Country: us
    • Show only replies by scm2000
yes drivers are a problem. for my setup the laserjet driver seems to work well enough for my modern laserjet printer
my printer also supports postscript and if i found that driver i would try it
 

Offline jvmartins

  • Newbie
  • *
  • Join Date: Nov 2021
  • Posts: 12
    • Show only replies by jvmartins
That's really cool! I’ve been looking for a way to get stuff off my Amiga 500 without shelling out for an old printer. I’d definitely be interested in your PCB design once you have it sorted.