From: Marcel Holtmann <marcel@holtmann.org>
To: Maxim Uvarov <maxim.uvarov@linaro.org>
Cc: "Johan Hedberg" <johan.hedberg@gmail.com>,
"Luiz Augusto von Dentz" <luiz.dentz@gmail.com>,
"Jakub Kicinski" <kuba@kernel.org>,
linux-bluetooth <linux-bluetooth@vger.kernel.org>,
netdev@vger.kernel.org,
"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
"Ilias Apalodimas" <ilias.apalodimas@linaro.org>,
"François Ozog" <francois.ozog@linaro.org>
Subject: Re: [RFC] bt control interface out from debugfs
Date: Tue, 28 Sep 2021 13:05:19 +0200 [thread overview]
Message-ID: <98214D73-18D8-4A7E-BB66-6E69E8A608DB@holtmann.org> (raw)
In-Reply-To: <CAD8XO3Z3FDFdaJOgoXgjn=_Ly6AQp+wugKNDN01098EVJB4qEw@mail.gmail.com>
Hi Maxim,
> I think we need to move control for BT 6lowpan connection out of
> kernel debugfs to user space tools. I.e. use hcitool or iproute2 and
> add proper non debug kernel interface for the tools.
> I would like to hear about some suggestions on what is the best interface here.
>
> Currently commands to setup connection are:
> echo 1 > /sys/kernel/debug/bluetooth/6lowpan_enable
> echo "connect 80:E1:26:1B:95:81 1" > /sys/kernel/debug/bluetooth/6lowpan_control
>
> It looks logical to enable 6lowpan inside hcitool. I.e. extend current
> AF_BLUETOOTH socket protocol:
> dd = socket(AF_BLUETOOTH, SOCK_RAW | SOCK_CLOEXEC, BTPROTO_HCI)
> getsockopt(dd, SOL_HCI, HCI_FILTER, ..
> add some HCI_6LOWPAN_ENABLE call.
> What are your thoughts on that?
NAK.
>
> Then we have an IP stack on top of the BT layer, and hcitool does not
> intend to setup ip connection. iproute2 might be more suitable for
> this case. Something like:
> ip link connect dev bt0 type bt 80:E1:26:1B:95:81 type local
> (type 1- local, 2- public) .
>
> But here is the problem that "ip link connect" is missing in current
> tools. And usually we just set up a local connection and connect from
> the app using a socket. With IP over BT connection is different -
> we should be connected before.
>
> If we implement "ip link connect" then it will be possible to reuse it
> for all other pear to pear connections like vpn wireguard.
>
> Any thoughts on an interface here?
Sure, give that a spin.
Regards
Marcel
prev parent reply other threads:[~2021-09-28 11:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-28 10:47 [RFC] bt control interface out from debugfs Maxim Uvarov
2021-09-28 11:05 ` Marcel Holtmann [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=98214D73-18D8-4A7E-BB66-6E69E8A608DB@holtmann.org \
--to=marcel@holtmann.org \
--cc=francois.ozog@linaro.org \
--cc=ilias.apalodimas@linaro.org \
--cc=johan.hedberg@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luiz.dentz@gmail.com \
--cc=maxim.uvarov@linaro.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).