Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

<< WAIT >>


computers / alt.os.linux.mageia / Brother printer install script

SubjectAuthor
* Brother printer install scriptGrimble
+* Re: Brother printer install scriptWilliam Unruh
|`* Re: Brother printer install scriptGrimble
| +* Re: Brother printer install scriptWilliam Unruh
| |`- Re: Brother printer install scriptBit Twister
| `- Re: Brother printer install scriptBit Twister
`* Re: Brother printer install scriptBit Twister
 `* Re: Brother printer install scriptGrimble
  `- Re: Brother printer install scriptBit Twister

1
Brother printer install script

<t2cfne$dgl$1@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=4609&group=alt.os.linux.mageia#4609

 copy link   Newsgroups: alt.os.linux.mageia
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: grim...@nomail.afraid.org (Grimble)
Newsgroups: alt.os.linux.mageia
Subject: Brother printer install script
Date: Sun, 3 Apr 2022 16:50:30 +0100
Organization: A noiseless patient Spider
Lines: 12
Message-ID: <t2cfne$dgl$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 3 Apr 2022 15:50:06 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="841457e4c6870c5b4e3f47413f0f937e";
logging-data="13845"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+lBFado6lZ4GluRw+wwAxh"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
Thunderbird/91.7.0
Cancel-Lock: sha1:8nQwJ93+NnT6QmeP7bDU8bNp6no=
Content-Language: en-GB
 by: Grimble - Sun, 3 Apr 2022 15:50 UTC

I found the various posts in "Upgrading" very interesting, especially
with the "Expect" application. I started to build a script to install my
Brother printers but ran up against a "downloadend" redirection problem.
I copied the URL for the driver install tool, which works well enough
when executed from the Brother support page, but doesn't work when
executed from a wget or curl command inside a script. Played around with
--max-redirect (wget) and -L -J -O options (curl) but no success.
Suggestions please.
--
Grimble
Machine 'Haydn' running Plasma 5.20.4 on 5.15.28-desktop-1.mga8 kernel.
Mageia release 8 (Official) for x86_64

Re: Brother printer install script

<t2cglv$sau$1@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=4610&group=alt.os.linux.mageia#4610

 copy link   Newsgroups: alt.os.linux.mageia
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: unr...@invalid.ca (William Unruh)
Newsgroups: alt.os.linux.mageia
Subject: Re: Brother printer install script
Date: Sun, 3 Apr 2022 16:06:23 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 17
Message-ID: <t2cglv$sau$1@dont-email.me>
References: <t2cfne$dgl$1@dont-email.me>
Injection-Date: Sun, 3 Apr 2022 16:06:23 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="540802b1c750d45aca14c8b303ac419d";
logging-data="29022"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18o7sqnC0AwFYcIqG4MJcJW"
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:ZXxRBkSX3nKWD4gIPuSM0cP5ygs=
 by: William Unruh - Sun, 3 Apr 2022 16:06 UTC

On 2022-04-03, Grimble <grimble@nomail.afraid.org> wrote:
> I found the various posts in "Upgrading" very interesting, especially
> with the "Expect" application. I started to build a script to install my
> Brother printers but ran up against a "downloadend" redirection problem.
> I copied the URL for the driver install tool, which works well enough
> when executed from the Brother support page, but doesn't work when
> executed from a wget or curl command inside a script. Played around with
> --max-redirect (wget) and -L -J -O options (curl) but no success.
> Suggestions please.

Why would you not include the actual command from the script so we could
see whether or not you had some error it, or to see if we could fix the
problem.?
And does wget or curl put out any error messages? Or do you dump the
error messages to /dev/null (bad idea if you do while you are
debugging).

Re: Brother printer install script

