Discussion:
Can't view received faxes..
(too old to reply)
d***@gmail.com
2006-10-14 22:39:46 UTC
Permalink
I just bit the bullet and converted my main machine to Linux.

Most stuff is working pretty good. And I don't receive faxes often, so
this isn't a huge deal, but it's weird.

I am using mgetty+voice (mgetty-voice-1.1.33-3_FC4) and the vgetty
stuff works great and I have the answering machine working. (That was
the important feature.)

So, I thought I'd try faxing, so I sent a fax from work. (From a Canon
ImageRunner fax/copier machine, not from a PC.)
When I send it, I hear the phone ring, I hear my answering message,
then I hear my fax/modem negotiote the connection.
Then the fax sends and it says sent OK.

When I get home, I have a new fax. Some long name (fn5314198S3.01 was
the last one).
But when I click to view it, it says it's not a valid file. I have
tried changing the extension to g3, tiff, gz and nothing can view it.
So, I look in the logs. And I see:
10/14 13:00:39 yS3 1119 lines received, 0 lines bad, 0 bytes lost
In my mind, that looks like it says it's a good receive. But I can't
view that file. I turn the debugs up to 6 and I see more, including a
bunch of this: (I cut out a bunch of the middle, represented by
".........")
------------------------
10/14 12:59:55 yS3 mdm_command: string 'OK' -> OK
10/14 12:59:55 yS3 6681 Mb free on /var/spool/fax/incoming
10/14 12:59:55 yS3 fax_send: 'AT+FDR'
10/14 12:59:55 yS3 fax_wait_for(CONNECT)
10/14 12:59:55 yS3 got:[0a][0d][0a]CONNECT[0d]
10/14 13:00:00 yS3 fax_wait_for: string 'CONNECT'** found **
10/14 13:00:00 yS3 sending DC2
10/14 13:00:00 yS3 6681 Mb free on /var/spool/fax/incoming
10/14 13:00:00 yS3 fax_get_page_data: wait for EOL, got:
[0a][ff][ff][ff][ff][ff][ff][ff][ff][ff][ff][ff][ff][ff][ff][ff][ff]
..................
..................
[ff][ff][ff][ff][ff][ff][ff][ff][ff][ff][ff][ff][ff][ff][ff][ff][ff][ff][ff][ff][ff][fc][00]
10/14 13:00:01 yS3 fax_get_page_data: receiving
/var/spool/fax/incoming/fn5314198S3.01...
10/14 13:00:39 yS3 fax_get_page_data: page end, bytes received: 68340
10/14 13:00:39 yS3 fax_wait_for(OK)
10/14 13:00:39 yS3 got:[0d][0a]+FPS:1,1119,0,0,0[0d]
10/14 13:00:39 yS3 fax_wait_for: string '+FPS:1,1119,0,0,0'
10/14 13:00:39 yS3 page status: +FPS:1,1119,0,0,0
10/14 13:00:39 yS3 1119 lines received, 0 lines bad, 0 bytes lost
10/14 13:00:39 yS3 got:[0a][0d][0a]+FET:2[0d]
10/14 13:00:40 yS3 fax_wait_for: string '+FET:2'
10/14 13:00:40 yS3 got:[0a][0d][0a]OK[0d]
10/14 13:00:40 yS3 fax_wait_for: string 'OK'** found **
10/14 13:00:40 yS3 fax_send: 'AT+FDR'
10/14 13:00:40 yS3 fax_wait_for(CONNECT)
10/14 13:00:40 yS3 got:[0a][0d][0a]+FHS:00[0d]
10/14 13:00:43 yS3 fax_wait_for: string '+FHS:00'
10/14 13:00:43 yS3 connection hangup: '+FHS:00'
10/14 13:00:43 yS3 (Normal and proper end of connection)** found **
10/14 13:00:43 yS3 fax receiver: hangup & end
10/14 13:00:43 yS3 fax_notify_mail: sending mail to: faxadmin
---------------

So, it looks like everything is working, and everything is great, and
both sides agree.

Except, I can't read the files. I'm generally ok with looking for
solutions when I have errors, but this one eludes me.

Any ideas.

Thanx again, desiv

