Sentech modem hangs on Linux with USB

lesliev

Member
Joined
Jun 12, 2005
Messages
13
Reaction score
0
Hey guys

I have a Debian Sarge box connecting to the Internet via Sentech modem and a USB cable. I am using TheRodent's drivers.

Every now and then (many times last week, not much this week) - the connection drops (LCP terminated by peer in the logs) and then the modem seems to stop responding. I can see pppd sending AT... no response, then it sends +++... no response. After that it endlessly sends +++ to the modem, which seems dead until someone power cyles it.

Is there any other way to reset the modem, or is this a known problem? Can pppd do some kind of hardware IO reset instead of sending the +++?
 
The log

Oct 20 13:04:04 server pppd[2682]: LCP terminated by peer
Oct 20 13:04:04 server pppd[2682]: Connect time 33.2 minutes.
Oct 20 13:04:04 server pppd[2682]: Sent 161962 bytes, received 606989 bytes.
Oct 20 13:04:07 server pppd[2682]: Connection terminated.
Oct 20 13:04:08 server chat[7212]: timeout set to 30 seconds
Oct 20 13:04:08 server chat[7212]: abort on (NO CARRIER)
Oct 20 13:04:08 server chat[7212]: abort on (BUSY)
Oct 20 13:04:08 server chat[7212]: send (^MAT^M)
Oct 20 13:04:08 server chat[7212]: expect (OK)
Oct 20 13:04:38 server chat[7212]: alarm
Oct 20 13:04:38 server chat[7212]: send (+++)
Oct 20 13:04:39 server chat[7212]: expect (OK)
Oct 20 13:05:09 server chat[7212]: alarm
Oct 20 13:05:09 server chat[7212]: Failed
Oct 20 13:05:10 server pppd[2682]: Modem hangup
Oct 20 13:05:41 server chat[7213]: timeout set to 30 seconds
Oct 20 13:05:41 server chat[7213]: abort on (NO CARRIER)
Oct 20 13:05:41 server chat[7213]: abort on (BUSY)
Oct 20 13:05:41 server chat[7213]: send (^MAT^M)
Oct 20 13:05:41 server chat[7213]: expect (OK)
Oct 20 13:06:11 server chat[7213]: alarm
Oct 20 13:06:11 server chat[7213]: send (+++)
Oct 20 13:06:11 server chat[7213]: expect (OK)
Oct 20 13:06:41 server chat[7213]: alarm
Oct 20 13:06:41 server chat[7213]: Failed
Oct 20 13:07:13 server chat[7219]: timeout set to 30 seconds

...ad nauseum.

I see a new version of the USB drivers has just arrived. Will that fix the problem? I am a little reluctant to do the whole kernel compile again...
Is there no way to compile the module without recompiling the whole kernel?

ANYBODY??
 
lesliev, yep, I've had exactly that, many times before. Typically happens when the modem goes "roaming" on the signals (due to a tower reset or whatever). Modem thinks it's still connected, and refuses to respond to the +++ATH.

I've debugged it and am now forcing the DTR up/down whenever the port is opened or closed by "chat". Have not yet managed to get my modem to hang in that state in a while. That version of the driver however, is unfortunately not yet available.

I will release within this weekend sometime. It is possible to just do a "make modules; make modules_install " with a newer version of the driver, as long as you have the running kernel source and .config available.
 
Last edited:
TheRoDent said:
Not officially, no. I reverse engineered the modem USB protocol and wrote a linux driver.

There is your problem... Lol
No i dont know whats wrong - i have a m8 that writes linux code i'll get him to have a look at it. Pm your cell no# i'll get him to call you

Regards
Brian
 
Where would we be without TheRoDent? Thanks for all the hard work.

I spent a lot of yesterday looking at what it takes to make loadable modules in kernel 2.6 - and it seems pretty easy. I just don't know enough about device drivers in general to write one yet. I am keen on making your driver independant of the kernel - just download the kernel headers, compile the driver and insmod, like the NVidia drivers. Would save me a lot of time.

L
 
Person said:
There is your problem... Lol
No i dont know whats wrong - i have a m8 that writes linux code i'll get him to have a look at it. Pm your cell no# i'll get him to call you

Regards
Brian

I don't specifically understand how me calling your mate that writes linux code will help, unless he has some documentation on the MCCI USB Datapump that is used in the Sentech modems. He is free to look over the code at any point he wants, so he can just go ahead, download it, and take a stab at it. That's how opensource software works.

As I said. I believe I've found the issue in the driver and will be releasing it this weekend. By the way. Approximately 60% of hardware (if not more) that is supported in Linux has been reverse engineered due to vendors that need to get a clue.
 
Version 0.4 of the driver has been released. http://www.neology.co.za/

Changelog.
-- open() sequence changed to toggle DTR/RTS. Seems to help to get the AT command parser back to a sane state. This should help for when the modem goes "roaming" between towers, and forgets about the AT interface.
-- Added support for the modem's "passthru" console device. More info on this later.
 
New drivers

RoDent: Thanks a lot for the new drivers! You mention here and there that you have a new chat script - will I need that?

When compiling I got this warning:
drivers/usb/serial/ipw.c:1390: warning: initialization from incompatible pointer type

I'm going to do a remote reboot now, so I hope it works ;-)

Quick question: I remember I had to mkinitrd after I rebuilt the kernel the last time. I think it's because the new kernel I compiled was a 686 and previously a 386 one had been installed. Would a new 686 kernel break anything else?

