[Bug 947] New: FaxAddModem fails to talk to my modem, but miniterm/cu does
<bugzilla-daemon <at> hylafax.org>
2011-09-17 23:29:16 GMT
http://bugs.hylafax.org/show_bug.cgi?id=947
Summary: FaxAddModem fails to talk to my modem, but miniterm/cu
does
Product: HylaFAX
Version: latest
Platform: PC
OS/Version: Linux
Status: NEW
Severity: critical
Priority: P2
Component: faxaddmodem
AssignedTo: hylafax-devel <at> hylafax.org
ReportedBy: anaerin <at> gmail.com
I'm running Hylafax 6.0.5, and the faxaddmodem script is failing to communicate
with the modem.
ps aue reports:
------------8<----------------------------------------
rjohnston <at> hylafax:~$ ps aue
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 599 0.0 0.2 1868 548 tty4 Ss+ Sep15 0:00 /sbin/getty -8
38400 tty4
root 604 0.0 0.2 1868 544 tty5 Ss+ Sep15 0:00 /sbin/getty -8
38400 tty5
root 624 0.0 0.2 1868 548 tty2 Ss+ Sep15 0:00 /sbin/getty -8
38400 tty2
root 625 0.0 0.2 1868 544 tty3 Ss+ Sep15 0:00 /sbin/getty -8
38400 tty3
root 629 0.0 0.2 1868 548 tty6 Ss+ Sep15 0:00 /sbin/getty -8
38400 tty6
root 913 0.0 0.2 1868 548 tty1 Ss+ Sep15 0:00 /sbin/getty -8
38400 tty1
1000 945 0.0 2.4 9508 6104 pts/0 Ss Sep15 0:07 -bash
USER=rjohnston LOGNAME=rjohnston HOME=/home/rjohnston
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/gam
1000 10243 0.0 0.4 4700 1156 pts/0 R+ 00:07 0:00 ps aue
TERM=xterm SHELL=/bin/bash SSH_CLIENT=192.168.1.142 53470 22
OLDPWD=/home/rjohnston/hsfmodem-7.80.02.05-DiacoEdition SSH_TTY=/d
-------------8<----------------------------------------
...So nothing's using my modem (which is on /dev/ttySHSF0)
stty -a </dev/ttySHSF0 reports:
-------------8<----------------------------------------
rjohnston <at> hylafax:~$ sudo stty -a </dev/ttySHSF0
speed 57600 baud; rows 0; columns 0; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^A; eol = <undef>; eol2 =
<undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase
= ^W; lnext = ^V; flush = ^O;
min = 0; time = 0;
-parenb -parodd cs8 hupcl -cstopb cread clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon
-ixoff -iuclc -ixany -imaxbel -iutf8
-opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0
ff0
-isig -icanon -iexten -echo -echoe -echok -echonl -noflsh -xcase -tostop
-echoprt -echoctl -echoke
-------------8<----------------------------------------
setserial -a /dev/ttySHSF0 reports:
-------------8<----------------------------------------
rjohnston <at> hylafax:~$ sudo setserial -a /dev/ttySHSF0
/dev/ttySHSF0, Line 0, UART: undefined, Port: 0x1040, IRQ: 16
Baud_base: 115200, close_delay: 50, divisor: 0
closing_wait: 3000
Flags: spd_normal
-------------8<----------------------------------------
Miniterm works:
-------------8<----------------------------------------
rjohnston <at> hylafax:~$ sudo miniterm.py -b 38400 /dev/ttySHSF0
--- Miniterm on /dev/ttySHSF0: 38400,8,N,1 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
AT
OK
--- exit ---
-------------8<----------------------------------------
I'm running the 8.5 release of cat:
-------------8<----------------------------------------
rjohnston <at> hylafax:~$ cat --version
cat (GNU coreutils) 8.5
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Torbjörn Granlund and Richard M. Stallman.
-------------8<----------------------------------------
And (the most important part) the man entry for that version of "cat" shows:
-------------8<----------------------------------------
-u (ignored)
-------------8<----------------------------------------
Which I think is the root of the problem. On earlier versions, cat -u caused
cat to stay open (I think) until killed. Instead, cat is timing out and closing
the (empty) file early (>> emphasis mine):
-------------8<----------------------------------------
Now we are going to probe the tty port to figure out the type
of modem that is attached. This takes a few seconds, so be patient.
Note that if you do not have the modem cabled to the port, or the
modem is turned off, this may hang (just go and cable up the modem
or turn it on, or whatever).
Using user-specified 38400 to talk to modem.
/usr/sbin/faxaddmodem: line 855: kill: (10333) - No such process
There was no response from the modem. Perhaps the modem is
turned off or the cable between the modem and host is not
connected. Please check the modem and hit a carriage return
when you are ready to try again:
-------------8<----------------------------------------
The kill process ID of 10333 is the contents of catpid, which means that cat is
starting, writing an empty file, and quitting, then when the script tries to
read something back, the file is empty and cat is already dead.
sh -x log will be attached.
Any suggestions on how to proceed? I can't believe I'm the only one with this
issue.
--
--
Configure bugmail: http://bugs.hylafax.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
____________________ HylaFAX(tm) Developers Mailing List ____________________
To subscribe/unsubscribe, click http://lists.hylafax.org/cgi-bin/lsg2.cgi
On UNIX: mail -s unsubscribe hylafax-devel-request <at> hylafax.org < /dev/null