SeaPrint - Network printing for SailfishOS

That´s confusing, the copies work now but the printer is not changed (only the windows software got an update)

The copies dialog on Seaprint 1.1.7:

The copies dialog on Seaprint 1.2.1:

ou are right, I mean the printer properties page. Sorry.

That’s the whole point, i added it basically just for you. It works now (1.2-series).

But still you said

…as if it worked before.
And it has not worked before, for you (unless your printer has changed).

Thank you that is very nice of you.

right, forgot the word again.
I thought it worked in the past but it never worked before. I just tested it again with older Versions.

1 Like

XA2 4.4.0.64 - Epson ET-2710

Hi,
Looks great being able to print from SFOS!
Is wifi direct supported? (connect the phone directly to the printer’s access point)
I didn’t find infos on how it should work.

What I tried:
Enable printer’s AP and be able to connect to it (then disconnect) from my Linux PC
Connect to the printer’s wifi AP
Open Seaprint

The “available printers” list is empty.
When I go to "“Add by URL”
I have
“On WIFI: EPSON…” (my printer’s AP name)
“No printer found”

I printed the printers AP specs and entered the URL copied from there and added “/ipp/print”.
But had no success.

I tried to redirect SP output to a text file with > and 2>&1 but it still outputs in the terminal.

Do I miss some neurons? :upside_down_face:

Is wifi direct supported? (connect the phone directly to the printer’s access point)

I think it depends on your printer. My Samsung m2026w has its own ssid (“Direct-7LM2020 Series”). Of course, it also appears as a device in my home network.

the same is with my Brother Printer

A Question about the Printer queue page and print multiple documents. If I would print more as one document at the same time the only way for me is to open a new instance of Seaprint for each of that. And the Printer queue page is not reachable while printing.

Do you plan do add support for multible Documents in the future?
Here is a Idea:

Under the printer icon it is free space. My idea is if I select a new document it should appear in this Area you see on the screenshot. If all documents are selected I can start printing it.

Well, yes and no.
It does not help in any way with the faffing about with extra WiFi networks of course, but from what i can tell WiFi-direct builds on IPP, and even requires IPP support for some good formats. However; the source here is PWG, not the WIFi consortium. The latter are for some reason very silent about what their standard actually means.

On my crappy Canon test printer with WiFi direct, it has two WiFi networks it can emit; one without a password that is just for configuring it, and another with password that is the network to actually print on. (You have to select/configure that, both are not visible at the same time)
Maybe you are on the wrong one? What does the URL you are trying to add look like?

But i recommend you connect the printer to your home network, and not faff with peer-to-peer unless absolutely necessary.

Sailfish has silly pretend-bash, and can’t do the &1 part of that redirection. Simply 2> is enough for this particular need though.

1 Like

Well, this differs wildly between printers.
Good (PDF- and Postcript-capable) printers takes the document in a few seconds and then releases you back to the first page. For simpler printers that need raster formats, most of the time spent on the busy-screen is for the actual transfer of the intermediary format. Some printers hold on to the client connection a while extra for no good reason though.

Having multiple connections to simple raster printers probably wouldn’t do much good, and maybe even time out, so for those a local queue would make sense. But for the good ones, you already get it on their end.

The reason it behaves this much like a mobile app, for lack of better words, is that we aren’t allowed background services in Sailfish OS. If it wasn’t so clearly busy, people would close the app, and break the printout.

So “maybe”, but only if the processing can be put away from the app safely, and that probably isn’t happening.

No there isn’t. That’s where other printers go.
And you probably didn’t think about that users might want different settings for different documents (or even mix with pictures that have different settings.). Please put a little bit more thought into ideas before venting them.

1 Like

Good point. I didn´t think of that when I wrote my idea.

Today I started to translate the Print medias into German. That´s a lot of them. Respect that you have collected them all together.

Thank you for your help.
You are right, when I WIFI connect to the printer with my PC and try to add a printer, It shows two printers with different IPs. However, the one which works for printing has the same IP as the one I tried to connect to Seaprint.