<slrnt4jore.tg13.BitTwister@wb.home.test>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=4611&group=alt.os.linux.mageia#4611

 copy link   Newsgroups: alt.os.linux.mageia
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: BitTwis...@mouse-potato.com (Bit Twister)
Newsgroups: alt.os.linux.mageia
Subject: Re: Brother printer install script
Date: Sun, 3 Apr 2022 13:11:55 -0500
Organization: A noiseless patient Spider
Lines: 143
Message-ID: <slrnt4jore.tg13.BitTwister@wb.home.test>
References: <t2cfne$dgl$1@dont-email.me>
Injection-Info: reader02.eternal-september.org; posting-host="3c10f84003223e7d6fe8a48d2ff4b272";
logging-data="24411"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19yl95agr6sH/cd8D0KVgHj201vmEX8b5w="
User-Agent: slrn/pre1.0.4-6 (Linux)
Cancel-Lock: sha1:awhwwqHom13KjrmJHtAs1mWyZQ4=
 by: Bit Twister - Sun, 3 Apr 2022 18:11 UTC

On Sun, 3 Apr 2022 16:50:30 +0100, Grimble wrote:
> I found the various posts in "Upgrading" very interesting, especially
> with the "Expect" application. I started to build a script to install my
> Brother printers but ran up against a "downloadend" redirection problem.
> I copied the URL for the driver install tool, which works well enough
> when executed from the Brother support page, but doesn't work when
> executed from a wget or curl command inside a script. Played around with
> --max-redirect (wget) and -L -J -O options (curl) but no success.
> Suggestions please.

Your description is vague as to exactly what is done where with what.

My printer scripts pull down the brother install script, disable all package
managers except urpmi, install rpms that brother needs, remove any brother rpms, then unpack, run the brother install script via expect and
re-enable other package managers upon script exit.

I got a log of rpms installed by using the "script" command. Example:
script -c " linux-brprinter-installer HL-L2380DW" printer_install.log
the very first time I did the install.

printer_install.log has a copy of all output sent to terminal/screen.

urpmi has a "feature" where if you try in install an already installed
rpm it removes the rpm name from a urpm list and gives some message about
not doing something about rpm update. Since it has been years since I saw
the message I can not remember it or the file you need to add the rpm
back into. I put a wrapper around urpmi to not install a rpm already
installed to not have the "feature" helping me into the ditch at a latter date.

David W. Hodgins gave me the file name needing repair but I lost/forgot it.

As to my wget arguments here is a snippet from my pull_printer script

_app=pull_printer

_app_dir=/var/local/data/$_app
_index_fn=$_app.index
_wget_args="--timeout=10 --quiet --no-remove-listing --output-document=$_index_fn"
_wget_fn="$_app_dir/${_app}.wget.files"

_hll2380dw_url='https://support.brother.com/g/b/downloadlist.aspx?c=us&lang=en&prod=hll2380dw_us_as&os=127'

wget $_wget_args" $_hll2380dw_url $_wget_fn

#*********************** end snippet*****************************

To get url I navigated to my printer page and copied url into my script

Note to expect users. If you run "autoexpect commands/args"
it generates an expect script for you with the the exact output.

If the verbiage ever changes the script will hang or fail. What I do
is cut out the general verbiage and modify the script to ignore verbiage.

Script answers n for test print and y to everything else.

see attached expect script
----8<----8<----8<----8--cut below this line--8<----8<<
#!/usr/bin/expect -f
# # This Expect script was generated by autoexpect on Thu Jun 11 03:38:57 2020
# Expect and autoexpect were both written by Don Libes, NIST.
# # Note that autoexpect does not guarantee a working script. It
# necessarily has to guess about certain things. Two reasons a script
# might fail are:
# # 1) timing - A surprising number of programs (rn, ksh, zsh, telnet,
# etc.) and devices discard or ignore keystrokes that arrive "too
# quickly" after prompts. If you find your new script hanging up at
# one spot, try adding a short sleep just before the previous send.
# Setting "force_conservative" to 1 (see below) makes Expect do this
# automatically - pausing briefly before sending each character. This
# pacifies every program I know of. The -c flag makes the script do
# this in the first place. The -C flag allows you to define a
# character to toggle this mode off and on.

