From: Demis Balbach <db@minikn.xyz>
To: 52470@debbugs.gnu.org
Subject: [bug#52470] [PATCH] services: bluetooth: Add missing config parameters
Date: Mon, 13 Dec 2021 20:36:32 +0100 [thread overview]
Message-ID: <87bl1kthz3.fsf@minikn.xyz> (raw)
In-Reply-To: <20211213192014.8386-1-db@minikn.xyz>
[-- Attachment #1: Type: text/plain, Size: 7670 bytes --]
Hello,
this patch adds all (as far as I know) missing config parameters to the
bluetooth-service.
I added all config parameters (that were missing) that are defined in
https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/src/main.conf
If a default value was given, e.g.:
--8<---------------cut here---------------start------------->8---
# Specify the policy to the JUST-WORKS repairing initiated by peer
# Possible values: "never", "confirm", "always"
# Defaults to "never" <------------------------------------------
#JustWorksRepairing = never
--8<---------------cut here---------------end--------------->8---
I used that default value. However, there are other paramaters
(everthing under `[BR]' and almost everything under `[LE]') that don't
specify default values. They are always integers as one can see here:
https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/src/btd.h#n39
So I took a nonsensical value like `-1' and only printed the in question
with the user provided line if it did not equal -1.
This approach isn't pretty, but it worked for me, however please give
feedback regarding that.
My guile-fu is bad so I'm sure there's plenty room for improvement.
Here is the config I tested it with:
--8<---------------cut here---------------start------------->8---
(define-module (base-system)
#:use-module (gnu)
#:use-module (gnu services desktop)
#:use-module (srfi srfi-1))
(define base-operating-system
(operating-system
;; Machine settings
(host-name "geekcave")
(timezone "Europe/Berlin")
(locale "en_US.utf8")
(keyboard-layout (keyboard-layout "us" "altgr-intl"))
;; Services
(services (append (list
(service bluetooth-service-type (bluetooth-configuration
(name "test")
(class "0x123")
(discoverable-timeout 60)
(always-pairable? #f)
(pairable-timeout 20)
(device-id "bluetooth:123")
(reverse-service-discovery? #f)
(name-resolving? #f)
(debug-keys? #t)
(controller-mode 'le)
(multi-profile 'multiple)
(fast-connectable? #t)
(privacy 'network/on)
(just-works-repairing 'confirm)
(temporary-timeout 10)
(refresh-discovery? #f)
(experimental 'd4992530-b9ec-469f-ab01-6c481c47da1c)
(remote-name-request-retry-delay 20)
(page-scan-type #xFFF)
(page-scan-interval #x0)
(page-scan-window #x1)
(inquiry-scan-type #xFFFF)
(inquiry-scan-interval #x123)
(inquiry-scan-window 23890)
(link-supervision-timeout 13)
(page-timeout 9)
(min-sniff-interval 0)
(max-sniff-interval 2)
(min-advertisement-interval 0)
(max-advertisement-interval 2)
(multi-advertisement-rotation-interval 3)
(scan-interval-auto-connect 0)
(scan-window-auto-connect 0)
(scan-interval-suspend 0)
(scan-window-suspend 0)
(scan-interval-discovery 0)
(scan-window-discovery 0)
(scan-interval-adv-monitor 0)
(scan-window-adv-monitor 0)
(scan-interval-connect 0)
(scan-window-connect 0)
(min-connection-interval 0)
(max-connection-interval 1)
(connection-latency 10)
(connection-supervision-timeout 34)
(autoconnect-timeout 4)
(adv-mon-allowlist-scan-duration 20)
(adv-mon-no-filter-scan-duration 30)
(enable-adv-mon-interleave-scan 0)
(cache 'yes)
(key-size 15)
(exchange-mtu 23)
(att-channels 1)
(session-mode 'ertm)
(stream-mode 'streaming)
(reconnect-uuids (list ""))
(reconnect-attempts 3)
(reconnect-intervals (list 2 4 49))
(auto-enable? #t)
(resume-delay 29)
(rssi-sampling-period "0x10"))))
%base-services))
;; Boot loader
(bootloader (bootloader-configuration
(bootloader grub-efi-bootloader)
(target "/boot/efi")
(timeout 3)))
;; File systems
(file-systems (cons* (file-system ;; System partition
(device (file-system-label "GUIX"))
(mount-point "/")
(type "btrfs"))
(file-system ;; Boot partition
(device (file-system-label "BOOT"))
(mount-point "/boot/efi")
(type "vfat"))
%base-file-systems))))
base-operating-system
--8<---------------cut here---------------end--------------->8---
--
Best regards / Mit freundlichen Grüßen,
Demis Balbach
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 853 bytes --]
next prev parent reply other threads:[~2021-12-13 19:37 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-13 19:20 [bug#52470] [PATCH] services: bluetooth: Add missing config parameters Demis Balbach
2021-12-13 19:36 ` Demis Balbach [this message]
2021-12-14 13:03 ` Josselin Poiret via Guix-patches via
2021-12-14 14:51 ` Demis Balbach
2021-12-14 20:50 ` Demis Balbach
2021-12-19 13:11 ` Demis Balbach
2021-12-19 13:19 ` Demis Balbach
2021-12-19 16:41 ` Demis Balbach
2022-02-05 10:22 ` Demis Balbach
2022-03-09 22:43 ` bug#52470: " Ludovic Courtès
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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87bl1kthz3.fsf@minikn.xyz \
--to=db@minikn.xyz \
--cc=52470@debbugs.gnu.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.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).