# best usb modem for gentoo 2.4?

## fostix

The D-Link usb modem DSB-560 gives all the indications of working fine - but it does not connect to the web on my linuxbox running Gentoo 2.4.   :Sad: 

The only thing I know to try is to try another modem.  I think usb is the way to go.  Any advice on which modem to try next?

Any other advice?   :Idea:   :Question: 

----------

## NeddySeagoon

fostix,

<rant> There is no such thing a a good usb modem. They are all software based modems, which require the CPU to do most of the hard work that should really be done in hardare. </rant>

Any external serial port modem will work, as long as you have a serial port on your PC. 

There are a few real hardware PCI modems too but they are difficult to spot from the packaging. Many that advertised as hardware modems are not. Danger signs are Host Signal Processing, Controllerless, WinModem, Software modem.

----------

## fostix

 :Smile:  I just checked.  Yes there is a serial port on my computer.

Any serial port modem?  Any suggestions about a specific serial port modem that has a good chance of working  :Question: 

----------

## NeddySeagoon

fostix,

Any serial port modem will work. You want one that does v90, k56flex and/or x2, thats most of them these days. Check what your ISP supports. There is not enough bandwith on a serial port to make a serial port soft modem.

Oh! v90 is the 56k specification that came out of k56flex ans x2, so you don't see the latter offered much these days. 

If you get a second hand modem, make sure it is either 56k or can be given a FLASH update to upgrade it to 56k. You don't want to be surfing at 14,400 baud.

----------

## fostix

 :Very Happy:  I ordered a

CenDyne 56K V.92 External Internet Serial DataFax Modem Bulk

and will let you know how I get along.

Thanks for the help and advice.

My ISP advised staying away from the x2 and Flex

Maybe this modem is both - but we will see what happens.

Thanks

----------

## migrax

Anything that has a serial bable and either a US Robotics or Rockwell chipset will serve you just fine. Anything else imnsho is usually crap, this from 8 years of ISP technical support. Avoid winmodems like the plague.

----------

## NeddySeagoon

fostix,

Thats good advice, x2 and k56flex have been superceeded by v90,

v92 is v90 with memory. From this review

http://www.techimo.com/reviews/showproduct.php?product=282 it looks pretty good. Conexant is what Rockwells modem division became when it was sold off, so it has a good pedigree.

----------

## ian!

Moved from 'IG' to 'K&HW'.

----------

## fostix

Thanks for the feedback   :Smile: 

This is an update!   :Confused: 

Having waited for 4 days paypal sent me an email that the folk I tried to pay for the modem I had ordered had not collected their money.  So I cancelled payment and went down to Office Depot and got what they had - Creative Modem Blaster V92 and tried that.

This is what I did besides hooking up the modem to the serial port:

1. rm /dev/modem/ttyUSB0

2. ln -sf /dev/ttyS4 /dev/modem

3. nano -w /etc/conf.d/net.ppp0 and changed MODEMPORT to /dev/ttyS4

Then tried /etc/init.d/net.ppp0 start which gave no error messages and there was no sound out of the modem and the lights did not change and /sbin/ifconfig did not show any modem   :Sad: 

So thought that by trial and error I would try the other two ttyS* that locate tts showed me - 0 and 1.

modeprobe said it could not locate /dev/ttyS4.  Modeprobe has not changed its report since.

So I went through the routine again:

1. rm /dev/modem/ttyS4

2. ln -sf /dev/ttyS0 /dev/modem

3. nano -w /etc/conf.d/net.ppp0 and changed MODEMPORT to /dev/ttyS0

Then tried /etc/init.d/net.ppp0 start which gave no error messages and there were the wanted sounds and the correct lights lighting up on the modem with the hash sound on the phone.   :Very Happy: 

/sbin/ifconfig showed ppp0 up and connected to my ISP URL.

So I tried pinging a URL suggested to me and my USP with 100% packet loss and the SD light winking but nothing on RD light.  I can ping the box itself and another computer on a local network.