set force_conservative 1 ;# set to 1 to force conservative mode even if
;# script wasn't run conservatively originally
if {$force_conservative} {
set send_slow {1 .1}
proc send {ignore arg} {
sleep .1
exp_send -s -- $arg
}
}

#
# 2) differing output - Some programs produce different output each time
# they run. The "date" command is an obvious example. Another is
# ftp, if it produces throughput statistics at the end of a file
# transfer. If this causes a problem, delete these patterns or replace
# them with wildcards. An alternative is to use the -p flag (for
# "prompt") which makes Expect only look for the last line of output
# (i.e., the prompt). The -P flag allows you to define a character to
# toggle this mode off and on.
# # Read the man page for more info.
# # -Don

set timeout 35
spawn bash linux-brprinter-installer HL-L2380DW
match_max 100000

expect {

-re "Test Print" {
send -- "n\r"
exp_continue
}

-re "destination Device URI." {
send -- "I\r"
exp_continue
}

-re "enter IP address" {
send -- "192.168.11.190\r"
exp_continue
}

-re "y/N" {
send -- "y\r"
exp_continue
}

-re "Y/n" {
send -- "y\r"
exp_continue
}

-re "OK?" {
send -- "y\r"
exp_continue
}

}
expect eof
#*********************** end of expect script above this line ********

Re: Brother printer install script

<t2f2h4$cl1$1@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=4613&group=alt.os.linux.mageia#4613

 copy link   Newsgroups: alt.os.linux.mageia
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: grim...@nomail.afraid.org (Grimble)
Newsgroups: alt.os.linux.mageia
Subject: Re: Brother printer install script
Date: Mon, 4 Apr 2022 16:23:41 +0100
Organization: A noiseless patient Spider
Lines: 31
Message-ID: <t2f2h4$cl1$1@dont-email.me>
References: <t2cfne$dgl$1@dont-email.me> <t2cglv$sau$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 4 Apr 2022 15:23:16 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="d4e59cfb717e3db94e686cfabe488856";
logging-data="12961"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+0yIw0CdLWPG8DLFGEboBx"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
Thunderbird/91.7.0
Cancel-Lock: sha1:QiqJjaEAckXpWNjAJ3V4ReTiZ+k=
In-Reply-To: <t2cglv$sau$1@dont-email.me>
Content-Language: en-GB
 by: Grimble - Mon, 4 Apr 2022 15:23 UTC

On 03/04/2022 17:06, William Unruh wrote:
> On 2022-04-03, Grimble <grimble@nomail.afraid.org> wrote:
>> I found the various posts in "Upgrading" very interesting, especially
>> with the "Expect" application. I started to build a script to install my
>> Brother printers but ran up against a "downloadend" redirection problem.
>> I copied the URL for the driver install tool, which works well enough
>> when executed from the Brother support page, but doesn't work when
>> executed from a wget or curl command inside a script. Played around with
>> --max-redirect (wget) and -L -J -O options (curl) but no success.
>> Suggestions please.
>
> Why would you not include the actual command from the script so we could
> see whether or not you had some error it, or to see if we could fix the
> problem.?
> And does wget or curl put out any error messages? Or do you dump the
> error messages to /dev/null (bad idea if you do while you are
> debugging).
>
If I right click on Driver Support Tool in the Brother Support Downloads
page and copy link address, I get
https://support.brother.com/g/b/branch/downloadend.aspx?c=gb&lang=en&prod=hll2360dn_eu_as&os=127&dlid=dlf006893_000&flang=4&type3=625

When executed from the script I was developing, it creates a text file
called "downloadend", which cannot be executed to install any drivers.
Googling around, I thought some redirection was involved. within the HTML.
It is significantly different from the URL that Bit uses in his post.

--
Grimble
Machine 'Haydn' running Plasma 5.20.4 on 5.15.28-desktop-1.mga8 kernel.
Mageia release 8 (Official) for x86_64

Re: Brother printer install script

