This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

machines.coaxmetal: persistent bt-agent + evict stale BLE devices

Xbox pads pair via JustWorks; on reconnect a pad whose bond went stale
re-initiates pairing, which needs a registered agent to auto-confirm. bluetuith
only has an agent while actively pairing in it, so an autonomous re-pair hit
"No agent available for request type 2" and the link dropped right after
connecting. Run bt-agent -c NoInputNoOutput as a persistent default agent so
pairing/re-pairing always completes.

Also set TemporaryTimeout=30 so the LAN party's hundreds of stray BLE devices
are evicted from the cache instead of piling up and saturating the adapter.

+21
+21
machines/coaxmetal/strom.nix
··· 136 136 # back on (otherwise bonded pads bond but never re-link). Fine on a 137 137 # mains-powered kiosk. 138 138 FastConnectable = true; 139 + # In this busy-RF LAN environment the cache fills with hundreds of stray 140 + # BLE devices; evict non-bonded ones ~30s after they leave range so they 141 + # do not pile up and saturate the adapter. 142 + TemporaryTimeout = 30; 143 + }; 144 + 145 + # Persistent JustWorks pairing agent. Xbox pads pair via JustWorks, and on 146 + # reconnect a pad whose bond went stale re-initiates pairing. bluez needs a 147 + # registered agent to auto-confirm that; bluetuith only provides one while you 148 + # are actively pairing in it, so an autonomous re-pair hits "No agent 149 + # available for request type 2" and the link drops. Keep a NoInputNoOutput 150 + # agent registered at all times so pairing/re-pairing just works. 151 + systemd.services.bt-agent = { 152 + wantedBy = [ "multi-user.target" ]; 153 + after = [ "bluetooth.service" ]; 154 + requires = [ "bluetooth.service" ]; 155 + serviceConfig = { 156 + ExecStart = "${pkgs.bluez-tools}/bin/bt-agent -c NoInputNoOutput"; 157 + Restart = "always"; 158 + RestartSec = 2; 159 + }; 139 160 }; 140 161 }