Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Decide: HFP/HSP headset microphone — needs eSCO in ng_hci, alt-setting fix in ng_ubt, sco hook wiring, and a from-scratch HFP daemon (XL)

Aperta
#237 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
c
Ambito
networking

Direzione di ricerca

Start with the linked epic nextbsd/nextbsd#473 and the E16 audio research in e16/5-audio.md section 2 to understand the scope decision. The issue names ng_hci_ulpi.c, ng_hci_evnt.c, ng_ubt.c, ng_btsocket_sco.c, the bluetooth rc script, and sdpd/profile.c as relevant entry points. Done means recording the scope decision and, regardless of that decision, wiring the SCO hook and reporting its status; any spike or full implementation also needs the listed sub-issues.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

area:bluetooth question

E16 draft id A6 · epic nextbsd/nextbsd#473

Why

A2DP (A4) gives playback only. Using a headset's microphone needs HFP or HSP: an RFCOMM AT-command channel plus a SCO/eSCO voice link. Nothing in FreeBSD base or ports implements either profile (0 code-search hits for handsfree/HFP; sdpd has no Headset/Handsfree records — usr.sbin/bluetooth/sdpd/profile.c:51-76), and the kernel half is incomplete. Quantified against releng/15.1 sys/netgraph/bluetooth:

piece state where
SCO over USB isochronous works (4 isoc xfers, reassembly) drivers/ubt/ng_ubt.c:281-282, 336-378, 1290-1366; sysctl net.bluetooth.usb_isoc_enable
isoc alt-setting selection picks the largest wMaxPacketSize alt (:738-780) instead of the alt that matches SCO bandwidth (BT-USB spec: alt 1 = one CVSD link ...) — frame-size mismatch on many dongles ng_ubt.c
HCI SCO setup legacy Add_SCO_Connection only, HV1/HV2/HV3 CVSD (ng_hci_ulpi.c:322-450); no Setup_Synchronous_Connection -> no eSCO, no mSBC wideband, no transparent air mode hci/
HCI sync events Synchronous_Connection_Complete (0x2C) / _Changed (0x2D) absent from the event switch (ng_hci_evnt.c:107-200); headset-initiated eSCO is an unhandled event hci/
SCO socket exists: PF_BLUETOOTH/SOCK_SEQPACKET/BLUETOOTH_PROTO_SCO, SO_SCO_MTU, listen/accept/connect socket/ng_btsocket_sco.c
stack wiring stock rc.d/bluetooth:119-127 never connects hci: sco to btsock_sco:; routes only appear on NGM_HCI_NODE_UP over a connected hook (ng_btsocket_sco.c:821-856) bring-up script / bluetoothd
RFCOMM exists socket/ng_btsocket_rfcomm.c
HFP AG state machine, SCO<->OSS bridge, SDP records do not exist anywhere —

Prior art: NetBSD sys/dev/bluetooth/btsco.c (Itronix, BSD-2-Clause) — a kernel audio device on a SCO PCB; design reference only, different stack API.

What shipping it would take

  1. Kernel (this repo, as patches/): Setup_Synchronous_Connection + the two sync events in ng_hci; alt-setting selection by requested SCO packet size in ng_ubt; expose eSCO parameters through SO_SCO_* sockopts. Hardware-verified only — the netgraph BT stack has no tests.
  2. bluetoothd (K/D tracks): ngctl connect ${dev}hci: btsock_sco: sco ${dev}sco at stack bring-up so SCO sockets are routable at all (cheap; do it regardless, it unblocks experiments).
  3. New userland: an HFP AG (AT+BRSF, +CIND, +CMER, AT+VGS/VGM, AT+BCC/+BCS codec select, ring/answer/hangup) over RFCOMM, SDP HANDSFREE_AUDIO_GATEWAY (0x111F) record (extend sdpd or bluetoothd-owned SDP), and an SCO<->cuse bridge (8 kHz mono CVSD, 48-byte frames / 3.75 ms) surfacing as /dev/dsp.hfp for virtual_oss.

Result even then: telephone-grade narrowband until eSCO/mSBC lands. Estimate XL.

The question

Is narrowband headset mic in scope for E16 at all, or does E16 ship A2DP-only and file HFP as its own epic (or park until LE Audio forces a BLE-side stack anyway)? Options:

  • Park (recommended): A2DP-only for E16; keep step 2 (sco hook) so the socket path is testable; file the rest as a follow-up epic.
  • Kernel-first spike: land step 1 + 2 and prove hccontrol+SCO socket can carry CVSD both ways with one dongle before committing to the daemon.
  • Full: all three, XL.

Acceptance criteria

  • Decision recorded on the epic (A2DP-only vs. spike vs. full) and this issue re-labelled/re-sized accordingly
  • Regardless of decision: bluetoothd's stack bring-up connects the sco hook (ngctl list shows ubt0sco), and bluetooth status reports whether the adapter's SCO path is wired
  • If spike/full: sub-issues filed for (1) ng_hci eSCO, (2) ng_ubt alt-setting, (3) HFP daemon + bridge

Links

  • Epic nextbsd/nextbsd#473 · A4
  • sys/netgraph/bluetooth/{drivers/ubt/ng_ubt.c,hci/ng_hci_ulpi.c,hci/ng_hci_evnt.c,socket/ng_btsocket_sco.c}, libexec/rc/rc.d/bluetooth, usr.sbin/bluetooth/sdpd/profile.c (releng/15.1); NetBSD sys/dev/bluetooth/btsco.c
  • Research: e16/5-audio.md section 2

Dependencies (E16)

  • Depends on: nextbsd/nextbsd-kernel#231 (K1), nextbsd/nextbsd-userland#218 (A4)
  • Blocks: nothing

Draft ids (K = kernel & hardware, B = engine/BLE, D = bluetoothd/CLI, H = HID, A = audio) are listed with their issue numbers in nextbsd/nextbsd#473.

Lingua principale
C
Stelle
12
Fork
3
Merge medio
2h 5m
PR unite (30g)
77

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di nextbsd/nextbsd-kernel

Tutte le issue di nextbsd/nextbsd-kernel

Issue simili

Altre issue su C

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.