# finding where my modem is located [solved]

## DaggyStyle

I've installed hsfmodem on my server running kernel-2.6.33, I need to define forhylafax  on which ttyS0 it is located, how can I do that?

----------

## poly_poly-man

If you need to find it: open up each one, send it an "AT"... if it says "OK" or so back to you, it's a modem.

If programs need to find it: symlink it to /dev/modem

----------

## DaggyStyle

 *poly_poly-man wrote:*   

> If you need to find it: open up each one, send it an "AT"... if it says "OK" or so back to you, it's a modem.
> 
> If programs need to find it: symlink it to /dev/modem

 

dumb me! or just do the following:

```
dagg@Starfleet ~ $ ls -n /dev/modem 

lrwxrwxrwx 1 0 0 13 Apr  9 22:33 /dev/modem -> /dev/ttySHSF0

```

solved

----------

## DaggyStyle

is this means that the modem sits on ttyS0?

```
dagg@Starfleet ~ $ ls /dev/ttyS

ttyS0     ttyS2     ttySHSF0  ttySHSF2  ttySHSF4  ttySHSF6  

ttyS1     ttyS3     ttySHSF1  ttySHSF3  ttySHSF5  ttySHSF7  

dagg@Starfleet ~ $ ls -n /dev/modem

lrwxrwxrwx 1 0 0 8 Apr 10 12:40 /dev/modem -> ttySHSF0

Starfleet dagg # echo "AT" > /dev/ttyS0

Starfleet dagg # echo "AT" > /dev/ttyS1

bash: echo: write error: Input/output error

Starfleet dagg # echo "AT" > /dev/ttyS2

bash: echo: write error: Input/output error

Starfleet dagg # echo "AT" > /dev/ttyS3

bash: echo: write error: Input/output error

Starfleet dagg # echo "AT" > /dev/ttySHSF0 

bash: echo: write error: Input/output error

Starfleet dagg # echo "AT" > /dev/ttySHSF1

bash: echo: write error: Input/output error

Starfleet dagg # echo "AT" > /dev/ttySHSF2

bash: echo: write error: Input/output error

Starfleet dagg # echo "AT" > /dev/ttySHSF3

bash: echo: write error: Input/output error

Starfleet dagg # echo "AT" > /dev/ttySHSF4

bash: echo: write error: Input/output error

Starfleet dagg # echo "AT" > /dev/ttySHSF5

bash: echo: write error: Input/output error

Starfleet dagg # echo "AT" > /dev/ttySHSF6

bash: echo: write error: Input/output error

Starfleet dagg # echo "AT" > /dev/ttySHSF7

bash: echo: write error: Input/output error

```

----------

## Link31

You may want to read the answer back from the /dev/ttyS0 file to find out if it is actually a modem, but it looks like /dev/ttyS0 is a valid serial device.

----------

## DaggyStyle

 *Link31 wrote:*   

> You may want to read the answer back from the /dev/ttyS0 file to find out if it is actually a modem, but it looks like /dev/ttyS0 is a valid serial device.

 

how do I do that?

----------

## poly_poly-man

easiest is busybox's microcom...

busybox microcom /dev/ttyS0 -s 38400

if you know what it is, replace the 38400, but that's a pretty common value. If you get garbage, try 115200 or others.

write in AT and hit enter, see what (if anything) comes back. Try this for the others, even if they gave you errors before.

----------

## DaggyStyle

 *poly_poly-man wrote:*   

> easiest is busybox's microcom...
> 
> busybox microcom /dev/ttyS0 -s 38400
> 
> if you know what it is, replace the 38400, but that's a pretty common value. If you get garbage, try 115200 or others.
> ...

 

I don't get anything back, I have to kill it.

is it possible that the modem doesn't returns anything?

----------

