[ Raspberry Pi or Android ] --> WiFi Router --> USB printer

In summary: This package is available via the apt-get package manager. After installing it, I could see my printer in the list of CUPS printers.I then selected the printer and everything began to work flawlessly.
  • #1
Swamp Thing
Insights Author
908
572
A couple of years ago, I connected a USB printer to the USB socket on my broadband router. After a lot of trial and error (of which I remember no details) I was able to print from my windows laptop. Here are the port settings that currently work from the laptop:

printerPort.png
1) Based on the above information, can I set up my Raspberry Pi Model-4 to print to the same setup? How?

2) Ditto for my Android phone.

3) Or, is there a different port config (e.g. LPR instead of Raw) that will work better with the Pi or the Android? And still work for Windows, of course.
 
Last edited:
Computer science news on Phys.org
  • #2
A bit of progress...
You have to use the CUPS service to set up printers on the Raspberry Pi. It has a web based interface at localhost:631. When I went through the "add printer" wizard, I found that it supports a range of Samsung printers, including mine (ML-1660).

But when I print a test page, nothing happens. Sometimes, after a long time, the printer spits out a page with an error message.

I decided to insert a debug waypoint by setting it up to dump the Samsung compatible printer data to a file on disk, and now the test page goes to a file of about 125 kB.

Now I would like to pipe this file to 192.168.1.1:9100 as the next stage of debugging. How can I do that?
 
  • #3
I tried to use Wolfram to send data from the print file (created as described above) to the usb printer hosted on the WiFi router:
Code:
ip = "192.168.1.1:9100"
port = "TCP"
socket = SocketConnect[ip, port]
data = BinaryReadList["/home/pi/Desktop/printerFile/printerFile.out"]
BinaryWrite[socket, data]
SocketClose[socket]

Nothing happens. Sometimes, after a long time, an error page is printed: "INTERNAL ERROR = Including corrupted data".

I now suspect that you can't just dump binary data to the printer, as one could in the 1980s and 90s. In more modern printers (esp. USB ones?) you probably need duplex bidirectional communications before and while data is being transferred?
 
  • #4
In Windows, I have been using a "Samsung ML-1660 Series Class Driver", and it works. See pic in my first post. (My actual printer is ML-1666, which I have been assuming is of the "1660 series class".

After much digging and trial & error, I found that this logic doesn't cut it on the Raspberry Pi. I was initially trying to use a ML-1660 driver, which wasn't working.

Someone on the web recommends doing this:

Code:
sudo apt-get install printer-driver-splix

... after which I could then see the actual model that I have (ML-1666) in the CUPS list of printers.

Once I selected this, everything began to work flawlessly. :smile:👍

Apparently "splix" is a driver package that supports certain Samsung printers that use "Samsung Printer Language" or SPL.
 
Last edited:
  • Like
Likes Wrichik Basu

1. What is a Raspberry Pi or Android WiFi router?

A Raspberry Pi or Android WiFi router is a small, inexpensive computer that can be used as a wireless router. It is capable of connecting multiple devices to the internet through a WiFi connection.

2. Can I use a Raspberry Pi or Android WiFi router to connect a USB printer to my network?

Yes, you can use a Raspberry Pi or Android WiFi router to connect a USB printer to your network. By connecting the USB printer to the router, you can print wirelessly from any device connected to the network.

3. How do I set up a Raspberry Pi or Android WiFi router?

Setting up a Raspberry Pi or Android WiFi router is a relatively straightforward process. First, you will need to install the necessary software onto the device. Then, you will need to configure the router's settings, such as the network name and password. Finally, you can connect devices to the router and start using it as a wireless access point.

4. What is the benefit of using a Raspberry Pi or Android WiFi router over a traditional router?

The main benefit of using a Raspberry Pi or Android WiFi router is its flexibility and affordability. These devices are much less expensive than traditional routers and can be customized with different software and features. Additionally, they can be used for other purposes besides just being a router, such as a media center or home automation hub.

5. Can I still use my Raspberry Pi or Android WiFi router as a WiFi router if I connect a USB printer to it?

Yes, you can still use your Raspberry Pi or Android WiFi router as a WiFi router even if you connect a USB printer to it. The router will still be able to connect devices to the internet and provide a WiFi network, while also allowing you to print wirelessly from the USB printer.

Similar threads

  • Computing and Technology
Replies
7
Views
809
  • Computing and Technology
Replies
4
Views
2K
  • Computing and Technology
Replies
2
Views
742
  • Computing and Technology
Replies
24
Views
3K
  • Computing and Technology
Replies
5
Views
800
  • Computing and Technology
Replies
1
Views
1K
  • Computing and Technology
Replies
10
Views
2K
Replies
3
Views
2K
Replies
2
Views
1K
  • Computing and Technology
Replies
21
Views
7K
Back
Top