Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working for HL-L2360DW (VERSIONCHECK=2) #20

Closed
dlenski opened this issue Apr 26, 2024 · 5 comments
Closed

Not working for HL-L2360DW (VERSIONCHECK=2) #20

dlenski opened this issue Apr 26, 2024 · 5 comments

Comments

@dlenski
Copy link
Contributor

dlenski commented Apr 26, 2024

This printer identifies itself in a slightly strange way, as MODEL=HL-L2360D series:

snmpwalk -v 2c -c public 192.168.4.120 iso.3.6.1.4.1.2435.2.4.3.99.3.1.6.1.2
iso.3.6.1.4.1.2435.2.4.3.99.3.1.6.1.2.1 = STRING: "MODEL=\"HL-L2360D series\""
iso.3.6.1.4.1.2435.2.4.3.99.3.1.6.1.2.2 = STRING: "SERIAL=\"******************\""
iso.3.6.1.4.1.2435.2.4.3.99.3.1.6.1.2.3 = STRING: "SPEC=\"0102\""
iso.3.6.1.4.1.2435.2.4.3.99.3.1.6.1.2.4 = STRING: "DEMOID=\"?\""
iso.3.6.1.4.1.2435.2.4.3.99.3.1.6.1.2.5 = STRING: "FONT=\"?\""
iso.3.6.1.4.1.2435.2.4.3.99.3.1.6.1.2.6 = STRING: "FIRMID=\"MAIN\""
iso.3.6.1.4.1.2435.2.4.3.99.3.1.6.1.2.7 = STRING: "FIRMVER=\"1.23\""
iso.3.6.1.4.1.2435.2.4.3.99.3.1.6.1.2.8 = STRING: "FIRMID=\"SUB1\""
iso.3.6.1.4.1.2435.2.4.3.99.3.1.6.1.2.9 = STRING: "FIRMVER=\"1.11\""
iso.3.6.1.4.1.2435.2.4.3.99.3.1.6.1.2.10 = STRING: "
                                                    "
iso.3.6.1.4.1.2435.2.4.3.99.3.1.6.1.2.11 = STRING: "
                                                    "
iso.3.6.1.4.1.2435.2.4.3.99.3.1.6.1.2.12 = STRING: "
                                                    "
iso.3.6.1.4.1.2435.2.4.3.99.3.1.6.1.2.13 = STRING: "
                                                    "
iso.3.6.1.4.1.2435.2.4.3.99.3.1.6.1.2.14 = STRING: "
                                                    "
iso.3.6.1.4.1.2435.2.4.3.99.3.1.6.1.2.15 = STRING: "
                                                    "
iso.3.6.1.4.1.2435.2.4.3.99.3.1.6.1.2.16 = STRING: "
                                                    "

This leaves the tool unable to find its firmware:

$ brother_printer_fwupd -p $IP_ADDRESS --os LINUX
[i] Querying printer info via SNMP.
[i]  Detected HL-L2360D series with following firmware version(s): MAIN @ 1.23, SUB1 @ 1.11
[i] Querying firmware download URL from Brother update API.
[!] Did not receive download url for MAIN.
[!] Either this firmware part is up to date or there is a bug.
[!] This is the response of Brother's update API:
[!] <?xml version="1.0" encoding="UTF-8" ?><RESPONSEINFO></RESPONSEINFO>
[!] Did not receive download url for SUB1.
[!] Either this firmware part is up to date or there is a bug.
[!] This is the response of Brother's update API:
[!] <?xml version="1.0" encoding="UTF-8" ?><RESPONSEINFO></RESPONSEINFO>

If I override the MODEL value to simply HL-L2360D, or to HL-L2360DW, it gets slightly further, but with an unexpected VERSIONCHECK=2:

[i] Querying printer info via SNMP.
[i]  Detected HL-L2360DW with following firmware version(s): MAIN @ 1.23, SUB1 @ 1.11
[i] Querying firmware download URL from Brother update API.
[!] Unknown versioncheck response for firmid='MAIN'.
[!] There seems to be a bug. Open an issue!
[!] This is the response of Brother's update API:
[!] <?xml version="1.0" encoding="UTF-8" ?><RESPONSEINFO><FIRMUPDATEINFO><VERSIONCHECK>2</VERSIONCHECK></FIRMUPDATEINFO></RESPONSEINFO>
[!] Unknown versioncheck response for firmid='SUB1'.
[!] There seems to be a bug. Open an issue!
[!] This is the response of Brother's update API:
[!] <?xml version="1.0" encoding="UTF-8" ?><RESPONSEINFO><FIRMUPDATEINFO><VERSIONCHECK>2</VERSIONCHECK></FIRMUPDATEINFO></RESPONSEINFO>