p.s. Modem IDs itself as "U.S. Robotics 56K Voice INT V5.20.1" and
I've read enough in this group to know several of the answers will be
"Get a multitech or X brand modem". If that's the solution, I'll just
use XP in a VM or dual boot to fax, since that works and I don't fax
often. But most of the problems I've seen with USR's involve error
messages at least. :-)
d***@gmail.com
2006-10-14 22:44:08 UTC
Permalink
Post by d***@gmail.com
Except, I can't read the files. I'm generally ok with looking for
solutions when I have errors, but this one eludes me.
p.s. I meant I can't view the files, with kfaxview or tkvoice or with
konquerer. I can "cat" them out and I see a bunch of data in the
files. :-)

desiv
Wouter van Marle
2006-10-15 11:26:47 UTC
Permalink
Post by d***@gmail.com
Post by Wouter van Marle
- viewfax (from the mgetty package), very simple viewer.
- the GIMP also understands g3 fax format.
cat <fax> | g32pbm | pnmtojpeg > fax.jpg
(note: use `g32pbm -s` for normal resolution faxes: begins with fn. Use
the above line for high resolution faxes, name begins with ff).
g3topbm and other converters are in the netpbm package.
Good luck.
Thank you! I tried multiples, so I assumed (I know..) it was the file.
In fact, I had even tried playing with the g32pbm program, but I never
g3topbm: Problem reading Row 2322. Skipping rest of row. bad code
word at Column 1728. No prefix of the 14 bits 0x0 matches any
recognized code word and no code words longer than 12 bits are defined.
Euhm... mind the difference "g32pbm" vs "g3topbm". They are different!
And I just notice that I mixed them up a bit as well in my posting.

I have the same error when running g3topbm; but running g32pbm goes
fine. Apparently there are different g3 formats or so; I don't know;
maybe Gert knows.
Post by d***@gmail.com
Q: Is the stretch / non-stretch thing sending fax specific? i.e. Was
this fax needed to be stretched because of the sending fax machine, or
will my fax modem always create files that need to be stretched?
Not a big deal, because I don't receive faxes often, but I'm just
interested.
Faxes can be sent in two formats: normal resolution and fine resolution.
You can see it on the file name: if it starts with fn you have a normal
resolution fax (that has to be stretched), if it starts with ff you have
a fine resolution fax on your hands. So just have your script look at
the name of the input file, and add the -s switch where necessary.

Wouter.
Post by d***@gmail.com
Thanx again,
Desi
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Gert Doering
2006-10-15 19:59:59 UTC
Permalink
Hi,
Post by Wouter van Marle
Euhm... mind the difference "g32pbm" vs "g3topbm". They are different!
And I just notice that I mixed them up a bit as well in my posting.
I have the same error when running g3topbm; but running g32pbm goes
fine. Apparently there are different g3 formats or so; I don't know;
maybe Gert knows.
Hmmm, occasional bad lines in G3 are pretty normal - every "glitch" on
the phone line is likely to corrupt a bit of the non-error-corrected
fax transmission. OTOH, this will cause a warning, and one line (or
a few lines) of the image will be unreadable - and nothing more.

So "viewfax" etc. should be able to view the resulting files just fine - if
g32pbm can handle them, viewfax should be able to do so as well.

Regarding stretching: g32pbm will do this automatically if called
as "g32pbm fn..." (as opposed to "g32pbm <fn..." - when reading from
stdin, it doesn't know the file name).

gert
--
USENET is *not* the non-clickable part of WWW!
//www.muc.de/~gert/
Gert Doering - Munich, Germany ***@greenie.muc.de
fax: +49-89-35655025 ***@net.informatik.tu-muenchen.de

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
d***@gmail.com
2006-10-16 19:07:27 UTC
Permalink
Yeah, it was definately the difference between the two programs that
bit me, that and the fact that the kfaxview program didn't like the
files. Not sure why, but I don't need that program.
Post by Gert Doering
Hmmm, occasional bad lines in G3 are pretty normal - every "glitch" on
the phone line is likely to corrupt a bit of the non-error-corrected
fax transmission. OTOH, this will cause a warning, and one line (or
a few lines) of the image will be unreadable - and nothing more.
The warning lines just made me assume (bad idea) that the g3topbm
program wasn't working, since neither of my viewers worked.
Post by Gert Doering
So "viewfax" etc. should be able to view the resulting files just fine - if
g32pbm can handle them, viewfax should be able to do so as well.
I'll check out viewfax, it didn't come with my distribution. That's
another problem.

The rpm's that come with my distro linked g3topbm -> g3topbm (That
version of vgetty didn't like my voice modem, so I installed the newer
RH rpms, and being dutiful, I manually recreated that symbolic link :).
And my viewing program (TKVoice) didn't like that.
I didn't want to add mgetty-sendfax on top of the mgetty-voice I had
installed already (mgetty-sendfax apparently had g32pbm, but
mgetty-voice didn't).

So, I found an rpm from SUSE that had just some g3utils, including
g32pbm.
Interesting, that rpm linked g32pbm -> g3topbm. :-)

