[Bug 248584] usr.sbin/bluetooth/btpand: rc script to start btpand

From: <bugzilla-noreply_at_freebsd.org>
Date: Tue, 20 Aug 2024 11:00:19 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=248584

Tatsuki Makino <tatsuki_makino@hotmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #217142|0                           |1
        is obsolete|                            |
 Attachment #217433|0                           |1
        is obsolete|                            |

--- Comment #6 from Tatsuki Makino <tatsuki_makino@hotmail.com> ---
Created attachment 252945
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=252945&action=edit
patch to libexec/rc/rc.d of main branch

It has been slightly improved to be used in 14.x-STABLE.

It seems that it can be used by writing the following variables in /etc/rc.conf
of FreeBSD that has already been paired with the smartphone.

cloned_interfaces="${cloned_interfaces:-} tap0 tap2"
ifconfig_tap0_alias0="inet6 2001:db8::746f:6f74:6575:6c42 prefixlen 64"
ifconfig_tap0_alias1="inet 192.0.2.66 netmask 255.255.255.0"
ifconfig_tap2="DHCP fib 2"
dhcpd_ifaces="${dhcpd_ifaces:-} tap0" # other settings for isc-dhcpd are
omitted
btpand_profiles="tap0 tap2"
btpand_tap0_enable="YES"
btpand_tap0_tapif="tap0"
btpand_tap0_device="ubt0"
btpand_tap0_service="NAP"
btpand_tap2_enable="YES"
btpand_tap2_tapif="tap2"
btpand_tap2_device="ubt0"
btpand_tap2_service="NAP"
btpand_tap2_sdp="NO"
btpand_tap2_remote="14:XX:XX:XX:XX:7d" # BDADDR of my feature phone is using an
android 8 based OS

With this setup, I can use it as follows:
Once the smartphone has been paired, it will go through the tap0 interface.
fib 2 process uses feature phone tethering.
Termination of tethering or execution of "service btpand stop tap2" will also
terminate dhclient.
fib of dhclient is kept the way I wrote in bug 280871 comment #1.

-- 
You are receiving this mail because:
You are the assignee for the bug.