From owner-freebsd-bluetooth@FreeBSD.ORG Fri Oct 28 03:19:17 2005 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A630616A41F for ; Fri, 28 Oct 2005 03:19:17 +0000 (GMT) (envelope-from maksim.yevmenkin@savvis.net) Received: from mta11.adelphia.net (mta11.adelphia.net [68.168.78.205]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2590943D4C for ; Fri, 28 Oct 2005 03:19:16 +0000 (GMT) (envelope-from maksim.yevmenkin@savvis.net) Received: from [192.168.1.254] (really [70.32.199.60]) by mta11.adelphia.net (InterMail vM.6.01.05.02 201-2131-123-102-20050715) with ESMTP id <20051028031916.POHB27774.mta11.adelphia.net@[192.168.1.254]>; Thu, 27 Oct 2005 23:19:16 -0400 Message-ID: <436198B4.4020808@savvis.net> Date: Thu, 27 Oct 2005 20:19:16 -0700 From: Maksim Yevmenkin User-Agent: Mozilla Thunderbird 0.7.1 (Windows/20040626) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Niki Denev References: <200510271844.52361.nike_d@cytexbg.com> <43610BBE.4070406@savvis.net> <200510272032.26480.nike_d@cytexbg.com> <43614C53.7020207@savvis.net> <436179B0.5080206@cytexbg.com> In-Reply-To: <436179B0.5080206@cytexbg.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-bluetooth@freebsd.org Subject: Re: rfcomm problems X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Oct 2005 03:19:17 -0000 Niki, >> please find attached patch. the patch will put stdin/stdout into >> 'raw' mode when no tty was specified. it should fix the problem you >> were having. >> >> keep in mind that there is no escape sequence, so you have to kill >> rfcomm_sppd(1) by hand to terminate the session. >> >> could you please try to use rfcomm_sppd(1) in both stdin/stdout >> mode and in 'set device ...' ppp(8) mode. > > I was also thinking about trying to put stdin/stdout in raw mode to > see if it will work before i saw your email :) (because this was the > only difference i found between using tty and stdin/stdout) > > With this patch i can issue properly commands to the gsm modem and > get response with rfcomm_sppd in stdin/stdout mode. (it seems to not > reset the terminal properly on exit, but i think you know that :) ) I > have also properly connected to internet via gprs and with 'set > device "!/usr/bin/rfcomm_sppd -a gsm -c1"' in ppp.conf great! thanks for your help. btw, rfcomm_sppd(1) _should_ properly restore terminal settings if it was killed with SIGTERM (-15). if you kill it with SIGKILL (-9) then you will mess your terminal settings. >> could you please post /etc/ppp/ppp.conf entry you where using with >> rfcomm_pppd? > > default: > set log Phase Chat LCP IPCP CCP tun command > ident user-ppp VERSION (built COMPILATIONDATE) > set speed 115200 > set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \ > \"\" AT OK ATE1Q0 OK \\dATDT\\T TIMEOUT 40 CONNECT" > set timeout 0 > resolv readonly > enable dns > > bt-gprs: > set speed 115200 > set phone *99\# > set ifaddr 0 0 255.255.255.255 > add default HISADDR > > bt-gprs2: > set speed 115200 > set device "!/usr/bin/rfcomm_sppd -a gsm -c1" > set phone *99\# > set ifaddr 0 0 255.255.255.255 > add default HISADDR > > This is the whole ppp.conf > I try to use the first label 'bt-gprs' for rfcomm_pppd. i'm pretty sure 'bt-grps' label is incomplete. at the very least you need 'enable force-scripts' otherwise ppp(8) will not execute chat script. btw, there is a working example in rfcomm_pppd(8) man page rfcomm-dialup: # This is IMPORTANT option enable force-scripts # You might want to change these set authname set authkey set phone "*99***1#" # You might want to adjust dial string as well set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \ \"\" AT OK-AT-OK ATE1Q0 OK \\dATD\\T TIMEOUT 40 CONNECT" set login set timeout 30 enable dns resolv rewrite set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0 add default HISADDR also some folks prefers to configure access point name, etc. in 'set dial', but i assume you have configured it on the phone. > (i think i can use only one label, because as far as i remember ppp(8) > ignores 'set device' in -direct mode, but i made two just to be sure) i'm not sure about this. also you have 'set speed' in every label. having it only in 'default' should be enough. > So maybe ppp in -direct mode is not setting properly the line in raw > mode? no, i'm pretty sure ppp(8) does the right thing. in fact 'set device !rfcomm_sppd' worked even before my patch. thanks, max