I know that newer versions of the firmware (1.36/1.12) exist thanks to https://support.brother.com/g/b/downloadlist.aspx?c=ca&lang=en&prod=hll2360dw_us&os=10068

@dlenski
Copy link
Contributor Author

dlenski commented Apr 26, 2024

For what it's worth, I'm using an old version of the tool, 332eb4f, because I'm on an old version of Python, but there don't seem to be any recent changes that would affect its ability to find the firmware for this printer… unless it needs some crazy hack akin to 565ef03 😅

@dlenski
Copy link
Contributor Author

dlenski commented Apr 26, 2024

there don't seem to be any recent changes that would affect its ability to find the firmware for this printer… unless it needs some crazy hack akin to 565ef03 😅

Should've tested it first. Yes, indeed, the misspelling-based "fixes" from 565ef03 / #19 do indeed resolve this, and allow me to update the firmware successfully. 😵

@dlenski
Copy link
Contributor Author

dlenski commented Apr 26, 2024

Yes, indeed, the misspelling-based "fixes" from 565ef03 / #19 do indeed resolve this, and allow me to update the firmware successfully. 😵

Perhaps apply_mfc_l3750cdw_hack deserves a more generic name now 😭

@dlenski dlenski mentioned this issue Apr 26, 2024
@sedrubal
Copy link
Owner

Thanks for your report and for digging into it. I'll rename the function 😉 Is there a reason why you're stuck to an old version of Python? I think the minimum Python version is quite an arbitrary decision and we can support older versions again if required.

@dlenski
Copy link
Contributor Author

dlenski commented Apr 28, 2024

Is there a reason why you're stuck to an old version of Python?

Running an older Linux distribution (Ubuntu 20.04) and generally being a fan of the traditional Debian-based distros’ approach to packaging Python ("only install one copy of anything").

I think the minimum Python version is quite an arbitrary decision and we can support older versions again if required.

Cool! Adding some CI to verify that the code builds and runs with older versions would be a good way to get fast feedback on things that've broken older versions.

You can see how I do things in some of my Python projects with Github-CI, like https://github.com/dlenski/python-vipaccess/blob/master/.github/workflows/test_and_release.yml#L14

dlenski added a commit to dlenski/brother_printer_fwupd that referenced this issue Apr 28, 2024
This requires using  and  rather than , and not using subscripted Python
type objects.  See discussion at
sedrubal#20 (comment).
dlenski added a commit to dlenski/brother_printer_fwupd that referenced this issue Apr 28, 2024
This requires using `Union` and `Optional` rather than `|`, and not using
subscripted Python type objects.  See discussion at
sedrubal#20 (comment).
dlenski added a commit to dlenski/brother_printer_fwupd that referenced this issue Apr 28, 2024
This requires using `Union` and `Optional` rather than `|`, and not using
subscripted Python type objects.  See discussion at
sedrubal#20 (comment).
dlenski added a commit to dlenski/brother_printer_fwupd that referenced this issue Apr 28, 2024
This requires using `Union` and `Optional` rather than `|`, and not using
subscripted Python type objects.  See discussion at
sedrubal#20 (comment).
dlenski added a commit to dlenski/oh-brother that referenced this issue Apr 28, 2024
This requires using `Union` and `Optional` rather than `|`, and not using
subscripted Python type objects.  See discussion at
sedrubal/brother_printer_fwupd#20 (comment).
dlenski added a commit to dlenski/brother_printer_fwupd that referenced this issue May 1, 2024
This requires using `Union` and `Optional` rather than `|`, and not using
subscripted Python type objects.  See discussion at
sedrubal#20 (comment).
sedrubal added a commit that referenced this issue May 5, 2024
…log messages

See #20
This hack is required not only for MFC L3750 CDW but also for other
models, like HL-L2360DW
dlenski added a commit to dlenski/brother_printer_fwupd that referenced this issue May 8, 2024
This requires using `Union` and `Optional` rather than `|`, and not using
subscripted Python type objects.  See discussion at
sedrubal#20 (comment).
dlenski added a commit to dlenski/brother_printer_fwupd that referenced this issue May 8, 2024
This requires using `Union` and `Optional` rather than `|`, and not using
subscripted Python type objects.  See discussion at
sedrubal#20 (comment).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants