From owner-freebsd-bluetooth@FreeBSD.ORG Tue Jan 23 19:05:52 2007 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1BC2416A40F for ; Tue, 23 Jan 2007 19:05:52 +0000 (UTC) (envelope-from plunky@rya-online.net) Received: from smarthost01.eng.net (smarthost01.eng.net [213.130.146.173]) by mx1.freebsd.org (Postfix) with ESMTP id 5A50213C50D for ; Tue, 23 Jan 2007 19:05:50 +0000 (UTC) (envelope-from plunky@rya-online.net) Received: from netmail01.eng.net ([213.130.128.38] helo=rya-online.net) by smarthost01.eng.net with smtp (Exim 4.62) (envelope-from ) id 1H9Qxg-0004An-G5; Tue, 23 Jan 2007 19:05:45 +0000 Received: (nullmailer pid 2412 invoked by uid 1000); Tue, 23 Jan 2007 17:59:42 -0000 Date: Tue, 23 Jan 2007 17:59:42 +0000 (GMT) To: Maksim Yevmenkin In-Reply-To: <45A7C992.4040805@savvis.net> References: <20070112082200.GA67105@old.com.ua> <45A7C992.4040805@savvis.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Message-Id: <1169575182.661050.3030.nullmailer@galant.ukfsn.org> From: Iain Hibbert Cc: freebsd-bluetooth@freebsd.org Subject: rfcomm_sppd 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: Tue, 23 Jan 2007 19:05:52 -0000 Hi Max, I was working on rfcomm_sppd(1) today (because for NetBSD I didn't port rfcomm_pppd but somebody was asking after server functionality) and I think I discovered the solution to a longstanding problem, which is.. ..if I use 'rfcomm_sppd -a phone -c dun -t ttyp9', then try to access the remote service with 'cu -l ttyp9' it never did work properly and I didn't understand why. Anyway, I was fiddling around and I saw that you had set the slave tty into raw mode. If I remove that, then 'cu -l ttyp9' works just fine! So, I wonder if this is different on FreeBSD? Do you recall why you chose to put the slave tty into raw mode? I claim no expertise over pty(4) but I can't really think why rfcomm_sppd should care about the slave tty settings? regards, iain From owner-freebsd-bluetooth@FreeBSD.ORG Wed Jan 24 12:11:52 2007 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0868E16A403 for ; Wed, 24 Jan 2007 12:11:52 +0000 (UTC) (envelope-from plunky@rya-online.net) Received: from post.rya-online.net (post.rya-online.net [195.26.225.220]) by mx1.freebsd.org (Postfix) with ESMTP id C7EF613C47E for ; Wed, 24 Jan 2007 12:11:51 +0000 (UTC) (envelope-from plunky@rya-online.net) Received: from rya-online.net (unknown [217.154.254.216]) by post.rya-online.net (Postfix) with SMTP id 9778A1D4358; Wed, 24 Jan 2007 11:49:37 +0000 (GMT) Received: (nullmailer pid 1567 invoked by uid 1000); Wed, 24 Jan 2007 11:20:18 -0000 Date: Wed, 24 Jan 2007 11:20:18 +0000 (GMT) To: Maksim Yevmenkin In-Reply-To: <1169575182.661050.3030.nullmailer@galant.ukfsn.org> References: <20070112082200.GA67105@old.com.ua> <45A7C992.4040805@savvis.net> <1169575182.661050.3030.nullmailer@galant.ukfsn.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Message-Id: <1169637618.976327.1758.nullmailer@galant.ukfsn.org> From: Iain Hibbert Cc: freebsd-bluetooth@freebsd.org Subject: Re: rfcomm_sppd 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: Wed, 24 Jan 2007 12:11:52 -0000 On Tue, 23 Jan 2007, Iain Hibbert wrote: > Do you recall why you chose to put the slave tty into raw mode? I claim no > expertise over pty(4) but I can't really think why rfcomm_sppd should care > about the slave tty settings? also, regarding the slave tty - I notice that if I do the following % rfcomm_sppd -a phone -c dun -t ttyp9 % cu -l ttyp9 then it works fine, but if I exit cu and try again % cu -l ttyp9 I get a "Device Busy" error. I tracked this down to the fact that cu sets TIOCEXCL but never unsets it. While arguably cu should clean up after itself, I wonder if you really do need to hold open the slave tty? If I don't do that then it works as advertised and I can access the slave as many times as I want with no problems.. regards, iain From owner-freebsd-bluetooth@FreeBSD.ORG Wed Jan 24 22:31:22 2007 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3F22516A401 for ; Wed, 24 Jan 2007 22:31:22 +0000 (UTC) (envelope-from plunky@rya-online.net) Received: from smarthost01.eng.net (smarthost01.eng.net [213.130.146.173]) by mx1.freebsd.org (Postfix) with ESMTP id 08F1A13C45D for ; Wed, 24 Jan 2007 22:31:22 +0000 (UTC) (envelope-from plunky@rya-online.net) Received: from netmail01.eng.net ([213.130.128.38] helo=rya-online.net) by smarthost01.eng.net with smtp (Exim 4.62) (envelope-from ) id 1H9qeB-0007vq-Rj; Wed, 24 Jan 2007 22:31:21 +0000 Received: (nullmailer pid 3192 invoked by uid 1000); Wed, 24 Jan 2007 19:17:51 -0000 Date: Wed, 24 Jan 2007 19:17:51 +0000 (GMT) To: "Yevmenkin\, Maksim" In-Reply-To: <752BEA668A46FE468D9CF64D8AC99EE48C269F@idc1exc0004.corp.global.level3.com> References: <752BEA668A46FE468D9CF64D8AC99EE48C269F@idc1exc0004.corp.global.level3.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Message-Id: <1169666271.571167.2409.nullmailer@galant.ukfsn.org> From: Iain Hibbert Cc: freebsd-bluetooth@freebsd.org Subject: RE: rfcomm_sppd 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: Wed, 24 Jan 2007 22:31:22 -0000 On Wed, 24 Jan 2007, Yevmenkin, Maksim wrote: > Into /etc/ppp/ppp.conf file, it never quite worked when executed from > console/terminal. I have a patch sitting in my tree that fixes it and > makes rfcomm_sppd behave like cu. Yeah, I have something like this also ("stty -icanon -echo -icrnl" might do it?). I'm not quite sure if its proper, but I think a program like pppd that expects a certain state would probably set raw mode in any case.. > > I get a "Device Busy" error. I tracked this down to the fact that cu > > sets TIOCEXCL but never unsets it. > > I'm not sure why you getting this error. I just tried it on my machine > and it works just fine. Perhaps there are some minor differences between > FreeBSD and netbsd, or, more likely, I'm doing something wrong :) It could be the fault of our cu - last year NetBSD switched from Taylor UUCP cu to the BSD one that is included with tip, probably some differences.. > Rfcomm_sppd will open and hold slave tty open until Bluetooth connection > is terminated. The idea was to create an illusion of "real" serial port, > just like /dev/ttydX. One can re-connect to rfcomm serial device as many > times as needed as along as Bluetooth connection is up (in a sense > serial device is present in the system). Yeah I read that in the manpage, but closing the slave device doesn't make anything happen on the master on NetBSD, maybe thats a difference.. > Bluetooth serial port server which I never got around to do because I'm > still not sure about the semantics. Who should "own" serial port offered > to the remote devices: specific user or system? Well, there are lots of ownership issues with bluetooth that are yet unaddressed - I think that deep down, baseband connections should be owned by the user who creates them, but I'm not thinking about that because its going to be difficult. regards, iain