From owner-freebsd-bluetooth@freebsd.org Sun Mar 1 09:46:10 2020 Return-Path: Delivered-To: freebsd-bluetooth@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 245B826B60C for ; Sun, 1 Mar 2020 09:46:10 +0000 (UTC) (envelope-from jason-fbsd-bluetooth@shalott.net) Received: from waffle.shalott.net (waffle.shalott.net [209.151.236.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.shalott.net", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Vdh00X1Vz4bw8 for ; Sun, 1 Mar 2020 09:46:07 +0000 (UTC) (envelope-from jason-fbsd-bluetooth@shalott.net) Received: (qmail 5758 invoked by uid 2034); 1 Mar 2020 09:45:59 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 1 Mar 2020 09:45:59 -0000 Date: Sun, 1 Mar 2020 01:45:59 -0800 (PST) From: jason-fbsd-bluetooth@shalott.net X-X-Sender: jason@waffle.shalott.net To: freebsd-bluetooth@freebsd.org Subject: ath3k USB bluetooth card not detected by ng_ubt, possible regression Message-ID: User-Agent: Alpine 2.22 (LRH 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII X-Rspamd-Queue-Id: 48Vdh00X1Vz4bw8 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of jason-fbsd-bluetooth@shalott.net designates 209.151.236.43 as permitted sender) smtp.mailfrom=jason-fbsd-bluetooth@shalott.net X-Spamd-Result: default: False [-1.37 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.06)[-0.058,0]; IP_SCORE(-0.01)[country: US(-0.05)]; R_SPF_ALLOW(-0.20)[+mx:shalott.net]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[shalott.net]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; FROM_NO_DN(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; ASN(0.00)[asn:11051, ipnet:209.151.224.0/19, country:US]; RCVD_TLS_ALL(0.00)[] X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Mar 2020 09:46:10 -0000 Hello. I am trying to get an ath3k-based USB bluetooth adapter working. I previously had this adapter working under FreeBSD, several years ago (FreeBSD-8 or FreeBSD-9 timeframe); but it doesn't seem to work now on my current FreeBSD-12 box. After loading the firmware, it is not detected by ng_ubt. The card is an ASUS USB-BT211, and shows up as vendor 0x0cf3 product 0x3000. Attempts to use the ath3kfw utility fail: # ath3kfw -D -d ugen1.4 -f /usr/local/share/ath3k-firmware -I ath3kfw: opening dev 1.4 ath3k_get_state: libusb_control_transfer() failed: code=-4 main: ath3k_get_state() failed! However, the old kernel-based firmware loader (https://people.freebsd.org/~emax/) still seems to work. After building and loading ath3k-1.ko and ubtath3kfw.ko and inserting my card, I get: ugen1.4: at usbus1 ubtath3kfw0 on uhub5 ubtath3kfw0: on usbus1 ugen1.4: at usbus1 (disconnected) ubtath3kfw0: at uhub5, port 2, addr 4 (disconnected) ubtath3kfw0: detached ugen1.4: at usbus1 The switch from 0x3000 to 0x3002 seems to indicate that the card is, in fact, loading the firmware correctly. However, when I load ng_ubt.ko, it does not seem to detect the card, and no ubt0 device ever shows up. The machine is an amd64 box, running 12.1-STABLE; the card is plugged into a USB2 port, though the machine does have a USB3 controller as well. Please let me know what other info I can provide or what I can try to help figure out why the card is not being detected correctly by the ng_ubt driver. It would also be nice to figure out why the user-space firmware loader consistently fails but the old kernel-based firmware loader consistently succeeds; but as long as there's a method to load the firmware at all, this is less urgent. Thanks. -Jason