I copied g3topbm, installed the rpm, and manually copied the file back,
so I have both versions, and my viewer program works now.
(I was able to tweak the viewer (TCL program) to work with g3topbm, but
it works better with g32pbm.)
Post by Gert Doering
Regarding stretching: g32pbm will do this automatically if called
as "g32pbm fn..." (as opposed to "g32pbm <fn..." - when reading from
stdin, it doesn't know the file name).
Good to know! Thanx. I'll play with the command line stuff a bit
more. Some of these distros including different versions with
different symbolic links and not all the same files doesn't help the
situation here.
Post by Gert Doering
gert
--
Desi
Wouter van Marle
2006-10-15 03:22:03 UTC
Permalink
Post by d***@gmail.com
Post by d***@gmail.com
Except, I can't read the files. I'm generally ok with looking for
solutions when I have errors, but this one eludes me.
p.s. I meant I can't view the files, with kfaxview or tkvoice or with
konquerer. I can "cat" them out and I see a bunch of data in the
files. :-)
I don't know those viewers - but what works for me is:
- viewfax (from the mgetty package), very simple viewer.
- the GIMP also understands g3 fax format.
- convert to other formats using g3topbm, for example:
cat <fax> | g32pbm | pnmtojpeg > fax.jpg
(note: use `g32pbm -s` for normal resolution faxes: begins with fn. Use
the above line for high resolution faxes, name begins with ff).

g3topbm and other converters are in the netpbm package.

Good luck.
Post by d***@gmail.com
desiv
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
d***@gmail.com
2006-10-15 04:38:02 UTC
Permalink
Post by Wouter van Marle
- viewfax (from the mgetty package), very simple viewer.
- the GIMP also understands g3 fax format.
cat <fax> | g32pbm | pnmtojpeg > fax.jpg
(note: use `g32pbm -s` for normal resolution faxes: begins with fn. Use
the above line for high resolution faxes, name begins with ff).
g3topbm and other converters are in the netpbm package.
Good luck.
Thank you! I tried multiples, so I assumed (I know..) it was the file.
In fact, I had even tried playing with the g32pbm program, but I never
saved my results. When converting, I get this error:
g3topbm: Problem reading Row 2322. Skipping rest of row. bad code
word at Column 1728. No prefix of the 14 bits 0x0 matches any
recognized code word and no code words longer than 12 bits are defined.

However, apparently, that error isn't a big deal, because when I ran
your command, I got that error, and a jpeg that was my FAX!! (I had to
add the -s to stretch it.)

I'm thinking the other programs are choking on the errors? Apparently
g32pbm used to fail on errors itself according to the MAN pages.

Anyway, thanks. I'll just write a small script that converts the faxes
when I need to.

Q: Is the stretch / non-stretch thing sending fax specific? i.e. Was
this fax needed to be stretched because of the sending fax machine, or
will my fax modem always create files that need to be stretched?
Not a big deal, because I don't receive faxes often, but I'm just
interested.

Thanx again,

Desi
Juergen Kosel
2006-10-20 16:28:25 UTC
Permalink
Hello,
Post by d***@gmail.com
Post by d***@gmail.com
Except, I can't read the files. I'm generally ok with looking for
solutions when I have errors, but this one eludes me.
p.s. I meant I can't view the files, with kfaxview or tkvoice or with
konquerer. I can "cat" them out and I see a bunch of data in the
files. :-)
this sounds like the faxviewers use the wrong bit order (faxes could be
received and stored MSB first or LSB first).
There should be an option in the viewer software to use the other bitorder.


Juergen
--
Homepage: http://people.freenet.de/Juergen-Kosel/
PGP-Key : http://people.freenet.de/Juergen-Kosel/passwd.pgp

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Loading...