Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 May 2011 03:23:58 -0700
From:      Jeremy Chadwick <freebsd@jdc.parodius.com>
To:        "crsnet.pl" <crsnet@crsnet.pl>
Cc:        freebsd-hardware@freebsd.org, freebsd-current@freebsd.org, freebsd-stable@freebsd.org, freebsd-questions@freebsd.org, freebsd-drivers@freebsd.org
Subject:   Re: FreeBSD 8.2 and Lenovo X300 WWAN Modem
Message-ID:  <20110518102358.GA71561@icarus.home.lan>
In-Reply-To: <8bce9b8a86d5c7a83095d8e58f794f64@i-pi.pl>
References:  <8bce9b8a86d5c7a83095d8e58f794f64@i-pi.pl>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, May 18, 2011 at 11:40:36AM +0200, crsnet.pl wrote:
> Hello.
> Have here anyone run this modem/GPS under FreeBSD 8.2 ? Modem is
> recognized, but when i try to run ppp -ddial iplus i get this error
> :
> 
> /var/log/messages
> May 18 11:20:59 x60s ppp[1656]: tun0: Warning: Chat script failed
> 
> /var/log/ppp
> May 18 11:20:53 x60s ppp[1656]: tun0: Phase: deflink: opening -> dial
> May 18 11:20:53 x60s ppp[1656]: tun0: Chat: Send: AT^M
> May 18 11:20:53 x60s ppp[1656]: tun0: Chat: Expect(2): OK
> May 18 11:20:53 x60s ppp[1656]: tun0: Chat: Received: AT^M^M
> May 18 11:20:53 x60s ppp[1656]: tun0: Chat: Received: OK^M
> May 18 11:20:53 x60s ppp[1656]: tun0: Chat: Send: AT+CFUN=1^M
> May 18 11:20:53 x60s ppp[1656]: tun0: Chat: Expect(2): OK
> May 18 11:20:53 x60s ppp[1656]: tun0: Chat: Received: AT+CFUN=1^M^M
> May 18 11:20:53 x60s ppp[1656]: tun0: Chat: Received: ERROR^M

I'm not familiar with GPS modem units, but I am familiar with classic
modems and a little bit with chat scripts from my Linux days.

A couple things -- and possibly these GPS modems behave differently than
what I was used to back in the early 90s:

1) Based on the chat logs above, it looks like echo mode is enabled on
the modem.  The client should be sending "AT\r", and it should receive
the response "OK\r".  Instead, the log indicates what you're getting
back is "AT\r\rOK\r".

2) Regardless of #1, the AT+CFUN=1 command you're sending to the modem
results in the modem itself responding with ERROR.  This isn't coming
from ppp, chat, or anything else -- the modem is literally responding
with ERROR itself.  Meaning, that command (obviously not Hayes!) the
modem firmware doesn't know how to interpret.  I have no idea what
+CFUN=1 does, but then again the modem doesn't seem to either.  :-)

So I guess my advice would be: fix your chat script to work properly
with your modem.  :-)  Your script is here:

>  set dial "ABORT BUSY TIMEOUT 2 \
>         \"\" \
>         AT OK-AT-OK \
>         AT+CFUN=1 OK-AT-OK \
>         AT+CMEE=2 OK-AT-OK \
>         AT+CSQ OK \
>         AT+CGDCONT=1,\\\"IP\\\",\\\"internet\\\" OK \
>         AT+CGACT? OK-AT-OK \
>         AT+CGATT? OK \
>         AT+CGCLASS? OK \
>         AT+COPS? OK \
>         ATD*99***1# CONNECT"

-- 
| Jeremy Chadwick                                   jdc@parodius.com |
| Parodius Networking                       http://www.parodius.com/ |
| UNIX Systems Administrator                  Mountain View, CA, USA |
| Making life hard for others since 1977.               PGP 4BD6C0CB |




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110518102358.GA71561>