# faxsetup and faxaddmodem: where is my modem?

## dilandau

i have an intenral pci modem card. unfortunately the faxsetup rogram, when it comes to execute faxaddmodem asks for a serial port where the modem is. what should i enter there? the modem isnt serial, its internal.

sending a text as fax to a destination worked well with efax, so the modem and setup is ok.

faxsetup ...

```
...

Should I restart the HylaFAX server processes [yes]? 

/etc/init.d/hylafax start

/lib/rcscripts/sh/rc-daemon.sh: line 207: `start-single-daemon': not a valid identifier

You do not appear to have any modems configured for use.  Modems are

configured for use with HylaFAX with the faxaddmodem(8C) command.

Do you want to run faxaddmodem to configure a modem [yes]? 

Serial port that modem is connected to []?
```

----------

## netboy1977

Which card do you use? Should be /dev/faxCAPI. Do you have that device?

----------

## dilandau

no /dev/faxCAPI here.

----------

## m_sqrd

what the output of

dmesg |egrep -i 'serial|tty'

----------

## dilandau

```
calla@dunwyn /dir/silva/hitomi $ dmesg |egrep -i 'serial|tty'

ttyLTM0 at I/O 0xc800 (irq = 11) is a Lucent/Agere Modem

calla@dunwyn /dir/silva/hitomi $ 
```

----------

## m_sqrd

I'm not see the serial driver but try this 

probemodem ttyLTM0

----------

## dilandau

tried as root and as user but a "probemodem" command did not exist.

----------

## m_sqrd

Hmmm. try 

which faxaddmodem probemodem faxmodem

----------

## dilandau

```
dunwyn hitomi # which faxaddmodem probemodem faxmodem

which: no faxaddmodem in (/sbin:/bin:/usr/sbin:/usr/bin)

which: no probemodem in (/sbin:/bin:/usr/sbin:/usr/bin)

which: no faxmodem in (/sbin:/bin:/usr/sbin:/usr/bin)

dunwyn hitomi #
```

----------

## m_sqrd

I don't know where they are in your system may be /usr/local/sbin ? 

but I'm sure there are some ware.

 *Quote:*   

> 
> 
> Do you want to run faxaddmodem to configure a modem [yes]?
> 
> Serial port that modem is connected to []?
> ...

 

----------

## dilandau

ooops, hylafax was not installed anymore since it didnt work i removed it.

now i again emerged hylafax and cups4hylafax and get the following output:

(the dmesg command gives no output anymore, though it did before hylafax was emerged!)

```
dunwyn hitomi # dmesg |egrep -i 'serial|tty'

dunwyn hitomi # probemodem ttyLTM0

Now we are going to probe the tty port.  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).

Probing for best speed to talk to modem: 38400 OK.

This looks like a Class 1 modem.

ATI0    RESULT = "OK"   RESPONSE = "LT V.92 Data+Fax Modem Version 8.30"

ATI1    RESULT = "OK"   RESPONSE = "E851"

ATI2    RESULT = "OK"   RESPONSE = "OK"

ATI3    RESULT = "OK"   RESPONSE = "LT V.92 Data+Fax Modem Version 8.30"

ATI4    RESULT = "OK"   RESPONSE = "72"

ATI5    RESULT = "OK"   RESPONSE = "8.30,0,19,11C1,044A,144F,1005"

ATI6    RESULT = "OK"   RESPONSE = "OK"

ATI7    RESULT = "OK"   RESPONSE = "OK"

ATI8    RESULT = "OK"   RESPONSE = "OK"

ATI9    RESULT = "OK"   RESPONSE = "North America"

Class 1 stuff...

AT+FCLASS=?     RESULT = "OK"   RESPONSE = "0,1"

AT+FCLASS?      RESULT = "OK"   RESPONSE = "0"

AT+FCLASS=0     RESULT = "OK"   RESPONSE = "OK"

AT+FCLASS=1     RESULT = "OK"   RESPONSE = "OK"

AT+FCLASS?      RESULT = "OK"   RESPONSE = "0"

AT+FJUNK=?      RESULT = "ERROR"        RESPONSE = "ERROR"

