From owner-freebsd-bluetooth@FreeBSD.ORG Thu Oct 27 15:44:57 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 E028416A41F for ; Thu, 27 Oct 2005 15:44:57 +0000 (GMT) (envelope-from nike_d@cytexbg.com) Received: from office.suresupport.com (office.suresupport.com [213.145.98.15]) by mx1.FreeBSD.org (Postfix) with SMTP id 67A6C43D45 for ; Thu, 27 Oct 2005 15:44:54 +0000 (GMT) (envelope-from nike_d@cytexbg.com) Received: (qmail 39960 invoked by uid 1026); 27 Oct 2005 15:49:28 -0000 Received: from 213.145.98.14 by office.suresupport.com (envelope-from , uid 1004) with qmail-scanner-1.23 (f-prot: 4.4.2/3.14.11. Clear:RC:1(213.145.98.14):. Processed in 0.122583 secs); 27 Oct 2005 15:49:28 -0000 Received: from unknown (HELO 14.98.145.213.in-addr.arpa) (213.145.98.14) by office.suresupport.com with SMTP; 27 Oct 2005 15:49:28 -0000 From: Niki Denev To: freebsd-current@freebsd.org Date: Thu, 27 Oct 2005 18:44:51 +0300 User-Agent: KMail/1.8 MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2622268.ksZTiH4Ovt"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200510271844.52361.nike_d@cytexbg.com> Cc: freebsd-bluetooth@freebsd.org Subject: 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: Thu, 27 Oct 2005 15:44:58 -0000 --nextPart2622268.ksZTiH4Ovt Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hello, i'm trying to setup a bluetooth gprs connection. the problem is that the connection works only if i start rfcomm_sppd on a TTY,=20 and then start manually ppp with "set device" the=20 same TTY. rfcomm_pppd and rcomm_sppd with stdin/stdout does not work properly as the bluetooth modem echoes everyting back. I get the same results with the bluetooth modems on a Nokia 6230 phone and Motorola RazrV3. Here is exactly what happens when i start rfcomm_sppd on console : =2D------------------ root@phobos# rfcomm_sppd -a gsm -c 1 rfcomm_sppd[2628]: Starting on stdin/stdout... atz atz atz atz ate0 ate0 ^Crfcomm_sppd[2628]: Signal 2 received. Total 1 signals received rfcomm_sppd[2628]: Completed on stdin/stdout =2D----------------- (i typed two times atz, and one time ate0 and it was echoed right back) When i start rfcomm_pppd the ppp daemon begins to write in the log that he is talking to himself (several "magic is same" errors, and disconne= ct) But when i start rfcomm_sppd in the background on a tty it is working properly: =2D----------------- root@phobos# rfcomm_sppd -a gsm -c 1 -b -t /dev/ttyp0 root@phobos# cu -l /dev/ttyp0 Connected atz OK ~ [EOT] =2D----------------- I'm running about one week old 7.0-CURRENT but have experienced this for quite some time. Also, i'm using a usb bluetooth dongle, and the /etc/rc.bluetooth init script. does anyone have idea what can be causing this? =2D-=20 =2D-niki PGP KeyId: 0xF2DB7EB9 --nextPart2622268.ksZTiH4Ovt Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (FreeBSD) iD8DBQBDYPX0HNAJ/fLbfrkRApTHAJ0St5mVt3bgPcgRR2211bysgkcIJACfUE7R zlSvpqgKA9XtmjcvyJGwWmE= =2nM5 -----END PGP SIGNATURE----- --nextPart2622268.ksZTiH4Ovt-- From owner-freebsd-bluetooth@FreeBSD.ORG Thu Oct 27 17:17:56 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 4863216A41F; Thu, 27 Oct 2005 17:17:56 +0000 (GMT) (envelope-from maksim.yevmenkin@savvis.net) Received: from ismybrain.com (ismybrain.com [64.246.42.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id D7EEF43D48; Thu, 27 Oct 2005 17:17:55 +0000 (GMT) (envelope-from maksim.yevmenkin@savvis.net) Received: from [10.254.186.111] (localhost.localdomain [127.0.0.1]) by ismybrain.com (8.11.6/8.11.6) with ESMTP id j9RHHrJ19614; Thu, 27 Oct 2005 13:17:54 -0400 Message-ID: <43610BBE.4070406@savvis.net> Date: Thu, 27 Oct 2005 10:17:50 -0700 From: Maksim Yevmenkin User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050404) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Niki Denev References: <200510271844.52361.nike_d@cytexbg.com> In-Reply-To: <200510271844.52361.nike_d@cytexbg.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-bluetooth@freebsd.org, freebsd-current@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: Thu, 27 Oct 2005 17:17:56 -0000 Niki, > i'm trying to setup a bluetooth gprs connection. > the problem is that the connection works > only if i start rfcomm_sppd on a TTY, > and then start manually ppp with "set device" the > same TTY. have you tried to specify set device "!/usr/bin/rfcomm_sppd -a gsm -c 1" inside your /etc/ppp/ppp.conf file? this way ppp(8) will start rfcomm_sppd(1) automatically and will use its stdin/stdout. > rfcomm_pppd and rcomm_sppd with stdin/stdout > does not work properly as the bluetooth modem > echoes everyting back. > I get the same results with the bluetooth modems > on a Nokia 6230 phone and Motorola RazrV3. do not panic :) i do not think it ever worked the way you are trying to, i.e. running rfcomm_sppd(1) from the terminal. the stdin/stdout mode was added specifically for the folks who wanted to use rfcomm_sppd(1) in ppp(8), i.e. 'set device' just like above. i should probably fix it just to avoid confusion. > When i start rfcomm_pppd the ppp daemon begins to write in the log > that he is talking to himself (several "magic is same" errors, and disconnect) hmmm... thats strange... rfcomm_pppd(8) should not have this problem. > But when i start rfcomm_sppd in the background on a tty > it is working properly: > ------------------ > root@phobos# rfcomm_sppd -a gsm -c 1 -b -t /dev/ttyp0 > root@phobos# cu -l /dev/ttyp0 > Connected > atz > OK > ~ > [EOT] > ------------------ > > I'm running about one week old 7.0-CURRENT but > have experienced this for quite some time. > Also, i'm using a usb bluetooth dongle, > and the /etc/rc.bluetooth init script. > > does anyone have idea what can be causing this? i will look into this and fix it thanks, max From owner-freebsd-bluetooth@FreeBSD.ORG Thu Oct 27 17:32:29 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 DF8F816A41F for ; Thu, 27 Oct 2005 17:32:29 +0000 (GMT) (envelope-from nike_d@cytexbg.com) Received: from office.suresupport.com (office.suresupport.com [213.145.98.15]) by mx1.FreeBSD.org (Postfix) with SMTP id 8EFA843D45 for ; Thu, 27 Oct 2005 17:32:28 +0000 (GMT) (envelope-from nike_d@cytexbg.com) Received: (qmail 82571 invoked by uid 1026); 27 Oct 2005 17:37:02 -0000 Received: from 213.145.98.14 by office.suresupport.com (envelope-from , uid 1004) with qmail-scanner-1.23 (f-prot: 4.4.2/3.14.11. Clear:RC:1(213.145.98.14):. Processed in 0.092192 secs); 27 Oct 2005 17:37:02 -0000 Received: from unknown (HELO 14.98.145.213.in-addr.arpa) (213.145.98.14) by office.suresupport.com with SMTP; 27 Oct 2005 17:37:02 -0000 From: Niki Denev To: Maksim Yevmenkin Date: Thu, 27 Oct 2005 20:32:25 +0300 User-Agent: KMail/1.8 References: <200510271844.52361.nike_d@cytexbg.com> <43610BBE.4070406@savvis.net> In-Reply-To: <43610BBE.4070406@savvis.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2123593.LxDxz9QQKN"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200510272032.26480.nike_d@cytexbg.com> Cc: freebsd-bluetooth@freebsd.org, freebsd-current@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: Thu, 27 Oct 2005 17:32:30 -0000 --nextPart2123593.LxDxz9QQKN Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Thursday 27 October 2005 20:17, Maksim Yevmenkin wrote: [some parts of the original mail snipped] > have you tried to specify > > set device "!/usr/bin/rfcomm_sppd -a gsm -c 1" > > inside your /etc/ppp/ppp.conf file? this way ppp(8) will start > rfcomm_sppd(1) automatically and will use its stdin/stdout. > No, but i've tried it now and it works!=20 Thank you! > i should probably fix it just to avoid confusion. > > > When i start rfcomm_pppd the ppp daemon begins to write in the log > > that he is talking to himself (several "magic is same" errors, and > > disconnect) > > hmmm... thats strange... rfcomm_pppd(8) should not have this problem. > i can test patches, provide more info, etc.. if needed. > > > > does anyone have idea what can be causing this? > > i will look into this and fix it > > thanks, > max > Thanks! =2D-=20 =2D-niki PGP KeyId: 0xF2DB7EB9 --nextPart2123593.LxDxz9QQKN Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (FreeBSD) iD8DBQBDYQ8qHNAJ/fLbfrkRAv19AJ9pmYwc05zTzjo1zhCuhrxf1AKqRgCguIYW 5lNBn3rmqZau+TNeWDWyAOg= =AEm2 -----END PGP SIGNATURE----- --nextPart2123593.LxDxz9QQKN-- From owner-freebsd-bluetooth@FreeBSD.ORG Thu Oct 27 21:53:28 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 91EE816A424; Thu, 27 Oct 2005 21:53:28 +0000 (GMT) (envelope-from maksim.yevmenkin@savvis.net) Received: from ismybrain.com (ismybrain.com [64.246.42.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id B8B0143D48; Thu, 27 Oct 2005 21:53:27 +0000 (GMT) (envelope-from maksim.yevmenkin@savvis.net) Received: from [10.254.186.111] (localhost.localdomain [127.0.0.1]) by ismybrain.com (8.11.6/8.11.6) with ESMTP id j9RLrPJ31507; Thu, 27 Oct 2005 17:53:25 -0400 Message-ID: <43614C53.7020207@savvis.net> Date: Thu, 27 Oct 2005 14:53:23 -0700 From: Maksim Yevmenkin User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050404) 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> In-Reply-To: <200510272032.26480.nike_d@cytexbg.com> Content-Type: multipart/mixed; boundary="------------020104060604000501010300" Cc: freebsd-bluetooth@freebsd.org, freebsd-current@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: Thu, 27 Oct 2005 21:53:28 -0000 This is a multi-part message in MIME format. --------------020104060604000501010300 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Niki, >> have you tried to specify >> >> set device "!/usr/bin/rfcomm_sppd -a gsm -c 1" >> >> inside your /etc/ppp/ppp.conf file? this way ppp(8) will start >> rfcomm_sppd(1) automatically and will use its stdin/stdout. > > No, but i've tried it now and it works! Thank you! sure >> i should probably fix it just to avoid confusion. 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. >>> When i start rfcomm_pppd the ppp daemon begins to write in the >>> log that he is talking to himself (several "magic is same" >>> errors, and disconnect) >> >> hmmm... thats strange... rfcomm_pppd(8) should not have this >> problem. > > i can test patches, provide more info, etc.. if needed. could you please post /etc/ppp/ppp.conf entry you where using with rfcomm_pppd? thanks, max --------------020104060604000501010300 Content-Type: text/plain; name="rfcomm_sppd.patch.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="rfcomm_sppd.patch.txt" Index: rfcomm_sppd.1 =================================================================== RCS file: /usr/local/cvs/usr.bin/bluetooth/rfcomm_sppd/rfcomm_sppd.1,v retrieving revision 1.6 diff -u -r1.6 rfcomm_sppd.1 --- rfcomm_sppd.1 3 Nov 2004 20:16:02 -0000 1.6 +++ rfcomm_sppd.1 27 Oct 2005 21:44:49 -0000 @@ -91,6 +91,10 @@ .It Fl t Ar tty Slave pseudo tty name. If not set stdin/stdout will be used. +All input and output processing on stdin/stdout will be disabled, +giving a +.Dq raw I/O +path. This option is required if .Fl b option was specified. Index: rfcomm_sppd.c =================================================================== RCS file: /usr/local/cvs/usr.bin/bluetooth/rfcomm_sppd/rfcomm_sppd.c,v retrieving revision 1.8 diff -u -r1.8 rfcomm_sppd.c --- rfcomm_sppd.c 3 Nov 2004 20:16:02 -0000 1.8 +++ rfcomm_sppd.c 27 Oct 2005 21:34:29 -0000 @@ -73,6 +73,7 @@ int n, background, channel, s, amaster, aslave, fd; fd_set rfd; char *tty = NULL, buf[SPPD_BUFFER_SIZE]; + struct termios defterm, term; memcpy(&addr, NG_HCI_BDADDR_ANY, sizeof(addr)); background = channel = 0; @@ -118,6 +119,9 @@ usage(); /* NOT REACHED */ + if (tty == NULL && background) + errx(1, "Must specify tty name to run in background mode"); + /* Set signal handlers */ memset(&sa, 0, sizeof(sa)); sa.sa_handler = sppd_sighandler; @@ -147,11 +151,13 @@ /* Open TTYs */ if (tty == NULL) { - if (background) - usage(); - amaster = STDIN_FILENO; fd = STDOUT_FILENO; + + tcgetattr(amaster, &defterm); + term = defterm; + cfmakeraw(&term); + tcsetattr(amaster, TCSADRAIN, &term); } else { if (sppd_ttys_open(tty, &amaster, &aslave) < 0) exit(1); @@ -159,7 +165,6 @@ fd = amaster; } - /* Open RFCOMM connection */ memset(&ra, 0, sizeof(ra)); ra.rfcomm_len = sizeof(ra); @@ -264,7 +269,8 @@ if (tty != NULL) { close(aslave); close(amaster); - } + } else + tcsetattr(amaster, TCSADRAIN, &defterm); return (0); } --------------020104060604000501010300-- From owner-freebsd-bluetooth@FreeBSD.ORG Fri Oct 28 01:05:53 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 6B2F316A41F for ; Fri, 28 Oct 2005 01:05:53 +0000 (GMT) (envelope-from nike_d@cytexbg.com) Received: from server300.com (server300.com [216.35.196.26]) by mx1.FreeBSD.org (Postfix) with ESMTP id ABEBD43D45 for ; Fri, 28 Oct 2005 01:05:52 +0000 (GMT) (envelope-from nike_d@cytexbg.com) Received: (qmail 6551 invoked by uid 502); 28 Oct 2005 01:05:51 -0000 Received: from unknown (HELO ?10.0.0.13?) (nike?d@82.199.197.152) by ns1.server300.com with (RC4-MD5 encrypted) SMTP; 28 Oct 2005 01:05:51 -0000 Message-ID: <436179B0.5080206@cytexbg.com> Date: Fri, 28 Oct 2005 04:06:56 +0300 From: Niki Denev User-Agent: Mozilla Thunderbird 1.0.6 (X11/20050908) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Maksim Yevmenkin References: <200510271844.52361.nike_d@cytexbg.com> <43610BBE.4070406@savvis.net> <200510272032.26480.nike_d@cytexbg.com> <43614C53.7020207@savvis.net> In-Reply-To: <43614C53.7020207@savvis.net> X-Enigmail-Version: 0.92.0.0 OpenPGP: id=F2DB7EB9 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-bluetooth@freebsd.org, freebsd-current@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 01:05:53 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Maksim, > 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 > 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 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) So maybe ppp in -direct mode is not setting properly the line in raw mode? > thanks, > max > Thanks, - --niki -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFDYXmvHNAJ/fLbfrkRAhJdAJ4kOGNd7qT11B0Gpe3I9KvyNs4f0gCfWGKq NnH1PuHtQQZAqwrTe1gqc9Q= =tT0i -----END PGP SIGNATURE----- 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 From owner-freebsd-bluetooth@FreeBSD.ORG Fri Oct 28 09:39:50 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 5FE7C16A41F for ; Fri, 28 Oct 2005 09:39:50 +0000 (GMT) (envelope-from nike_d@cytexbg.com) Received: from mail.interbgc.com (mx01.interbgc.com [217.9.224.225]) by mx1.FreeBSD.org (Postfix) with SMTP id 9CED843D46 for ; Fri, 28 Oct 2005 09:39:49 +0000 (GMT) (envelope-from nike_d@cytexbg.com) Received: (qmail 85822 invoked from network); 28 Oct 2005 09:39:47 -0000 Received: from nike_d@cytexbg.com by keeper.interbgc.com by uid 1002 with qmail-scanner-1.14 (uvscan: v4.2.40/v4374. spamassassin: 2.63. Clear:SA:0(-2.6/8.0):. Processed in 2.202697 secs); 28 Oct 2005 09:39:47 -0000 X-Spam-Status: No, hits=-2.6 required=8.0 Received: from 213-240-205-57.1697748.ddns.cablebg.net (HELO tormentor.totalterror.net) (213.240.205.57) by mx01.interbgc.com with SMTP; 28 Oct 2005 09:39:45 -0000 Received: (qmail 20678 invoked from network); 28 Oct 2005 09:39:44 -0000 Received: from qmail by qscan (mail filter); 28 Oct 2005 09:39:44 +0000 Received: from unknown (HELO ?10.0.0.3?) (10.0.0.3) by tormentor.totalterror.net with SMTP; 28 Oct 2005 09:39:44 -0000 Message-ID: <4361F20C.5010308@cytexbg.com> Date: Fri, 28 Oct 2005 12:40:28 +0300 From: Niki Denev User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Maksim Yevmenkin 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> <436198B4.4020808@savvis.net> In-Reply-To: <436198B4.4020808@savvis.net> X-Enigmail-Version: 0.92.1.0 OpenPGP: Content-Type: text/plain; charset=ISO-8859-1 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 09:39:50 -0000 Maksim Yevmenkin wrote: > 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 sorry my bad.. i never noticed that the chat script is not started... now with force-scripts everything works! > # You might want to change these > set authname > set authkey > set phone "*99***1#" i set authname and key on the phone, so i can use 2 different phones with two different operators without any changes on my laptop. and the phone "*99#" is what i got from the mobile operators (it works via usb2serial cable) > > # 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 > I adjusted some parts which were not right :) I have setup this file and dial string so long ago that i can't even remember :) I use 'resolv readonly' on purpose, because i set my resolv.conf with nameserver 127.0.0.1 and also run dnscache (from djbdns) on that ip. everytime i connect the linkup script adds the DNS servers to the dnscache config, and this greatly helps the high latency gprs link :) (the setup similar for dhclient, using /etc/dhclient-exit-hooks) > 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. > yes, i prefer having 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. > i left 'speed' only in 'default' now >> 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 Yes, you are absolutely right! And again, thank You very much for your help! cheers, --niki