BTW: I think I vaguely met you once at a Tribes2 lan at the DiData campus. I've played Legends and I liked it, just not near Tribes2 yet. Why didn't you like Vengeance? I'm on to UT2004 now and quad-jump+low grav makes it almost fun!


Ah, the machine is not coming up... off to the client tomorrow to see what happened!

L
 
Drivers

RoDent: If you put a wiki into Neology's support section, I'd be glad to contribute any experiences I have building the drivers on different linuxes.

L
 
You probably met me at DiData at some point, tho I think I mised the legends lan.

You shouldn't need to redo the initrd, unless the kernel you've recompiled is a different cpu target than the modules on the initrd.img

Don't get that warning with gcc 3.3.5? The chat script as is should work fine.
 
Last edited:
lesliev said:
RoDent: If you put a wiki into Neology's support section, I'd be glad to contribute any experiences I have building the drivers on different linuxes.

If you register on the forum section, I'll give you access to the Wiki. The support section is in fact, a Wiki, but is only editable by certain forum users who have the appropriate permission.
 
My opinion on some issues :
"Is there any other way to reset the modem" - I placed a "shutdown -r now" in my /etc/ppp/if-down.local. Not ideal, but it worked. A friend scripted a complete unloading and reloading of the USB modules. I did find another trick that worked on my server box (USB 1), but since it does not work my notebook (USB 2), it may be a dead end.

"does the software even support linux ?" - Last time I heard the official Windows software did not even work with Hyperthreading. In my books that makes the linux driver SUPERIOR to the Windows one.

"I am keen on making your driver independant of the kernel" - TheRodent's code has been cleaned and placed in the kernel by Greg Kroah-Hartman. Consequently some distro's, (eg. a rescent Ubuntu livecd), include compiled modules.
 
New drivers

This is why the box didn't come up:

Oct 25 08:07:23 server chat[3021]: timeout set to 30 seconds
Oct 25 08:07:23 server chat[3021]: abort on (NO CARRIER)
Oct 25 08:07:23 server chat[3021]: abort on (BUSY)
Oct 25 08:07:23 server chat[3021]: send (^MAT^M)
Oct 25 08:07:23 server chat[3021]: -- write failed: Operation not permitted
Oct 25 08:07:55 server chat[3022]: timeout set to 30 seconds
Oct 25 08:07:55 server chat[3022]: abort on (NO CARRIER)
Oct 25 08:07:55 server chat[3022]: abort on (BUSY)
Oct 25 08:07:55 server chat[3022]: send (^MAT^M)
Oct 25 08:07:55 server chat[3022]: -- write failed: Operation not permitted

So I came in this morning, put in the old drivers again and recompiled... and got the same error. Now I have, in my distress, recompiled the kernel more than once and have so many images and initrd's that I don't know which is which or for which processor :-)

I had changed grub to point to the vmlinuz compiled today - since I assumed the 'make modules' had created it. Now why would a 'make modules' make a new vmlinuz? I don't think it should. I definitely didn't recompile the kernel again, but there in /boot is a vmlinuz with a modtime of today.

Anyway, I set menu.lst to point back to the kernel image it had been pointing to for some weeks now, recompiled and everything worked. I am thoroughly confused but I don't want to break the system now so I am leaving it as-is.

Thanks Nic for the Ubuntu tip - is that in Breezy or Hoary?
Since Ubuntu (and impi I hear) - have the drivers, that will make future installs much easier.


Ok, I'll report on the stability with ver 0.4 and hopefully won't have to use the shutdown command in if-down.

L
 
New drivers

I'm getting this now:

Oct 25 11:02:36 server kernel: ip_conntrack version 2.1 (3583 buckets, 28664 max) - 296 bytes per conntrack
Oct 25 11:04:53 server pppd[2702]: Unsupported protocol 0xd012 received
Oct 25 11:04:53 server pppd[2702]: Unsupported protocol 0xd012 received

My MTU is 1400. Also, all POP3 from non-Sentech servers is very slow, but I understand that's a known Sentech problem at the moment (where moment=6 months).

Otherwise things seem to be working fine.
 
The unsupported protocol 0xd012 is something with Sentech's PPP negotation. That's probably always been there, or is something they're stuffing up with now.

Nic, the only way to get the AT command parser in the modem to respond again, is to toggle the DTR. The driver does that now, whenever the tty is opened() by Chat.
 
Stranger things

Hm, it seems I cannot download index.htm from www.google.co.za over the Sentech modem now. I just get 504:gateway timeouts. Some sites are quite fast, SSL sites especially seem to be very slow. Altavista is very slow, www.saix.net is very fast, www.nedbank.co.za seems crippled.

I thought it was a general problem until I tried my ADSL line!

Any ideas? Is it a general Sentech problem?

Les
 
Seems like international sites are dead, assuming google.co.za is actually hosted overseas. WHY TODAY??
 
TheRoDent said:
Nic, the only way to get the AT command parser in the modem to respond again, is to toggle the DTR.

Well, perhaps my hack makes the modem think that something equivalent to a USB hot-unplug and re-plug happened and than the AT command parser sees DTR disappearing and reappearing. Who knows what that braindead firmware is thinking ?

lesliev said:
Hoary or Breezy ?
Hoary. Full instructions is at http://www.mybroadband.co.za/vb/archive/index.php/t-22369.html
 
Last edited:
Top
Sign up to the MyBroadband newsletter
X