From owner-freebsd-bluetooth@FreeBSD.ORG Wed Mar 5 17:56:09 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 C52331065672 for ; Wed, 5 Mar 2008 17:56:09 +0000 (UTC) (envelope-from maksim.yevmenkin@gmail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.156]) by mx1.freebsd.org (Postfix) with ESMTP id 42D548FC2E for ; Wed, 5 Mar 2008 17:56:08 +0000 (UTC) (envelope-from maksim.yevmenkin@gmail.com) Received: by fg-out-1718.google.com with SMTP id 16so1438336fgg.35 for ; Wed, 05 Mar 2008 09:56:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; bh=PYzr2yvd809x3lC9ADTrXjWz2ONW5K3VOdDBZ6j5+HI=; b=A8FyZLz3fSIs7sS7E0gMjKEnkbQ7pmLxU+B5KLXQRAWJvgL8kMMIczyHc2wSmz0mhaMuELV/SCVVH2VYw9IY2YxE+/iEiCu5phPQj5K75/STDP3FiahGOWCWKgQJz85FQwtRWVwAoegMyg756j1+FFaW6n31SJ/mIjWB/Jo9dqo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=dtQ6MK9kTllKGoHfaRdE8MxFTI1jUh87+Segwb0CWTvIDuIBoiw2euyrXZMp8W+6j0fx2po/zyJ+sHGnWca2Z+Irz2WxJiMKXdMGF1c5iqfMHDdLwigYNEo2PAWrMp/3XDCBh61EbA9KOq/2QE5jYKyugNRfuFECas3QJTzpVhc= Received: by 10.86.73.17 with SMTP id v17mr3349039fga.56.1204739767920; Wed, 05 Mar 2008 09:56:07 -0800 (PST) Received: by 10.86.23.12 with HTTP; Wed, 5 Mar 2008 09:56:07 -0800 (PST) Message-ID: Date: Wed, 5 Mar 2008 09:56:07 -0800 From: "Maksim Yevmenkin" To: "eng. Anatoli Marinov" In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_2330_9771868.1204739767911" References: <335adcd30803050335k162b5014kac786a2442f06e10@mail.gmail.com> Cc: freebsd-bluetooth@freebsd.org Subject: Re: DUN over bluethoot 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, 05 Mar 2008 17:56:09 -0000 ------=_Part_2330_9771868.1204739767911 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello Anatoli, [...] > 2) teach rfcomm_pppd(8) to register DUN profile as well as LAN > profile. this should be easy to do. however, you will need to tweak > your ppp(8) configuration and add fake chat script to emulate modem > AT-command exchange. i have attached the patch that implements option (2) above. please try it and let me know. the patch adds new -D option to the rfcomm_pppd(8). when -D is specified, rfcomm_pppd(8) server will register DUN service on the same channel as LAN service. keep in mind that remote client will still be thinking that it talks to the modem-type device. it means that there will be AT-command exchange before client starts talking PPP. you will need to fake this AT-command exchange using ppp(8) chat scripts. please read ppp(8) man page and pay attention to "force-scripts" option. to make rfcomm_pppd(8) server register DUN service you will need to start it as # rfcomm_pppd -s -d -D -C 7 -l default in case you did not get the attachment, the patch can be downloaded from http://people.freebsd.org/~emax/rfcomm_pppd.dun.patch.txt thanks, max ------=_Part_2330_9771868.1204739767911 Content-Type: text/plain; name=rfcomm_pppd.dun.patch.txt Content-Transfer-Encoding: base64 X-Attachment-Id: f_fdg6sd5y0 Content-Disposition: attachment; filename=rfcomm_pppd.dun.patch.txt SW5kZXg6IHJmY29tbV9wcHBkLjgKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT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