From owner-freebsd-bluetooth@FreeBSD.ORG Fri Apr 4 19:03:52 2008 Return-Path: Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4A1AF1065671 for ; Fri, 4 Apr 2008 19:03:52 +0000 (UTC) (envelope-from gamato@users.sf.net) Received: from slimak.dkm.cz (smtp.dkm.cz [62.24.64.34]) by mx1.freebsd.org (Postfix) with SMTP id A5E3B8FC18 for ; Fri, 4 Apr 2008 19:03:51 +0000 (UTC) (envelope-from gamato@users.sf.net) Received: (qmail 80097 invoked by uid 0); 4 Apr 2008 19:03:49 -0000 Received: from r5j117.net.upc.cz (HELO ?192.168.11.3?) (86.49.9.117) by smtp.dkm.cz with SMTP; 4 Apr 2008 19:03:49 -0000 Message-ID: <47F67B95.4060402@users.sf.net> Date: Fri, 04 Apr 2008 21:03:49 +0200 From: mato User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8.1.13) Gecko/20080402 SeaMonkey/1.1.9 MIME-Version: 1.0 To: Maksim Yevmenkin , freebsd-bluetooth@freebsd.org References: <47DBE7A4.3060006@users.sf.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Re: BT issues 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, 04 Apr 2008 19:03:52 -0000 Maksim Yevmenkin wrote: > 2) please cut and paste the following rc script into > /etc/rc.d/rfcomm_pppd_server > > == > > #!/bin/sh > # > # $FreeBSD$ > # > > # PROVIDE: rfcomm_pppd_server > # REQUIRE: DAEMON sdpd > # BEFORE: LOGIN > # KEYWORD: nojail > > . /etc/rc.subr > > name="rfcomm_pppd_server" > rcvar=`set_rcvar` > command="/usr/sbin/rfcomm_pppd" > command_args="-s" > start_precmd="rfcomm_pppd_server_prestart" > required_modules="ng_btsocket" > > rfcomm_pppd_server_prestart() > { > if [ -n "${rfcomm_pppd_server_bd_addr}" ]; then > command_args="${command_args} -a ${rfcomm_pppd_server_bd_addr}" > fi > > command_args="${command_args} -C ${rfcomm_pppd_server_channel:-1}" > > command_args="${command_args} -l > ${rfcomm_pppd_server_label:-rfcomm-server}" > > if checkyesno rfcomm_pppd_server_register_sp ; then > command_args="${command_args} -S" > fi > > if checkyesno rfcomm_pppd_server_register_dun ; then > command_args="${command_args} -D" > fi > } > > load_rc_config $name > run_rc_command "$1" > > == > > 3) to enable rfcomm_pppd server at boot time just add to your > /etc/rc.conf the following line > > rfcomm_pppd_server_enanble="YES" > rfcomm_pppd_server_channel=1 # EDIT THIS IF NEEDED > rfcomm_pppd_server_label="rfcomm-server" # EDIT THIS IF NEEDED > rfcomm_pppd_server_register_sp="NO" > rfcomm_pppd_server_register_dun="NO" > > this should start rfcomm_pppd server on boot automatically. to > start/stop rfcomm_pppd server at run time use > > /etc/rc.d/rfcomm_pppd start/stop > > Hi Max, Thanks for the script but I would need it expanded a bit. The thing is that because I connect both FreeBSD and Windows as clients I had to create 2 slightly different ppp.conf labels (it didn't work for me with one label only). Therefore I created 2 simple scripts, each starting rfcomm_pppd with different label on different channel. Then I run them manually or automatically from cron at startup. Do you think it would be possible to cover situations like mine within your script ? Something like specifying for instance rfcomm_pppd_server_channel="1,2" .. ? Cheers, Martin