On the self printed printer’s config page, it says it’s address to be 192.168.223.1
So, I tried various URLS like 192.168.223.1/ipp/print, ipp://192.168.223.1/ipp/print, ipps://192.168.223.1/ipp/print
I also tried the URI found into the WIFI printer’s properties: dnssd://EPSON%20ET-2710%20Series._pdl-datastream._tcp.local/
The “accept” button always stays grayed though.

I can’t quickly find a “faffing” translation but I guess I’ll faff a bit more as I have no active wifi here. :slightly_smiling_face:

Great, works. Here is the log, since SP start up to when I try to enter URLs:

[W] unknown:18 - file:///usr/share/harbour-seaprint/qml/harbour-seaprint.qml:18:30: QML FirstPage: Binding loop detected for property “status”
[W] unknown:169 - file:///usr/lib/qt5/qml/Sailfish/Silica/DialogHeader.qml:169: TypeError: Cannot read property ‘backIndicatorDown’ of null
[W] unknown:164 - file:///usr/lib/qt5/qml/Sailfish/Silica/DialogHeader.qml:164: TypeError: Cannot read property ‘backIndicatorDown’ of null
[W] unknown:224 - file:///usr/lib/qt5/qml/Sailfish/Silica/DialogHeader.qml:224: TypeError: Cannot read property ‘forwardIndicatorDown’ of null
[W] unknown:219 - file:///usr/lib/qt5/qml/Sailfish/Silica/DialogHeader.qml:219: TypeError: Cannot read property ‘forwardIndicatorDown’ of null
[W] unknown:56 - file:///usr/share/harbour-seaprint/qml/pages/AddPrinterDialog.qml:56: ReferenceError: title is not defined

Two IPs are not the same as two WiFi networks.
But if other devices can make use of the one you connect to, you are on the correct one.
But seeing two printers on a “direct” network to one printer is very odd. Is that really what you are doing?

Apart from dnssd urls not being supported, the name here implies the printer only supports some crappy (semi-)proprietary formats, and not actually IPP to transport it either.

I wonder if this is a case of “WiFi Direct” vs. “WiFi Direct™” or some other shenanigans.
I did some checking in the specs for that printer before, and it did not seem to support anything useful… but as you saw in the link i posted, it seemed like WiFi Direct implied IPP Everywhere.

So it is probably a lost cause…

Those logs are just noise from the UI, nothing useful. Not that i really expect anything useful, but did you turn on debug logs in settings? UI noise is there always…

Oh, right, uninstall, reinstall and forgot to re-enable debug logs.
And I was wandering why it gave so few printer related feedback…
I’ll try to bring something more consistant back.
Even if

just by curiosity.

Anyhow, thanks for having taken time.
Here is the log but with no useful infos out than how crappy I type, I am afraid :–)
(while the phone was connected to printer’s wifi as it would be on a normal wifi AP)

