Subject: Re: cellphone modem troubles
To: None <tech-net@NetBSD.org>
From: Matthias Ferdinand <mf+tech-net@mfedv.net>
List: tech-net
Date: 01/15/2007 02:40:45
--On Mittwoch, Dezember 27, 2006 21:36:46 +0100 Matthias Ferdinand
<mf+tech-net@mfedv.net> wrote:
> To be really sure I had not messed with config or compiler or such, I
> downloaded the binary NetBSD 3.1 kernel (-GENERIC and -GENERIC_LAPTOP)
> from ftp.netbsd.org and tried again with both, but the result is exactly
> the same.
Instead of wiping my entire installation to try Linux, I did a cvs-upgrade
for
/usr/src to "netbsd-4" and ran build.sh. Now with a 4.0 kernel:
bash-3.1# uname -a
NetBSD shlab 4.0_BETA2 NetBSD 4.0_BETA2 (GENERIC) #0: Thu Jan 11 09:38:18
CET 2007 adminmf@shlab:/usr/obj/sys/arch/i386/compile/GENERIC i386
But I get the same result: pppd receives hangup immediately, no LCP packets
exchanged.
Then I tried with an additional USB<->serial adapter in between:
PC->USB->serial_converter->RS232->mobile
this is an old USB 1.0 chipset:
uhci0 at pci0 dev 7 function 2: Intel 82371AB (PIIX4) USB Host
Controller (rev. 0x01)
uhci0: interrupting at irq 11
usb0 at uhci0: USB revision 1.0
uhub0 at usb0
uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
and this is the dmesg entry for the converter:
uplcom0 at uhub0 port 1
uplcom0: Prolific Technology Inc. USB-Serial Controller, rev 1.10/3.00,
addr 2
ucom0 at uplcom0
With ttyU0/dtyU0 instead of tty00/dty00 I get nearly the same results.
What's different:
a) the phone does not hangup after pppd has exited,
only when the remote server closes the connection (about 1min later).
b) kernel says "ppp0: got 24 bytes" instead of "ppp0: bad protocol 2206"
Jan 15 01:20:38 shlab pppd[1049]: Serial connection established.
Jan 15 01:20:38 shlab pppd[1049]: Using interface ppp0
Jan 15 01:20:38 shlab pppd[1049]: Connect: ppp0 <--> /dev/dtyU0
Jan 15 01:20:38 shlab pppd[1049]: Modem hangup
Jan 15 01:20:38 shlab pppd[1049]: Connection terminated.
Jan 15 01:20:38 shlab /netbsd: ppp0: got 24 bytes
Jan 15 01:20:38 shlab /netbsd:
ff03c0210101001402060000000005064e3dfd3107020802
Jan 15 01:20:40 shlab pppd[1049]: Exit.
c) a later chat invocation sees lots of noise, probably buffered ppp
packets from previous connect:
Jan 15 01:59:11 shlab chat[1307]: expect (OK)
Jan 15 01:59:11 shlab chat[1307]:
g&^H^F&^F^F&&^F^F^F^F^F&C^N&&F&lwg&^H^F&^F^F&&^F^F^F^F^FveFDEEFEng&^H^F^F^F^F&&^F^F^F^F^F&C^N&&F&Dwg&^H^F^F^F^F&&^F^F
Jan 15 01:59:11 shlab chat[1307]:
^F^F^F&C^N&&F&fwg&^H^F&^F^F&&^F^F^F^F^F&C^N&&F&-wg&^H^F&^F^F&vEDDDDDuC^N&&F&^Owg&^H^FF^F^F&&^F^F^F^F^F&C^N&&F&
Jan 15 01:59:11 shlab chat[1307]:
gwg&^H^FF^F^F&&^F^F^F^F^F&C^N&&F&Ewg&^H^Ff^F^F&&^F^F^F^F^F&C^N&&F&^Nwg&^H^Ff^FvDEEDDDDDeFDEEF^E&wg&^H^FF^F^F&
b and c may result from buffering in the serial adapter or from USB
transferring blocks of data.
I think by now I have ruled out as source of the problem
- the notebook rs232 interface (tty00)
ttyU0 behaves almost the same
- the data cable
works reliably on a different PC
- the phone / phone model
works on a different PC (using Linux)
three phones (Siemens ME45, 2x Siemens S35) behave exactly the same
This would leave the following suspects
- kernel rs232/tty driver or settings
- pppd tty initialisation
Are there perhaps some stty tricks I could try, which would not be
overwritten by pppd? Other things I should look at?
Best regards
Matthias