SANE and HP scanjet 5300C - Mint 19.1

Forum rules
Before you post please read this
Post Reply
rjolbrich
Level 1
Level 1
Posts: 7
Joined: Fri Dec 28, 2018 11:13 pm

SANE and HP scanjet 5300C - Mint 19.1

Post by rjolbrich »

Hello,
I'm having trouble getting any scan app working with my HP 5300C.
SANE recognizes the 5300C. I can start xsane and the GUI appears.
However, I get the following:

XSANE: Error while loading device settings
$home/.sane/xsane/Hewlett-Packard:Scanjet5300C.drc is not a device-rc file!!!
I click scan and the scanner hums for a second and stops.
I do see this file (edit: at first I did not but it was a hidden file).
Is this proper? should it be .drc or .rc ?


I've also tried xscanimage and simple-scan. GUI's come up, but no scan is started.

Thanks
User avatar
ClixTrix
Level 6
Level 6
Posts: 1069
Joined: Wed Dec 09, 2015 11:40 am
Location: Columbus, Ohio, USA

Re: SANE and HP scanjet 5300C - Mint 19.1

Post by ClixTrix »

I had an old USB Cannon scanner years ago that wouldn't work without permissions. Think I remember what I did.....

Go to Menu Administration - Users and Groups (need to provide your user password on launch). Click on your user account. See the Groups at bottom right of that Window. Click on the list to right of groups. On the popup, locate "scanner" on the list (scroll down) and add check on that item and OK and then close the Window. You might need to logoff and logon (or reboot).
Linux Mint 19.2 x64 Cinnamon 4.15.0-118-generic
Gigabyte GA-AB350M-D3H (F20) / Ryzen 5 1600 / Micron Ballistix Sport DDR4 2400 2x8GB / Sapphire Radeon HD6450
NVMe-SSD: Samsung 960 EVO 250GB / SATA-SSD: Samsung 850 EVO 250GB + Toshiba OCZ VX500 512GB
rjolbrich
Level 1
Level 1
Posts: 7
Joined: Fri Dec 28, 2018 11:13 pm

Re: SANE and HP scanjet 5300C - Mint 19.1

Post by rjolbrich »

Hello again,
Go to Menu Administration - Users and Groups (need to provide your user password on launch). Click on your user account. See the Groups at bottom right of that Window. Click on the list to right of groups. On the popup, locate "scanner" on the list (scroll down) and add check on that item and OK and then close the Window. You might need to logoff and logon (or reboot).
No change in behaviour. When I click the scan button in xsane I get a one second "hum" and no scan.
Xscanimage and Simple-scan also fail.
User avatar
ClixTrix
Level 6
Level 6
Posts: 1069
Joined: Wed Dec 09, 2015 11:40 am
Location: Columbus, Ohio, USA

Re: SANE and HP scanjet 5300C - Mint 19.1

Post by ClixTrix »

In looking more closely at the error message and doing some searches, I found your scanner and the error mentioned in this bug report.

https://bugs.launchpad.net/ubuntu/+sour ... +bug/83587

What is suggested is probably correct....the file is missing or corrupt from the ./sane directory in your home folder. Your original question on .rc or .drc: both should be there an xsane.rc and a file specific to the scanner model in the folder with .drc. I'm wondering if the .drc / device rc file is corrupt.

Could be some type of install bug or post-install corruption. Generally, I have little problems with HP scanners/all-in-one.
Linux Mint 19.2 x64 Cinnamon 4.15.0-118-generic
Gigabyte GA-AB350M-D3H (F20) / Ryzen 5 1600 / Micron Ballistix Sport DDR4 2400 2x8GB / Sapphire Radeon HD6450
NVMe-SSD: Samsung 960 EVO 250GB / SATA-SSD: Samsung 850 EVO 250GB + Toshiba OCZ VX500 512GB
rjolbrich
Level 1
Level 1
Posts: 7
Joined: Fri Dec 28, 2018 11:13 pm

Re: SANE and HP scanjet 5300C - Mint 19.1

