Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Mar 2008 09:56:07 -0800
From:      "Maksim Yevmenkin" <maksim.yevmenkin@gmail.com>
To:        "eng. Anatoli Marinov" <tolisoft@gmail.com>
Cc:        freebsd-bluetooth@freebsd.org
Subject:   Re: DUN over bluethoot
Message-ID:  <bb4a86c70803050956he7235aen4613e4b6ab27eecd@mail.gmail.com>
In-Reply-To: <bb4a86c70803050924p7c615cd4y486db34703678391@mail.gmail.com>
References:  <335adcd30803050335k162b5014kac786a2442f06e10@mail.gmail.com> <bb4a86c70803050924p7c615cd4y486db34703678391@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
------=_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
PT09P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ICopICZkdW4sIHNpemVvZihkdW4pLAorCQkJCQlOVUxMKSAhPSAwKSB7CisJCQkJc3lzbG9nKExP
R19FUlIsICJVbmFibGUgdG8gcmVnaXN0ZXIgRFVOICIgXAorCQkJCQkic2VydmljZSB3aXRoIGxv
Y2FsIFNEUCBkYWVtb24uICIgXAorCQkJCQkiJXMgKCVkKSIsIHN0cmVycm9yKHNkcF9lcnJvcihz
cykpLAorCQkJCQlzZHBfZXJyb3Ioc3MpKTsKKwkJCQlleGl0KDEpOworCQkJfQorCQl9CisKKwkJ
LyoKIAkJICogUmVnaXN0ZXIgU1AgKFNlcmlhbCBQb3J0KSBzZXJ2aWNlIG9uIHRoZSBzYW1lIFJG
Q09NTSBjaGFubmVsCiAJCSAqIGlmIHJlcXVlc3RlZC4gSXQgYXBwZWFycyB0aGF0IHNvbWUgY2Vs
bCBwaG9uZXMgYXJlIHVzaW5nIHNvCiAJCSAqIGNhbGxlZCAiY2FsbGJhY2sgbWVjaGFuaXNtIi4g
SW4gdGhpcyBzY2VuYXJpbyB1c2VyIGlzIHRyeWluZwo=
------=_Part_2330_9771868.1204739767911--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bb4a86c70803050956he7235aen4613e4b6ab27eecd>