So it appears to me that there is something other than the modem at fault.  What am I missing? Or is the next thing to recycle with yet a different modem??  Hope springs eternal   :Laughing: 

----------

## NeddySeagoon

fostix,

How have you set your username and password?

I'm surprised you can just do

```
 /etc/init.d/net.ppp0 start 
```

and it dials, logs you in and brings up PPP. That process requires a script of some sort.

Have a look in your logs, the progress of the call will be there - be careful of what you post because your username and password will be there in clear text.

Maybe its a DNS issue - does ping 216.239.39.99 work?

Thats google. Try browsing http://216.239.39.99 if the ping works.

----------

## fostix

Neddy,

Thanks for your response.  The last part of /var/log/messages shows:

May 27 12:23:16 linuxbox pppd[5887]: Serial connection established.

May 27 12:23:16 linuxbox pppd[5887]: Using interface ppp0

May 27 12:23:16 linuxbox pppd[5887]: Connect: ppp0 <--> /dev/ttyS0

May 27 12:23:22 linuxbox pppd[5887]: local  IP address 192.168.x.x

May 27 12:23:22 linuxbox pppd[5887]: remote IP address 65.219.x.x

May 27 12:29:54 linuxbox pppd[5887]: Terminating on signal 15.

May 27 12:30:00 linuxbox pppd[5887]: Connection terminated.

May 27 12:30:00 linuxbox pppd[5887]: Connect time 6.7 minutes.

May 27 12:30:00 linuxbox pppd[5887]: Sent 1491 bytes, received 162 bytes.

May 27 12:30:01 linuxbox pppd[5887]: Exit.

May 27 13:32:03 linuxbox pppd[5989]: pppd 2.4.1 started by root, uid 0

May 27 13:32:04 linuxbox chat[5990]: abort on (BUSY)

May 27 13:32:04 linuxbox chat[5990]: abort on (ERROR)

May 27 13:32:04 linuxbox chat[5990]: abort on (NO ANSWER)

May 27 13:32:04 linuxbox chat[5990]: abort on (NO CARRIER)

May 27 13:32:04 linuxbox chat[5990]: abort on (NO DIALTONE)

May 27 13:32:04 linuxbox chat[5990]: abort on (Invalid Login)

May 27 13:32:04 linuxbox chat[5990]: abort on (Login incorrect)

May 27 13:32:04 linuxbox chat[5990]: send (ATZ^M)

May 27 13:32:04 linuxbox chat[5990]: expect (OK)

May 27 13:32:04 linuxbox chat[5990]: ATZ^M^M

May 27 13:32:04 linuxbox chat[5990]: OK

May 27 13:32:04 linuxbox chat[5990]:  -- got it

May 27 13:32:04 linuxbox chat[5990]: send (ATDT2842032^M)

May 27 13:32:04 linuxbox chat[5990]: expect (CONNECT)

May 27 13:32:04 linuxbox chat[5990]: ^M

May 27 13:32:27 linuxbox chat[5990]: ATDT2842032^M^M

May 27 13:32:27 linuxbox chat[5990]: CONNECT

May 27 13:32:27 linuxbox chat[5990]:  -- got it

May 27 13:32:27 linuxbox chat[5990]: send (^M)

May 27 13:32:27 linuxbox chat[5990]: timeout set to 5 seconds

May 27 13:32:27 linuxbox chat[5990]: expect (~)

May 27 13:32:27 linuxbox chat[5990]:  115200^M

May 27 13:32:28 linuxbox chat[5990]: ^M

May 27 13:32:28 linuxbox chat[5990]: Username: ^M

May 27 13:32:32 linuxbox chat[5990]: alarm

May 27 13:32:32 linuxbox chat[5990]: send (^M)

May 27 13:32:33 linuxbox chat[5990]: send (^M)

May 27 13:32:33 linuxbox pppd[5989]: Serial connection established.

May 27 13:32:33 linuxbox pppd[5989]: Using interface ppp0

May 27 13:32:33 linuxbox pppd[5989]: Connect: ppp0 <--> /dev/ttyS0