Post by rjolbrich »

Hello again,
Problem solved! I did some digging around and found I needed to disable
the gamma table with:

option disable-gamma-table

in the config file. Works fine now.
Thanks
mintiscool
Level 1
Level 1
Posts: 7
Joined: Fri Aug 09, 2019 8:04 pm

Re: SANE and HP scanjet 5300C - Mint 19.1

Post by mintiscool »

i have the same scanner. can you walk me through the steps you took to make it work? in the beginning, i have the same issue. simplescan sees the scanner but it doesn't scan. then i installed vuescan and it works, so i can rule out that it's hardware failure. however, after i installed vuescan, simplescan can's recognize the scanner anymore. very baffling.
rjolbrich
Level 1
Level 1
Posts: 7
Joined: Fri Dec 28, 2018 11:13 pm

Re: SANE and HP scanjet 5300C - Mint 19.1

Post by rjolbrich »

Hello,
I got the 5300c to work with SANE by editing \etc\sane.d\avision.conf
It needs two lines (uncommented or added):

option disable-gamma-table
usb libusb 0x03f0 0x0701

I hope that fixes your problem.
mintiscool
Level 1
Level 1
Posts: 7
Joined: Fri Aug 09, 2019 8:04 pm

Re: SANE and HP scanjet 5300C - Mint 19.1

Post by mintiscool »

thanks for the info. i followed your instruction but no luck. to be fair, i'm using 19.2 if that makes any difference. simplescan sees the scanner, but won't scan.
thanks anyway. i think it's time to either buy a cheap dell computer from craigslist or a new scanner.
exohomestead
Level 1
Level 1
Posts: 1
Joined: Sat Oct 12, 2019 9:50 pm

Re: SANE and HP scanjet 5300C - Mint 19.1 - Kali Linux - xsane

Post by exohomestead »

rjolbrich,

Your Aug 15, 2019 9:38 pm solution (edit the avision.conf file) worked perfectly for me. Big thanks for posting your fix. I just uncommented the two lines you mentioned and reboot the OS. Next try with xsane worked fine. Only difference was my config file did not have the "libusb" word on the commented out line, so I did not add it when I UN-commented the line.

Incidentally, my setup is a bit different than Mint. I found your post with a google search. The fix worked on my Kali linux, kali-linux-2019.3-amd64.iso and I run it in VWMare Workstation 14 player. I make the USB ScanJet 5300C available to the VM from the host OS, and after I downloaded (apt-get install) xsane to the Kali distribution, it does great photos. Kali warns about running xsane as root, but so far I haven't had trouble. I mapped a shared directory between Kali and the host Win10, and all my scans now show up where I need them.

I've used Irfanview and the ScanJet 5300C for more than a decade and I want to continue that combination. I haven't seen a better rendition of my photos than the 5300C does, so I'm really happy to have it working again. It worked with WinXP, but has never worked with Win10. Again thank you.
juanca1944
Level 1
Level 1
Posts: 2
Joined: Wed Feb 26, 2020 11:19 pm

Re: SANE and HP scanjet 5300C - Mint 19.1

Post by juanca1944 »

rjolbrich wrote:
Thu Aug 15, 2019 9:38 pm
Hello,
I got the 5300c to work with SANE by editing \etc\sane.d\avision.conf
It needs two lines (uncommented or added):

option disable-gamma-table
usb libusb 0x03f0 0x0701

I hope that fixes your problem.
Hello,
My deepest thanks for your solution, now my 5300C is working like a charm :D , connected to my Raspberry Pi 3 with Raspbian Buster.
Best regards
anirudh_shukla
Level 1
Level 1
Posts: 1
Joined: Tue Aug 25, 2020 10:17 am

Re: SANE and HP scanjet 5300C - Mint 19.1

Post by anirudh_shukla »

Hi... Thank you so much .. This solution worked for me. Had been trying to work it out since a very long time. Thank you very very much Rjolbrich. :)
Post Reply

Return to “Printers & Scanners”