LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-19-2016, 06:43 PM   #31
eocanha
LQ Newbie
 
Registered: Feb 2016
Posts: 2

Rep: Reputation: Disabled

Quote:
Originally Posted by ransur0t View Post
I tried modifying your script for the ghost scanner (scanimage -L returns the culprit "device `hpaio:/net/Deskjet_3050_J610_series?zc=hp-printer' is a Hewlett-Packard Deskjet_3050_J610_series all-in-one"), using the string <Deskjet_3050_J610>, but the terminal does not return anything after executing the script.

I saved it as .sh file, and chmod +x. Am I doing something wrong?
I think you did it right. You can copy-paste the script in the console, or save it to an sh file and run it later. In this case, better start the file with the "#!/bin/bash" line (without the quotes).

About why it didn't return any result for you, I would try to look for simpler words in lowercase ("grep -i" is case insensitive) and avoid special characters (like underscore "_"). For instance, change the first line of the script to any of these ones:

grep -i "deskjet" $(
grep -i "3050" $(
grep -i "j610" $(

If that doesn't return any result, you still can try to have a look to the whole (large!) list of files opened by scanimage and see if any of them draws your attention:

Code:
 for i in $(strace -f scanimage -L 2>&1 | grep 'open(' | sed 's/^[^"]*"//' | sed 's/"[^"]*$//')
 do
  if [ -f $i ]
  then
   echo $i
  fi
 done
Good luck.
 
Old 05-19-2016, 08:52 PM   #32
ransur0t
LQ Newbie
 
Registered: May 2016
Posts: 4

Rep: Reputation: Disabled
Quote:
About why it didn't return any result for you, I would try to look for simpler words in lowercase ("grep -i" is case insensitive) and avoid special characters (like underscore "_"). For instance, change the first line of the script to any of these ones:

grep -i "deskjet" $(
grep -i "3050" $(
grep -i "j610" $(
Thanks, I will tinker with query to see if I can nail down some results!

Kind Regards,
 
Old 05-20-2016, 12:09 PM   #33
ransur0t
LQ Newbie
 
Registered: May 2016
Posts: 4

Rep: Reputation: Disabled
Quote:
The script runs "scanimage -L" with strace (a tool to trace all the system calls) and filters only those calls that open files. Then it filters only "regular files" (not device files in /dev).
When coming back to your script after a few hours break, I realized that I may not have the strace tool installed on my Debian stretch laptop system! A quick check in synaptic and an apt-get install strace, followed by executing the script using j610 yielded these results:

Code:
~$ ./hpscanner_ghost.sh 
/usr/share/hplip/data/models/models.dat:[deskjet_3050_j610_series]
/usr/share/hplip/data/models/models.dat:model1=HP Deskjet 3050 J610 series
/usr/share/hplip/data/models/models.dat:[deskjet_3050_j610_series]
/usr/share/hplip/data/models/models.dat:model1=HP Deskjet 3050 J610 series
/usr/share/hplip/data/models/models.dat:[deskjet_3050_j610_series]
/usr/share/hplip/data/models/models.dat:model1=HP Deskjet 3050 J610 series
Taking a look at "/usr/share/hplip/data/models/models.dat reveals only one entry for the model ...

Not sure what to do next ...!
 
Old 06-01-2016, 11:00 AM   #34
ransur0t
LQ Newbie
 
Registered: May 2016
Posts: 4

Rep: Reputation: Disabled
So, turns out both scanner entries for the HP-3050-J610a function when selected in Simple Scan or Xsane apps ... not sure why the duplicate device, but either one works, so I suppose I can deal with the minor annoyance of the same scanner listed twice!
 
  


Reply

Tags
sane device scanner port


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] HP CM 2320 fxi scanner and sane - sudden no device detected thecarpy Linux - Hardware 3 03-23-2011 02:46 PM
usb scanner premissions issue when running sane-find-scanner vlsd Linux - Hardware 4 08-20-2009 03:20 PM
sane /dev/scanner? jeru Linux - Hardware 3 10-22-2004 10:28 PM
sane over network - can't find scanner Smerk Linux - Networking 1 07-18-2004 04:56 AM
Help with SANE, parallel scanner sb73542 Linux - Software 0 07-31-2003 10:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:46 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration