Bug 248584 - usr.sbin/bluetooth/btpand: rc script to start btpand
Summary: usr.sbin/bluetooth/btpand: rc script to start btpand
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: conf (show other bugs)
Version: Unspecified
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-wireless (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-08-11 05:04 UTC by Tatsuki Makino
Modified: 2020-08-22 00:02 UTC (History)
3 users (show)

See Also:


Attachments
patch to head/libexec/rc/rc.d/Makefile (314 bytes, patch)
2020-08-11 05:04 UTC, Tatsuki Makino
no flags Details | Diff
patch to head/libexec/rc/rc.d/btpand (4.21 KB, patch)
2020-08-11 05:07 UTC, Tatsuki Makino
no flags Details | Diff
patch to head/libexec/rc/rc.d/btpand (3.59 KB, patch)
2020-08-11 07:15 UTC, Tatsuki Makino
no flags Details | Diff
patch to head/libexec/rc/rc.d/btpand (3.60 KB, patch)
2020-08-22 00:02 UTC, Tatsuki Makino
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tatsuki Makino 2020-08-11 05:04:38 UTC
Created attachment 217142 [details]
patch to head/libexec/rc/rc.d/Makefile

Add /etc/rc.d/btpand for btpand.
If you already have one that you use, bring it here :)
Comment 1 Tatsuki Makino 2020-08-11 05:07:56 UTC
Created attachment 217143 [details]
patch to head/libexec/rc/rc.d/btpand

This was made by me.
Use it as a base for reworking :)

Below is a setting you can put in /etc/rc.conf.

# Set the tap0
cloned_interfaces="${cloned_interfaces:+${cloned_interfaces} }tap0"
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"

# The normal configuration of btpand.
btpand_enable="YES"
btpand_device="58:9c:fc:00:0e:b3"
btpand_service="NAP"

# Multi-profile settings
btpand_profiles="panu gn nap"
btpand_panu_enable="YES"
btpand_panu_device="ubt0"	# can set bluetooth device name
btpand_panu_service="PANU"
btpand_panu_remote="58:9c:fc:ed:8c:0e"	# client mode
btpand_gn_enable="YES"
btpand_gn_device="phone"	# Strings that are not device names are from /etc/bluetooth/hosts
btpand_gn_service="GN"
btpand_nap_enable="YES"
btpand_nap_device="58:9c:fc:00:0e:b3"
btpand_nap_service="NAP"
Comment 2 Tatsuki Makino 2020-08-11 05:18:22 UTC
(In reply to Tatsuki Makino from comment #1)
forgotten items orz

btpand_tapif="tap0"

btpand_panu_tapif="tap2"
btpand_gn_tapif="tap1"
btpand_nap_tapif="tap0"
Comment 3 Tatsuki Makino 2020-08-11 07:15:09 UTC
Created attachment 217146 [details]
patch to head/libexec/rc/rc.d/btpand

Removed useless bt_devaddr(3) emulation :)
Comment 4 Tatsuki Makino 2020-08-22 00:02:15 UTC
Created attachment 217433 [details]
patch to head/libexec/rc/rc.d/btpand

Pattern matching in case〜esac was not working properly.