May 27 13:32:38 linuxbox pppd[5989]: local  IP address 192.168.x.x

May 27 13:32:38 linuxbox pppd[5989]: remote IP address 65.219.x.x

May 27 13:40:16 linuxbox pppd[5989]: Terminating on signal 15.

May 27 13:40:16 linuxbox pppd[5989]: Connection terminated.

May 27 13:40:16 linuxbox pppd[5989]: Connect time 7.8 minutes.

May 27 13:40:16 linuxbox pppd[5989]: Sent 4361 bytes, received 3430 bytes.

May 27 13:40:16 linuxbox pppd[5989]: Hangup (SIGHUP)

May 27 13:40:16 linuxbox pppd[5989]: Exit.

The correct username and password is in /etc/init.d/net.ppp0 in plain sight.  

ping 216.239.39.99 gives 100% packet loss

The remote IP address listed above is that of my ISP. (that I have modified with the x's), and they are correct.

The local IP address is what I have assigned to the computer.

Is there another log that will give me more data?

Is the fact that my username and password does not show up in the messages log - a good sign of a great log - or a bad sign that means I have not in fact logged in?  :Question: 

Thanks for your valued help.

 :Laughing: 

----------

## NeddySeagoon

fostix,

I think your missing username and password means that you did not get logged in but your ISP allowed PPP to start anyway. Most ISPs drop the call if the login fails.

I have not used a modem for two years now so am probably not the best helper. Anyway lets contine

How did your username and password get into /etc/init.d/net.ppp0?

Thats the script that manages brining up the link. It expects to read a username and password from somewhere else. e.g. /etc/conf.d/net.ppp0 (maybe a typo in your post?)

Please post the output of 

```
ifconfig
```

and 

```
route
```

after ppp0 is up.

----------

## fostix

NeddySeagoon,

Thanks for your response.

1. As far as I know my username and password gets to /etc/init.d/net.ppp0 from /etc/conf.d/net.ppp0 where I typed it in.

2. I don't type my posts - so there can't be typos!  For the next two posts:

```
 /sbin/ifconfig > ifconfig.log

mount -t vfat /dev/fd0 /mnt/floppy

cp ifconfig.log /mnt/floppy/ifconfig.txt

```

Then I copy and paste here:

eth0      Link encap:Ethernet  HWaddr 00:03:47:2C:88:36  

          inet addr:192.168.0.8  Bcast:192.168.0.255  Mask:255.255.255.0

          inet6 addr: fe80::203:47ff:fe2c:8836/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:58 errors:0 dropped:0 overruns:0 frame:0

          TX packets:5 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:4950 (4.8 Kb)  TX bytes:378 (378.0 b)

          Interrupt:11 Base address:0x3000 

lo        Link encap:Local Loopback  

          inet addr:127.0.0.1  Mask:255.0.0.0

          inet6 addr: ::1/128 Scope:Host

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0 

          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

ppp0      Link encap:Point-to-Point Protocol  

          inet addr:192.168.0.8  P-t-P:65.219.136.2  Mask:255.255.255.255

          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:768  Metric:1

          RX packets:14 errors:1 dropped:0 overruns:0 frame:0

          TX packets:21 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:3 

          RX bytes:162 (162.0 b)  TX bytes:735 (735.0 b)

I used the same routine for route output:

Kernel IP routing table

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface

65.219.136.2    *               255.255.255.255 UH    0      0        0 ppp0

192.168.0.0     *               255.255.255.0   U     0      0        0 eth0

loopback        localhost       255.0.0.0       UG    0      0        0 lo

default         65.219.136.2    0.0.0.0         UG    0      0        0 ppp0

I am sure that whatever the problem is - it is very simple - I just don't know what it is  :Exclamation:   :Embarassed: 

Thanks again for your interest and help.

fostix

----------

## NeddySeagoon

fostix,

Somehow eth0 and ppp0 both have the same IP addess *Quote:*   

> eth0 Link encap:Ethernet HWaddr 00:03:47:2C:88:36
> 
> inet addr:192.168.0.8 Bcast:192.168.0.255 Mask:255.255.255.0

 and *Quote:*   

> ppp0 Link encap:Point-to-Point Protocol
> 
> inet addr:192.168.0.8 P-t-P:65.219.136.2 Mask:255.255.255.255

 Thats not allowed. Every interface must have an address in a different subnet. Your routing table looks good. The default route sends packets over ppp0.

In the /etc/conf.d/net.ppp0 file, what do you have for *Quote:*   

> IPADDR=""                       # Our IP if we have a static one

 It should be left as 

```
IPADDR=""
```

unless yous ISP has assigned you an IP address. For dial-up, most ISPs use dynamic IP address assignments.

Your ppp0 IP address needs to be publically routable IP or no packets willl be returned to you. The internet cannot route things to 192.168.*.* because its not assigned.

----------

## fostix

NeddySeagon,

 :Laughing: 

That did it  :Exclamation: 

I changed the 

```
IPADDR=""
```

And all of the modem problems went away!

The ping worked.

What took so long to get back was that I wanted to make sure so tried the last thing that had timed out - emerge sync.

And did not expect it to take 2 hours  :Exclamation: 

Thank you so much  :Very Happy: 

fostix

----------

## NeddySeagoon

fostix,

Glad its going. 

If you look in your log, you should find a line CONNECT=, which tells you the speed, compression and error correction agreed when the link was established. Post that line please. Depending on what it says, you may be able to get some more performance with extra modem set up strings.

If that was your first emerge sync on that box, 2 hours was OK.

----------

## NeddySeagoon

fostix,

Glad its going. 

If you look in your log, you should find a line CONNECT=, which tells you the speed, compression and error correction agreed when the link was established. Post that line please. Depending on what it says, you may be able to get some more performance with extra modem set up strings.

If that was your first emerge sync on that box, 2 hours was OK.

----------

## fostix

NeddySeagoon,

I don't find any line CONNECT=  In either /var/log/messages or with dmesg.   :Sad: 

I would be very interested in optimizing things.  Any suggestion as to where to find the log file that could give us that info.

Thanks again.   :Smile: 

fostix

----------

## NeddySeagoon

fostix,

It should be in the same log that you found the chat script that you posted earlier. That post reports 115,000 but that is the speed between your PC and the modem, not the line speed.

Its time to poke about with some additional AT commands. In  /etc/conf.d/net.ppp0 set INITSTRING="V1X4" 

From an old manual  *Quote:*   

> V Word or Digit Responses
> 
> Parameters:
> 
> V0: Digit responses.
> ...

 

and *Quote:*   

> X Select Result Code Set
> 
> Parameters: 
> 
> X0: Basic result code set (code 0-4).
> ...

 

This will get you word responses and extended reporting, if it wasn't set already somewhere else. Be aware that word responses may break your connect script if its looking for numbers only. For lots of detail, Google for "AT Commands" or "Hays command set"

If you really wnt to get your sleeves rolled up, emerge minicom and talk to the modem yourself.

----------

## fostix

NeddySeagoon,

My system does not seem to tolerate any additional commands in INITSTRING="V1X4" or any other variation.  I have tried all the variations  :Exclamation:    There are no error statements, no sound from the modem and no connection unless INITSTRING= "" in the /etc/conf.g/net.ppp0 file.

The log /var/log/messages tells me that the connect script fails.

I emerged minicom and downloaded the Hayes Modem commands from google - and printed it off but am none the wiser!

I think the main part of the speed issue is not the settings but the phone line this far out in the country.  3 - 30 kbts/sec is as good as I am going to get because of the limitation of the phone line.  In the future I plan to get a sattelite modem connection that I a told will work with Linux.  So we shall see  :Exclamation: 

I do not think the speed is any setting but the phone line capacity.  Thanks for all your help.  You solved the problem that had us all stumped for a long time.  Thanks again  :Very Happy: 

fostix

----------