<t2f32u$hq3$1@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=4614&group=alt.os.linux.mageia#4614

 copy link   Newsgroups: alt.os.linux.mageia
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: grim...@nomail.afraid.org (Grimble)
Newsgroups: alt.os.linux.mageia
Subject: Re: Brother printer install script
Date: Mon, 4 Apr 2022 16:33:10 +0100
Organization: A noiseless patient Spider
Lines: 36
Message-ID: <t2f32u$hq3$1@dont-email.me>
References: <t2cfne$dgl$1@dont-email.me>
<slrnt4jore.tg13.BitTwister@wb.home.test>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 4 Apr 2022 15:32:46 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="d4e59cfb717e3db94e686cfabe488856";
logging-data="18243"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19QutMVt18rIbgbdA8nQn1o"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
Thunderbird/91.7.0
Cancel-Lock: sha1:mf3yStR7XjGGB9bWmxGB3jkVj3M=
In-Reply-To: <slrnt4jore.tg13.BitTwister@wb.home.test>
Content-Language: en-GB
 by: Grimble - Mon, 4 Apr 2022 15:33 UTC

On 03/04/2022 19:11, Bit Twister wrote:
> On Sun, 3 Apr 2022 16:50:30 +0100, Grimble wrote:
>> I found the various posts in "Upgrading" very interesting, especially
>> with the "Expect" application. I started to build a script to install my
>> Brother printers but ran up against a "downloadend" redirection problem.
>> I copied the URL for the driver install tool, which works well enough
>> when executed from the Brother support page, but doesn't work when
>> executed from a wget or curl command inside a script. Played around with
>> --max-redirect (wget) and -L -J -O options (curl) but no success.
>> Suggestions please.
>
>
> Your description is vague as to exactly what is done where with what.
>
> My printer scripts pull down the brother install script, disable all package
> managers except urpmi, install rpms that brother needs, remove any brother rpms, then unpack, run the brother install script via expect and
> re-enable other package managers upon script exit.
>
> I got a log of rpms installed by using the "script" command. Example:
> script -c " linux-brprinter-installer HL-L2380DW" printer_install.log
> the very first time I did the install.
>
> printer_install.log has a copy of all output sent to terminal/screen.
>
<snip>
Summary reply: As usual your replies are informative - didn't know about
the script command.
The URL you used is very different from the one I found (see reply to
William). I'll use it as a basis for my script.
Thanks for the expect snippet; I'll build it in.

--
Grimble
Machine 'Haydn' running Plasma 5.20.4 on 5.15.28-desktop-1.mga8 kernel.
Mageia release 8 (Official) for x86_64

Re: Brother printer install script

<slrnt4m7mn.17imc.BitTwister@wb.home.test>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=4615&group=alt.os.linux.mageia#4615

 copy link   Newsgroups: alt.os.linux.mageia
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: BitTwis...@mouse-potato.com (Bit Twister)
Newsgroups: alt.os.linux.mageia
Subject: Re: Brother printer install script
Date: Mon, 4 Apr 2022 11:37:40 -0500
Organization: A noiseless patient Spider
Lines: 52
Message-ID: <slrnt4m7mn.17imc.BitTwister@wb.home.test>
References: <t2cfne$dgl$1@dont-email.me>
<slrnt4jore.tg13.BitTwister@wb.home.test> <t2f32u$hq3$1@dont-email.me>
Injection-Info: reader02.eternal-september.org; posting-host="6926b49cb5e49a2f00de8cae011d0234";
logging-data="20264"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+lijfZl1pODb5mi4iQRYr+/niPZ0D6pa8="
User-Agent: slrn/pre1.0.4-6 (Linux)
Cancel-Lock: sha1:nhuVSbwfeGM6tY37VHj6TaHoBYI=
 by: Bit Twister - Mon, 4 Apr 2022 16:37 UTC