[D] unknown:0 - Using Wayland-EGL
[D] unknown:0 - discovering 12 ("_ipp._tcp.local", "_ipps._tcp.local")
[W] unknown:18 - file:///usr/share/harbour-seaprint/qml/harbour-seaprint.qml:18:30: QML FirstPage: Binding loop detected for property "status"
[D] unknown:0 - QUrl("")
[D] unknown:0 - "" QUrl("ipp://")
[D] unknown:0 - QUrl("ipp://")
[D] unknown:0 - write  127
* Closing connection -1
[D] unknown:0 - curl_easy_perform() failed:  URL using bad/illegal format or missing URL
[W] unknown:169 - file:///usr/lib/qt5/qml/Sailfish/Silica/DialogHeader.qml:169: TypeError: Cannot read property 'backIndicatorDown' of null
[W] unknown:164 - file:///usr/lib/qt5/qml/Sailfish/Silica/DialogHeader.qml:164: TypeError: Cannot read property 'backIndicatorDown' of null
[W] unknown:224 - file:///usr/lib/qt5/qml/Sailfish/Silica/DialogHeader.qml:224: TypeError: Cannot read property 'forwardIndicatorDown' of null
[W] unknown:219 - file:///usr/lib/qt5/qml/Sailfish/Silica/DialogHeader.qml:219: TypeError: Cannot read property 'forwardIndicatorDown' of null
[W] unknown:56 - file:///usr/share/harbour-seaprint/qml/pages/AddPrinterDialog.qml:56: ReferenceError: title is not defined
[D] unknown:0 - 3
[D] unknown:0 - "1" QUrl("ipp://0.0.0.1")
[D] unknown:0 - QUrl("ipp://0.0.0.1")
[D] unknown:0 - write  134
*   Trying 0.0.0.1:631...
* Immediate connect fail for 0.0.0.1: Invalid argument
* Closing connection 0
[D] unknown:0 - curl_easy_perform() failed:  Couldn't connect to server
[D] unknown:0 - 7
[D] unknown:0 - "19" QUrl("ipp://0.0.0.19")
[D] unknown:0 - QUrl("ipp://0.0.0.19")
[D] unknown:0 - write  135
*   Trying 0.0.0.19:631...
* Immediate connect fail for 0.0.0.19: Invalid argument
* Closing connection 0
[D] unknown:0 - curl_easy_perform() failed:  Couldn't connect to server
[D] unknown:0 - 7
[D] unknown:0 - "192" QUrl("ipp://0.0.0.192")
[D] unknown:0 - QUrl("ipp://0.0.0.192")
[D] unknown:0 - write  136
*   Trying 0.0.0.192:631...
* Immediate connect fail for 0.0.0.192: Invalid argument
* Closing connection 0
[D] unknown:0 - curl_easy_perform() failed:  Couldn't connect to server
[D] unknown:0 - 7
[D] unknown:0 - "192." QUrl("ipp://192.")
[D] unknown:0 - QUrl("ipp://192.")
[D] unknown:0 - write  131
[D] unknown:0 - "192.1" QUrl("ipp://192.0.0.1")
[D] unknown:0 - QUrl("ipp://192.0.0.1")
[D] unknown:0 - "192.16" QUrl("ipp://192.0.0.16")
[D] unknown:0 - QUrl("ipp://192.0.0.16")
[D] unknown:0 - "192.168" QUrl("ipp://192.0.0.168")
[D] unknown:0 - QUrl("ipp://192.0.0.168")
[D] unknown:0 - "192.168." QUrl("ipp://192.168.")
[D] unknown:0 - QUrl("ipp://192.168.")
[D] unknown:0 - "192.168.2" QUrl("ipp://192.168.0.2")
[D] unknown:0 - QUrl("ipp://192.168.0.2")
[D] unknown:0 - "192.168.22" QUrl("ipp://192.168.0.22")
[D] unknown:0 - QUrl("ipp://192.168.0.22")
[D] unknown:0 - "192.168.223" QUrl("ipp://192.168.0.223")
[D] unknown:0 - QUrl("ipp://192.168.0.223")
[D] unknown:0 - "192.168.223." QUrl("ipp://192.168.223.")
[D] unknown:0 - QUrl("ipp://192.168.223.")
[D] unknown:0 - "192.168.223.1" QUrl("ipp://192.168.223.1")
[D] unknown:0 - QUrl("ipp://192.168.223.1")
[D] unknown:0 - "192.168.223.1/" QUrl("ipp://192.168.223.1/")
[D] unknown:0 - QUrl("ipp://192.168.223.1/")
[D] unknown:0 - "192.168.223.1/p" QUrl("ipp://192.168.223.1/p")
[D] unknown:0 - QUrl("ipp://192.168.223.1/p")
[D] unknown:0 - "192.168.223.1/pr" QUrl("ipp://192.168.223.1/pr")
[D] unknown:0 - QUrl("ipp://192.168.223.1/pr")
[D] unknown:0 - "192.168.223.1/pri" QUrl("ipp://192.168.223.1/pri")
[D] unknown:0 - QUrl("ipp://192.168.223.1/pri")
[D] unknown:0 - "192.168.223.1/prin" QUrl("ipp://192.168.223.1/prin")
[D] unknown:0 - QUrl("ipp://192.168.223.1/prin")
[D] unknown:0 - "192.168.223.1/pri" QUrl("ipp://192.168.223.1/pri")
[D] unknown:0 - QUrl("ipp://192.168.223.1/pri")
[D] unknown:0 - "192.168.223.1/pr" QUrl("ipp://192.168.223.1/pr")
[D] unknown:0 - QUrl("ipp://192.168.223.1/pr")
[D] unknown:0 - "192.168.223.1/p" QUrl("ipp://192.168.223.1/p")
[D] unknown:0 - QUrl("ipp://192.168.223.1/p")
[D] unknown:0 - "192.168.223.1/" QUrl("ipp://192.168.223.1/")
[D] unknown:0 - QUrl("ipp://192.168.223.1/")
[D] unknown:0 - "192.168.223.1/i" QUrl("ipp://192.168.223.1/i")
[D] unknown:0 - QUrl("ipp://192.168.223.1/i")
[D] unknown:0 - "192.168.223.1/ip" QUrl("ipp://192.168.223.1/ip")
[D] unknown:0 - QUrl("ipp://192.168.223.1/ip")
[D] unknown:0 - "192.168.223.1/ipp" QUrl("ipp://192.168.223.1/ipp")
[D] unknown:0 - QUrl("ipp://192.168.223.1/ipp")
[D] unknown:0 - "192.168.223.1/ipp/" QUrl("ipp://192.168.223.1/ipp/")
[D] unknown:0 - QUrl("ipp://192.168.223.1/ipp/")
[D] unknown:0 - "192.168.223.1/ipp/p" QUrl("ipp://192.168.223.1/ipp/p")
[D] unknown:0 - QUrl("ipp://192.168.223.1/ipp/p")
[D] unknown:0 - "192.168.223.1/ipp/pr" QUrl("ipp://192.168.223.1/ipp/pr")
[D] unknown:0 - QUrl("ipp://192.168.223.1/ipp/pr")
[D] unknown:0 - "192.168.223.1/ipp/pri" QUrl("ipp://192.168.223.1/ipp/pri")
[D] unknown:0 - QUrl("ipp://192.168.223.1/ipp/pri")
[D] unknown:0 - "192.168.223.1/ipp/prin" QUrl("ipp://192.168.223.1/ipp/prin")
[D] unknown:0 - QUrl("ipp://192.168.223.1/ipp/prin")
[D] unknown:0 - "192.168.223.1/ipp/print" QUrl("ipp://192.168.223.1/ipp/print")
[D] unknown:0 - QUrl("ipp://192.168.223.1/ipp/print")
* Could not resolve host: 192.
* Closing connection 0
[D] unknown:0 - curl_easy_perform() failed:  Couldn't resolve host name
[D] unknown:0 - write  136
[D] unknown:0 - 6
*   Trying 192.0.0.1:631...
* connect to 192.0.0.1 port 631 failed: No route to host
* Failed to connect to 192.0.0.1 port 631 after 3006 ms: No route to host
* Closing connection 0
[D] unknown:0 - curl_easy_perform() failed:  Couldn't connect to server
[D] unknown:0 - write  137
[D] unknown:0 - 7
*   Trying 192.0.0.16:631...
[D] unknown:0 - "i192.168.223.1/ipp/print" QUrl("ipp://i192.168.223.1/ipp/print")
[D] unknown:0 - QUrl("ipp://i192.168.223.1/ipp/print")
* connect to 192.0.0.16 port 631 failed: No route to host
* Failed to connect to 192.0.0.16 port 631 after 3006 ms: No route to host
* Closing connection 0
[D] unknown:0 - curl_easy_perform() failed:  Couldn't connect to server
[D] unknown:0 - "ip192.168.223.1/ipp/print" QUrl("ipp://ip192.168.223.1/ipp/print")
[D] unknown:0 - QUrl("ipp://ip192.168.223.1/ipp/print")
[D] unknown:0 - "ipp192.168.223.1/ipp/print" QUrl("ipp://ipp192.168.223.1/ipp/print")
[D] unknown:0 - QUrl("ipp://ipp192.168.223.1/ipp/print")
[D] unknown:0 - 7
[D] unknown:0 - write  138
*   Trying 192.0.0.168:631...
[D] unknown:0 - "ipp:192.168.223.1/ipp/print" QUrl("ipp:192.168.223.1/ipp/print")
[D] unknown:0 - QUrl("ipp:192.168.223.1/ipp/print")
[D] unknown:0 - "ipp:/192.168.223.1/ipp/print" QUrl("ipp:/192.168.223.1/ipp/print")
[D] unknown:0 - QUrl("ipp:/192.168.223.1/ipp/print")
[D] unknown:0 - "ipp://192.168.223.1/ipp/print" QUrl("ipp://192.168.223.1/ipp/print")
[D] unknown:0 - QUrl("ipp://192.168.223.1/ipp/print")
* connect to 192.0.0.168 port 631 failed: No route to host
* Failed to connect to 192.0.0.168 port 631 after 3008 ms: No route to host
* Closing connection 0
[D] unknown:0 - curl_easy_perform() failed:  Couldn't connect to server
[D] unknown:0 - write  135
[D] unknown:0 - 7
[D] unknown:0 - "ipps://192.168.223.1/ipp/print" QUrl("ipps://192.168.223.1/ipp/print")
[D] unknown:0 - QUrl("ipps://192.168.223.1/ipp/print")
[D] unknown:0 - discovering 12 ("_ipp._tcp.local", "_ipps._tcp.local")
* Could not resolve host: 192.168.
* Closing connection 0
[D] unknown:0 - curl_easy_perform() failed:  Couldn't resolve host name