AT+FJUNK?       RESULT = "ERROR"        RESPONSE = "ERROR"

AT+FAA=?        RESULT = "OK"   RESPONSE = "0,1"

AT+FAA? RESULT = "OK"   RESPONSE = "0"

AT+FAE=?        RESULT = "ERROR"        RESPONSE = "ERROR"

AT+FAE? RESULT = "ERROR"        RESPONSE = "ERROR"

AT+FTH=?        RESULT = "OK"   RESPONSE = "3,24,48,72,73,74,96,97,98,121,122,14

5,146"

AT+FRH=?        RESULT = "OK"   RESPONSE = "3,24,48,72,73,74,96,97,98,121,122,14

5,146"

AT+FTM=?        RESULT = "OK"   RESPONSE = "3,24,48,72,73,74,96,97,98,121,122,14

5,146"

AT+FRM=?        RESULT = "OK"   RESPONSE = "3,24,48,72,73,74,96,97,98,121,122,145,146"

AT+FTS=?        RESULT = "ERROR"        RESPONSE = "ERROR"

AT+FRS=?        RESULT = "ERROR"        RESPONSE = "ERROR"

dunwyn hitomi # 
```

----------

## m_sqrd

Looks ok so now try your /etc/init.d/hylafax start

----------

## dilandau

when using faxaddmodem to set it up i enter ON for speaker volume but it stays off.

----------

## dilandau

this is output i get:

```
dunwyn hitomi # faxmodem

Missing modem device.

usage: faxmodem [-c fax-capabilities] [-p] [-P] [-u priority] [-q queue-dir] modem

dunwyn hitomi # faxmodem ttyLTM0

FIFO: open: No such device or address

dunwyn hitomi # faxmodem /dev/ttyLTM0

FIFO: open: No such device or address

dunwyn hitomi # /etc/init.d/hylafax start

 * Caching service dependencies ...                                             [ ok ]

 * Starting HylaFAX Servers. ...

HylaFAX: faxq hfaxd (without old protocol & without SNPP support)

/usr/sbin/hfaxd -i hylafax

.                                                                               [ ok ]

dunwyn hitomi # 
```

----------

## m_sqrd

try 

Modem speaker volume [off]?

"x" is not a valid speaker volume setting; use one

of: "off", "low", "quiet", "medium", and "high".

----------

## dilandau

now hylafax seems to be installed, configured and working. how to test if i can send faxes via it?

----------

## m_sqrd

man sendfax

----------

## dilandau

seems to be a big help to some but i am lost in that manpage. isnt there a short example for sending? here is the number i want to send to: 0721/151482767 its a fax to email gate and if it works i get an email with the fax as an image file attached.

----------

## m_sqrd

I'm guess here that 0721 is a user_id

so I think it would be some thing like 

sendfax -d '0721@151482767' some_test_file

but again I guessing so don't brake out the flames if it foobars.  :Laughing: 

----------

## dilandau

the 0721is a dial prefix for the service. the actual number is 0721151482767 alltogether. it needs to be handled as one number and it is the number where i want to send to.

----------

## m_sqrd

sorry I did not understand. 

anyway try 

sendfax -d 0721151482767 some_test_file

----------

## dilandau

it says

```
Can not reach server at host "localhost", port 4559.
```

----------

## m_sqrd

Look like the server not running.

ps -ef|grep fax

or

nestat -l -n

----------

## dilandau

```
dunwyn calla # ps -ef|grep fax 

root      9792  9304  0 20:11 pts/1    00:00:00 grep fax

dunwyn calla # nestat -l -n

bash: nestat: command not found

dunwyn calla # 
```

----------

## m_sqrd

sorry the nestat MY bad! (dead fingers and eyes)

its netstat options

but no matter the server not running.

so do /etc/init.d/hylafax start  and see that it starts 

then try your sendfax -d .... .... 

if it take the job then type faxstat -s

----------

## dilandau

netstat now says:

```
calla@dunwyn ~ $ netstat -l -n

Active Internet connections (only servers)

Proto Recv-Q Send-Q Local Address           Foreign Address         State      

