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

AI Thread Summary
To set up a Raspberry Pi Model 4 to print to a USB printer connected to a broadband router, the CUPS service is essential, accessible via a web interface at localhost:631. The Raspberry Pi can support various Samsung printers, including the ML-1660 and ML-1666 models. Initial attempts to print may fail due to incorrect driver selection or communication issues. It is crucial to use the correct driver; installing the "printer-driver-splix" package resolves compatibility problems for certain Samsung printers that utilize Samsung Printer Language (SPL). After installing this driver, users can successfully add the printer in CUPS and print without issues. For Android devices, similar configurations may apply, but specific details on setup were not provided. The process of sending print data directly to the printer via a socket connection may require bidirectional communication, which is not supported in the same manner as older printers.
Swamp Thing
Insights Author
Messages
1,032
Reaction score
770
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
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?
 
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?
 
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
Thread 'Urgent: Physically repair - or bypass - power button on Asus laptop'
Asus Vivobook S14 flip. The power button is wrecked. Unable to turn it on AT ALL. We can get into how and why it got wrecked later, but suffice to say a kitchen knife was involved: These buttons do want to NOT come off, not like other lappies, where they can snap in and out. And they sure don't go back on. So, in the absence of a longer-term solution that might involve a replacement, is there any way I can activate the power button, like with a paperclip or wire or something? It looks...
In my discussions elsewhere, I've noticed a lot of disagreement regarding AI. A question that comes up is, "Is AI hype?" Unfortunately, when this question is asked, the one asking, as far as I can tell, may mean one of three things which can lead to lots of confusion. I'll list them out now for clarity. 1. Can AI do everything a human can do and how close are we to that? 2. Are corporations and governments using the promise of AI to gain more power for themselves? 3. Are AI and transhumans...
Back
Top