I’ve finally got around to having another go to get my printer working with SeaPrint. I successfully added the overrides file using the information you provided in an earlier post (SeaPrint - Network printing for SailfishOS - #234 by attah) which got me a step nearer to getting things working. However I now get an error, Print failed: server-error-version-not-supported.

Prior to this I had a Print failed: Unsupported page size. I was able to fix that by changing from default to A4 so I know I’m able to communicate with the printer.

Is there another setting I need to set or do I need to add to the overrides file?

Thanks for your help.

That sounds like it doesn’t like the print job itself being submitted with IPP version 2.
SeaPrint automatically uses version 2 for that if the printer says it supports it, as is the case for your printer.
Something is really weird with that printer implementation… they cannot seriously have thought it would be usable for anything but their applications, despite having a standard protocol.

I guess your next step could be to override ipp-versions-supported so it no longer contains 2.0.

Thanks for the quick reply. Trust me to own a “difficult” printer.

I tried a quick edit of the file but something went wrong. :frowning: Looks like I managed to corrupt what I did in the overrides file earlier. It’s getting late here. I will have another go tomorrow.

In the meantime can you confirm I am on the right track with this code for the overrides file. I know the first bit about the supported formats works. I have copied the text from the printer debug page and removed the “2.0” entry. Do I have the brackets correct? As I mentioned before I am very much a novice.

{
“printer-make-and-model”: {
“RICOH MP C306Z PS3”: {
“document-format-supported”: {
“tag”: 73,
“value”: [
“application/octet-stream”, “application/pdf”, “application/postscript”, “image/jpeg”
]
},
“ipp-versions-supported”: {
“tag”: 68,
“value”: [
“1.0”,
“1.1”
]

    }
}

}

If you use the formatting tools, “preformatted text” specifically, i would have a much better chance of reading that. And so will you for that matter, for example since it allows you to maintain the indentation of the data structure. Indentation also makes it easier to spot mismatched brackets, which is indeed most likely your issue.

{
    "printer-make-and-model": {
        "RICOH MP C306Z PS3": {
            "document-format-supported": {
                "tag": 73,
                "value": [
                    "application/octet-stream", "application/pdf", "application/postscript", "image/jpeg"
                ]
            },
         "ipp-versions-supported": {
    "tag": 68,
    "value": [
      "1.0",
      "1.1"
    ]
 
        }
    }
}

I hope this is better. Sorry for not doing this earlier. I mistakenly thought it would have posted as I had entered it. Until you mentioned it I wasn’t aware of the “preformatted text” option.

BTW, I agree on being better able to spot errors.

Surely you have already seen from previously that this is not the case.

If you now take some care and align the blocks, you can easily see that there is one last closing curly bracket missing.