On Mon, 4 Apr 2022 16:33:10 +0100, Grimble wrote:
> On 03/04/2022 19:11, Bit Twister wrote:
>> On Sun, 3 Apr 2022 16:50:30 +0100, Grimble wrote:
>>> I found the various posts in "Upgrading" very interesting, especially
>>> with the "Expect" application. I started to build a script to install my
>>> Brother printers but ran up against a "downloadend" redirection problem.
>>> I copied the URL for the driver install tool, which works well enough
>>> when executed from the Brother support page, but doesn't work when
>>> executed from a wget or curl command inside a script. Played around with
>>> --max-redirect (wget) and -L -J -O options (curl) but no success.
>>> Suggestions please.
>>
>>
>> Your description is vague as to exactly what is done where with what.
>>
>> My printer scripts pull down the brother install script, disable all package
>> managers except urpmi, install rpms that brother needs, remove any brother rpms, then unpack, run the brother install script via expect and
>> re-enable other package managers upon script exit.
>>
>> I got a log of rpms installed by using the "script" command. Example:
>> script -c " linux-brprinter-installer HL-L2380DW" printer_install.log
>> the very first time I did the install.
>>
>> printer_install.log has a copy of all output sent to terminal/screen.
>>
><snip>
> Summary reply: As usual your replies are informative - didn't know about
> the script command.
> The URL you used is very different from the one I found (see reply to
> William). I'll use it as a basis for my script.

Yup, I think I placed my mouse over the install script selection and right clicked
to save url used in my scrit. Using firefox as browser.That link gets me a zipped file.

> Thanks for the expect snippet; I'll build it in.

I would guess all you need to change is model number and printer IP to
whatever you would normally enter.

To keep form having to modify the install_printer and or expect script I
create a link where needed. For example my install script does a:

ln -sf linux-brprinter-installer* linux-brprinter-installer