tcp        0      0 0.0.0.0:4559            0.0.0.0:*               LISTEN      

tcp        0      0 0.0.0.0:6000            0.0.0.0:*               LISTEN      

tcp        0      0 0.0.0.0:631             0.0.0.0:*               LISTEN      

udp        0      0 0.0.0.0:631             0.0.0.0:*                           

Active UNIX domain sockets (only servers)

Proto RefCnt Flags       Type       State         I-Node Path

unix  2      [ ACC ]     STREAM     LISTENING     19159  /tmp/.X11-unix/X0

unix  2      [ ACC ]     STREAM     LISTENING     16759  /var/run/ptal-mlcd/usb:psc_1100_series

unix  2      [ ACC ]     STREAM     LISTENING     19250  /tmp/ssh-iUAPqq8878/agent.8878

unix  2      [ ACC ]     STREAM     LISTENING     19294  /tmp/.ICE-unix/8888

unix  2      [ ACC ]     STREAM     LISTENING     17288  /dev/lircd

unix  2      [ ACC ]     STREAM     LISTENING     13263  /dev/log

unix  2      [ ACC ]     STREAM     LISTENING     19257  @/tmp/dbus-amqtBBqo4x

calla@dunwyn ~ $ 

```

sendfax responds:

```
calla@dunwyn ~ $ sendfax -d 0721151482767 /dir/silva/kei_scsmnov2003_glow.jpg 

request id is 1 (group id 1) for host localhost (1 file)

calla@dunwyn ~ $ 
```

----------

## m_sqrd

Ok I had to go eat, so did it work?

----------

## dilandau

no.

----------

## m_sqrd

Ok what did faxstat -s show?

----------

## dilandau

```
dunwyn hitomi # faxstat -s

Can not reach server at host "localhost", port 4559.

dunwyn hitomi # 
```

----------

## m_sqrd

ok start the server and/or add it to your default run level then try the faxstat -s

----------

## dilandau

it gives good output..

```
calla@dunwyn ~ $ sendfax -d 0721151482767 /dir/silva/kei_scsmnov2003_glow.jpg 

request id is 2 (group id 2) for host localhost (1 file)

calla@dunwyn ~ $ faxstat -s

HylaFAX scheduler on dunwyn.quicktunnels: Running

JID  Pri S  Owner Number       Pages Dials     TTS Status

2    127 W  calla 072115148276  0:0   0:12         

calla@dunwyn ~ $
```

after some minutes the state is stll teh same. seems like it is aware of jobs but not doing them.

----------

## m_sqrd

Oops No modem.

did you add the to the /etc/inittab file ? if not add that the do a telinit Q

m0:2345:respawn:/usr/sbin/faxgetty $your_modem_port

----------

## dilandau

i dont understand this. do what? why? i can see the modem when probing. its there and efax works.

----------

## m_sqrd

ok edit your /etc/inittab file add a line like this

 *Quote:*   

> 
> 
> m0:2345:respawn:/usr/sbin/faxgetty ttyLTM0
> 
> 

 

then type telinit Q

you have to tell hylafax to use the modem.

----------

## dilandau

now it started to send my jpeg file, believing it was a fax of 117 pages. needed to reboot machine to stop it sending 117 pages.

----------

## m_sqrd

If your going to be send jpg/gif etc you need a converstion tool to convert them to tiffs or 

postscript.

 *Quote:*   

> 
> 
>  sendfax passes POSTSCRIPT(R) and TIFF documents directly through to the fax server for transmission, and  attempts to convert other file formats to either POSTSCRIPT or TIFF.
> 
> 

 

----------

## dilandau

how to kill unwanted printjobs? everytime i start hylafax it tries to send the 117 pages of the jpg file.

----------

## m_sqrd

man faxrm

quick and dirty

rm files from /var/spool/fax/docq/ /var/spool/fax/sendq/

----------

## dilandau

no need to do anything, the queued stuff dissapeard from itself. i was able to send me a fax now, however the picture quality is mad. i know no proper tool that can convert into right tif or ps.

----------

## m_sqrd

you mite open a new post in the multi-media area asking for recommendations  for said tool

may imagemagick or gimp  or something.

----------