because Brother had/has the new version number on the executable name. :(

FYI: list of package managers I to have disable/enable on my system.
_pkg_mgrs="/usr/bin/dpkg /usr/bin/dnf /usr/bin/yum"

Otherwise the brother installer script will pick one that I do not use.

Re: Brother printer install script

<t2f702$g1k$1@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=4616&group=alt.os.linux.mageia#4616

 copy link   Newsgroups: alt.os.linux.mageia
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: unr...@invalid.ca (William Unruh)
Newsgroups: alt.os.linux.mageia
Subject: Re: Brother printer install script
Date: Mon, 4 Apr 2022 16:39:31 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 37
Message-ID: <t2f702$g1k$1@dont-email.me>
References: <t2cfne$dgl$1@dont-email.me> <t2cglv$sau$1@dont-email.me>
<t2f2h4$cl1$1@dont-email.me>
Injection-Date: Mon, 4 Apr 2022 16:39:31 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="ac88209ab437a2e9d2ba29b2ed3862b3";
logging-data="16436"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19lJoj1AP55rjP9/PIUvvGJ"
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:etvcx5+r4pswtm7M4hLeqasGS2I=
 by: William Unruh - Mon, 4 Apr 2022 16:39 UTC

On 2022-04-04, Grimble <grimble@nomail.afraid.org> wrote:
> On 03/04/2022 17:06, William Unruh wrote:
>> On 2022-04-03, Grimble <grimble@nomail.afraid.org> wrote:
>>> I found the various posts in "Upgrading" very interesting, especially
>>> with the "Expect" application. I started to build a script to install my
>>> Brother printers but ran up against a "downloadend" redirection problem.
>>> I copied the URL for the driver install tool, which works well enough
>>> when executed from the Brother support page, but doesn't work when
>>> executed from a wget or curl command inside a script. Played around with
>>> --max-redirect (wget) and -L -J -O options (curl) but no success.
>>> Suggestions please.
>>
>> Why would you not include the actual command from the script so we could
>> see whether or not you had some error it, or to see if we could fix the
>> problem.?
>> And does wget or curl put out any error messages? Or do you dump the
>> error messages to /dev/null (bad idea if you do while you are
>> debugging).
>>
> If I right click on Driver Support Tool in the Brother Support Downloads
> page and copy link address, I get
> https://support.brother.com/g/b/branch/downloadend.aspx?c=gb&lang=en&prod=hll2360dn_eu_as&os=127&dlid=dlf006893_000&flang=4&type3=625
>
> When executed from the script I was developing, it creates a text file
Well yes, it is NOT a download site. It is page which asks you to click
to agree to the license and then it lets you download.

No redirection. Just a click button to agree to the license.
Try
https://download.brother.com/welcome/dlf006893/linux-brprinter-installer-2.2.3-1.gz
which is the where that button takes you.

> called "downloadend", which cannot be executed to install any drivers.
> Googling around, I thought some redirection was involved. within the HTML.
> It is significantly different from the URL that Bit uses in his post.
>

Re: Brother printer install script

<slrnt4m86s.17imc.BitTwister@wb.home.test>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=4617&group=alt.os.linux.mageia#4617

 copy link   Newsgroups: alt.os.linux.mageia
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: BitTwis...@mouse-potato.com (Bit Twister)
Newsgroups: alt.os.linux.mageia
Subject: Re: Brother printer install script
Date: Mon, 4 Apr 2022 11:46:17 -0500
Organization: A noiseless patient Spider
Lines: 33
Message-ID: <slrnt4m86s.17imc.BitTwister@wb.home.test>
References: <t2cfne$dgl$1@dont-email.me> <t2cglv$sau$1@dont-email.me>
<t2f2h4$cl1$1@dont-email.me>
Injection-Info: reader02.eternal-september.org; posting-host="6926b49cb5e49a2f00de8cae011d0234";
logging-data="20264"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18J66AMFulwjXMf0DXaLszQFrYrYpmeY8U="
User-Agent: slrn/pre1.0.4-6 (Linux)
Cancel-Lock: sha1:pdUfVL3PKyxGuB2UbcR94itdZxs=
 by: Bit Twister - Mon, 4 Apr 2022 16:46 UTC

On Mon, 4 Apr 2022 16:23:41 +0100, Grimble wrote:
> On 03/04/2022 17:06, William Unruh wrote:
>> On 2022-04-03, Grimble <grimble@nomail.afraid.org> wrote:
>>> I found the various posts in "Upgrading" very interesting, especially
>>> with the "Expect" application. I started to build a script to install my
>>> Brother printers but ran up against a "downloadend" redirection problem.
>>> I copied the URL for the driver install tool, which works well enough
>>> when executed from the Brother support page, but doesn't work when
>>> executed from a wget or curl command inside a script. Played around with
>>> --max-redirect (wget) and -L -J -O options (curl) but no success.
>>> Suggestions please.
>>
>> Why would you not include the actual command from the script so we could
>> see whether or not you had some error it, or to see if we could fix the
>> problem.?
>> And does wget or curl put out any error messages? Or do you dump the
>> error messages to /dev/null (bad idea if you do while you are
>> debugging).
>>
> If I right click on Driver Support Tool in the Brother Support Downloads
> page and copy link address, I get
> https://support.brother.com/g/b/branch/downloadend.aspx?c=gb&lang=en&prod=hll2360dn_eu_as&os=127&dlid=dlf006893_000&flang=4&type3=625
>
> When executed from the script I was developing, it creates a text file
> called "downloadend", which cannot be executed to install any drivers.
> Googling around, I thought some redirection was involved. within the HTML.
> It is significantly different from the URL that Bit uses in his post.

Me thinks I used the rpm print driver link which would be s
https://support.brother.com/g/b/downloadend.aspx?c=us&lang=en&prod=hll2360dw_us&os=127&dlid=dlf101914_000&flang=4&type3=558

for a us rpm download for your printer.

Re: Brother printer install script

<slrnt4m9qe.17imc.BitTwister@wb.home.test>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=4618&group=alt.os.linux.mageia#4618

 copy link   Newsgroups: alt.os.linux.mageia
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: BitTwis...@mouse-potato.com (Bit Twister)
Newsgroups: alt.os.linux.mageia
Subject: Re: Brother printer install script
Date: Mon, 4 Apr 2022 12:13:46 -0500
Organization: A noiseless patient Spider
Lines: 66
Message-ID: <slrnt4m9qe.17imc.BitTwister@wb.home.test>
References: <t2cfne$dgl$1@dont-email.me> <t2cglv$sau$1@dont-email.me>
<t2f2h4$cl1$1@dont-email.me> <t2f702$g1k$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Info: reader02.eternal-september.org; posting-host="6926b49cb5e49a2f00de8cae011d0234";
logging-data="7179"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19CethT7Sry96tnYTZEkJnnyLRzvL7deoo="
User-Agent: slrn/pre1.0.4-6 (Linux)
Cancel-Lock: sha1:LPohuHZAh8CfxzGZuhF+RSpRt+s=
 by: Bit Twister - Mon, 4 Apr 2022 17:13 UTC

On Mon, 4 Apr 2022 16:39:31 -0000 (UTC), William Unruh wrote:
> On 2022-04-04, Grimble <grimble@nomail.afraid.org> wrote:
>> On 03/04/2022 17:06, William Unruh wrote:
>>> On 2022-04-03, Grimble <grimble@nomail.afraid.org> wrote:
>>>> I found the various posts in "Upgrading" very interesting, especially
>>>> with the "Expect" application. I started to build a script to install my
>>>> Brother printers but ran up against a "downloadend" redirection problem.
>>>> I copied the URL for the driver install tool, which works well enough
>>>> when executed from the Brother support page, but doesn't work when
>>>> executed from a wget or curl command inside a script. Played around with
>>>> --max-redirect (wget) and -L -J -O options (curl) but no success.
>>>> Suggestions please.
>>>
>>> Why would you not include the actual command from the script so we could
>>> see whether or not you had some error it, or to see if we could fix the
>>> problem.?
>>> And does wget or curl put out any error messages? Or do you dump the
>>> error messages to /dev/null (bad idea if you do while you are
>>> debugging).
>>>
>> If I right click on Driver Support Tool in the Brother Support Downloads
>> page and copy link address, I get
>> https://support.brother.com/g/b/branch/downloadend.aspx?c=gb&lang=en&prod=hll2360dn_eu_as&os=127&dlid=dlf006893_000&flang=4&type3=625
>>
>> When executed from the script I was developing, it creates a text file
> Well yes, it is NOT a download site. It is page which asks you to click
> to agree to the license and then it lets you download.
>
>
> No redirection. Just a click button to agree to the license.
> Try
> https://download.brother.com/welcome/dlf006893/linux-brprinter-installer-2.2.3-1.gz
> which is the where that button takes you.

Yep, but now script is tied/hard coded to the version number. :-(

Right clicking on the rpm install gets me
https://support.brother.com/g/b/downloadend.aspx?c=us&lang=en&prod=hll2360dw_us&os=127&dlid=dlf101914_000&flang=4&type3=558

agreement page. Glancing through my pull_printer script ,at the moment I
can not see where the gz get on my machine. All I have is code to compare
wget results to detect a new release is available. Starting to wonder
if I go to brother site and download either my neighbor's or my printer
by hand. If so I'll have to modify this script to either pull the .gz
name from the download page or add the url for download.
I'll find out next time there is a version up. Currently I have

$_http_cmd $_url
if [ $? -ne 0 ] ; then
mail -s "$_app: wget rtn code $?" root < /dev/null
fi
#****************************************
#* remove control chars and html brackets
#****************************************

tr -d ’\015’\033 < pull_printer.index > $_listing_fn
tr '\[\]*<>"\r' ' ' < $_listing_fn > $_index_fn

diff -bBw $_ref_fn $_index_fn > $_diff_fn
if [ $? -ne 0 ] ; then
mail -s "$_app: new updates for ${_who}'s printer" root < $_diff_fn
cp --force $_index_fn $_ref_fn
sleep 2
fi

1
server_pubkey.txt

rocksolid light 0.9.7
clearnet tor