Looking for a specific / general Bluetooth USB dongle(s) supported by FreeBSD...

Hello.

I'm looking for a specific Bluetooth / USB adapter that I'm sure it works on FreeBSD. It is mentioned here :


and here :


these are the exact ID numbers used by the model used to write the above tutorials :

Code:
ubt0: vendor 0x0a12 product 0x0001, rev 1.10/5.25, addr 2
ubt0: Interface 0 endpoints: interrupt=0x81, bulk-in=0x82, bulk-out=0x2
ubt0: Interface 1 (alt.config 5) endpoints: isoc-in=0x83, isoc-out=0x3;
      wMaxPacketSize=49; nframes=6, buffer size=294

Since I've already tried two different Broadcoms [listed as supported] dongles and they did not work on my FreeBSD 14.2 box even copying the exact commands issued on the tutorials,I would like to use the exact model used by the one who wrote those tutorials. In this way I'm pretty sure that it will work. Can someone help me to trace back to the exact model ?

My goal is to connect the keyboard LILYGO T-Watch with a FreeBSD supported BT dongle.
 
A quick'n'dirty duckduckgo.com tells me:
vendor 0x0a12 is Cambridge Silicon Radio Ltd. which now seem to be Qaulcomm
with product 0x0001 I guess it was their first bluetooth device, maybe contact Qaulcomm?
 
Someone on Reddit suggested to buy the Logitech bolt and I did it. It is recognized by FreeBSD as :

Code:
ugen1.6: <Logitech USB Receiver> at usbus1
ukbd0 on uhub1
ukbd0: <Logitech USB Receiver, class 0/0, rev 2.00/5.03, addr 19> on usbus1
kbd2 at ukbd0
ums0 on uhub1
ums0: <Logitech USB Receiver, class 0/0, rev 2.00/5.03, addr 19> on usbus1
ums0: 16 buttons and [XYZT] coordinates ID=2
uhid0 on uhub1
uhid0: <Logitech USB Receiver, class 0/0, rev 2.00/5.03, addr 19> on usbus1

unfortunately it does not detected as a "pure" BT device and it can't be used.

Code:
marietto# service bluetooth start ubt0
/etc/rc.d/bluetooth: ERROR: Unable to setup Bluetooth stack for device ubt0

Money wasted ?
 
Looks like it's just receiver for compatible Logitech devices and does not do bluetooth at all. May be the suggestion was to use it *instead* of using bluetooth?

I asked clearly that I was looking for a BT dongle that was able to detect this keyboard :


or more generally,every or almost every BT keyboard and or mouse.
 
By a quick glance at the product's webpage you linked and I'm not mistaken, this keyboard doesn't provide BT at all, but SPI Interface

So besides the webpage also says it's sold out, and you need to find out if it's available elswhere or anyhow, you better look for if FreeBSD and your board (Raspberry Pi? PineRock?) supports SPI.

I get the feeling you may get on the wrong track.
Well, if this is just a hobby of yours, and you wanna build just this single piece for your own joy, well, okay then. But if you're planning to go to series production, and sell some of those, from my experience as an electronics engineer who did mass production, for several reasons it's always a problem when you're too fixed on too few certain devices, and have too few alternatives/choices.

Since you said you're trying to build a FreeBSD based smartphone I wonder if BT devices were the right choice to connect fix assembled internal hardware anyway. As a radio based interface BT is meant for devices being used independently over several meters from each other. Additionally BT sucks a lot of battery's energy (by my experience) and is known to be problematic under FreeBSD anyway.

Maybe if you're looking for I2C modules (that is almost certainly supported, that's THE standard on-board-hardware-bus) or other busses (USB, PS/2, or whatever is used as standard for internal keyboards) you get (way) more choices on devices/modules, and probably fewer issues.
 
Anyway I don't understand between what and how the connection should be established.
Normally it's done by simply have the according wires (seems to be 4 at SPI) connected to each other. Your microcontroller board shall have some documentation, where the according pins are named.
Get the detailed documentation about the 40-Pin GPIO was my first guess.
The more tricky part is to get the SPI module running under FreeBSD (does FreeBSD support SPI? I don't know) (Thanks, Phishfry!), and to make it do what you want - work with the KB correctly; maybe this means some programming.
This 40-Pin GPIO may also provide USB, and I'm almost certain I2C (and others).
But I cannot tell you, which of those suits you more.
 
Therefore 4x (and it's not the 1-wire busses [since they don't count GND]) - maybe build a 8 wire parallel I2C *cough* - sorry, had :beer::beer: better leave, before I produce even more garbage.
 
A quick'n'dirty duckduckgo.com tells me:
vendor 0x0a12 is Cambridge Silicon Radio Ltd. which now seem to be Qaulcomm
with product 0x0001 I guess it was their first bluetooth device, maybe contact Qaulcomm?

That's really nice. I've bought the same BT dongle used on the tutorial :

Code:
#dmesg

ugen1.19: <Bluetooth Dongle (HCI mode) Cambridge Silicon Radio, Ltd> at usbus1, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (100mA)
ugen1.19: <vendor 0x0a12 BT DONGLE10> at usbus1
ubt0 on uhub1
ubt0: <vendor 0x0a12 BT DONGLE10, class 224/1, rev 2.00/88.91, addr 18> on usbus1
ng_hci_process_command_complete: ubt0hci - HCI command failed, OGF=0x3, OCF=0x22, status=0x1
ng_hci_process_command_complete: ubt0hci - HCI command failed, OGF=0x3, OCF=0x22, status=0x1
ng_hci_process_command_complete: ubt0hci - HCI command failed, OGF=0x3, OCF=0x22, status=0x1
ng_hci_process_command_complete: ubt0hci - HCI command failed, OGF=0x3, OCF=0x22, status=0x1
ng_hci_process_command_complete: ubt0hci - HCI command failed, OGF=0x3, OCF=0x22, status=0x1
ng_hci_process_command_complete: ubt0hci - HCI command failed, OGF=0x3, OCF=0x22, status=0x1

marietto# hccontrol -n ubt0hci read_local_version_information

hccontrol: Could not find HCI nodes
marietto# service bluetooth start
/etc/rc.d/bluetooth: ERROR: Unsupported device:

marietto# service bluetooth start ubt0

/etc/rc.d/bluetooth: ERROR: Unable to setup Bluetooth stack for device ubt0
marietto# service bluetooth start ubt0
/etc/rc.d/bluetooth: ERROR: Unable to setup Bluetooth stack for device ubt0
marietto# service bluetooth start ubt0
/etc/rc.d/bluetooth: ERROR: Unable to setup Bluetooth stack for device ubt0
marietto# service bluetooth start ubt0
/etc/rc.d/bluetooth: ERROR: Unable to setup Bluetooth stack for device ubt0
marietto# service bluetooth start ubt0
/etc/rc.d/bluetooth: ERROR: Unable to setup Bluetooth stack for device ubt0

but in my case,it does not work. So,I suppose,it works on FreeBSD versions older than 14,that's the version used when the tutorial has been written,maybe 12 or 13.
 
because that command is removed from the spec and is no longer implemented by HW vendors
edit /etc/rc.d/bluetooth
and remove from
if checkyesno bluetooth_device_authentication_en
down to
case "${bluetooth_device_encryption_mode}" in
 
You mean here ?

Code:
if checkyesno bluetooth_device_authentication_enable; then
                ${hccontrol} -n ${dev}hci write_authentication_enable 1 \
                        > /dev/null 2>&1 || return 1
        else
                ${hccontrol} -n ${dev}hci write_authentication_enable 0 \
                        > /dev/null 2>&1 || return 1
        fi
 
I did :

Screenshot_2025-06-04_12-53-03.jpg


it still does not work ?

Code:
marietto# service bluetooth start ubt0

/etc/rc.d/bluetooth: ERROR: Unable to setup Bluetooth stack for device ubt0
marietto# service bluetooth start ubt0

/etc/rc.d/bluetooth: ERROR: Unable to setup Bluetooth stack for device ubt0
marietto# service bluetooth start ubt0

/etc/rc.d/bluetooth: ERROR: Unable to setup Bluetooth stack for device ubt0
marietto# service bluetooth start ubt0

/etc/rc.d/bluetooth: ERROR: Unable to setup Bluetooth stack for device ubt0
marietto# service bluetooth start ubt0

/etc/rc.d/bluetooth: ERROR: Unable to setup Bluetooth stack for device ubt0
marietto# service bluetooth start ubt0

/etc/rc.d/bluetooth: ERROR: Unable to setup Bluetooth stack for device ubt0

marietto# hccontrol -n ubt0hci read_local_version_information

hccontrol: Could not find HCI nodes
 
I don't know if it is correct,but I cut until :

Code:
#*)
        #       warn "Unsupported encryption mode ${bluetooth_device_encryption_mode} for device ${dev}"
        #       return 1
        #       ;;
        #esac

and now :

Code:
marietto# service bluetooth start ubt0
OK

marietto# hccontrol -n ubt0hci read_local_version_information

HCI version: Bluetooth HCI Specification 5.1 [0xa]
HCI revision: 0x201
LMP version: Bluetooth LMP 5.1 [0xa]
LMP sub-version: 0x201
Manufacturer: Qualcomm Technologies International, Ltd. (QTIL) [0x0a]
 
yeah, i missed it
you can leave the lines with bluetooth_device_authentication_enable and delete those with write_encryption_mode
now
hccontrol -n ubt0@hci inquiry
 
At this point I turned on the LILYGO BT keyboard. It says that it is waiting for Bluetooth. On the Terminal of FreeBSD I do :

Code:
marietto# hccontrol -n ubt0hci inquiry

and this is what happens :

Code:
ugen1.19: <vendor 0x0a12 BT DONGLE10> at usbus1
ubt0 on uhub1
ubt0: <vendor 0x0a12 BT DONGLE10, class 224/1, rev 2.00/88.91, addr 18> on usbus1
ng_hci_process_command_complete: ubt0hci - HCI command failed, OGF=0x3, OCF=0x22, status=0x1
ng_hci_process_command_complete: ubt0hci - HCI command failed, OGF=0x3, OCF=0x22, status=0x1
ng_hci_process_command_complete: ubt0hci - HCI command failed, OGF=0x3, OCF=0x22, status=0x1
ng_hci_process_command_complete: ubt0hci - HCI command failed, OGF=0x3, OCF=0x22, status=0x1
ng_hci_process_command_complete: ubt0hci - HCI command failed, OGF=0x3, OCF=0x22, status=0x1
ng_hci_process_command_complete: ubt0hci - HCI command failed, OGF=0x3, OCF=0x22, status=0x1
ng_hci_process_command_complete: ubt0hci - HCI command failed, OGF=0x3, OCF=0x22, status=0x1
ng_hci_process_command_timeout: ubt0hci - unable to complete HCI command OGF=0x3, OCF=0x3. Timeout
ng_hci_process_command_complete: ubt0hci - HCI command failed, OGF=0x3, OCF=0x22, status=0x1
ng_hci_process_command_timeout: ubt0hci - unable to complete HCI command OGF=0x3, OCF=0x3. Timeout
ng_hci_process_command_complete: ubt0hci - HCI command failed, OGF=0x3, OCF=0x22, status=0x1
ng_hci_process_command_timeout: ubt0hci - unable to complete HCI command OGF=0x3, OCF=0x3. Timeout
ng_hci_process_command_complete: ubt0hci - HCI command failed, OGF=0x3, OCF=0x22, status=0x1
ng_hci_process_command_timeout: ubt0hci - unable to complete HCI command OGF=0x3, OCF=0x3. Timeout
ubt0: ubt_bulk_read_callback:1131: bulk-in transfer failed: USB_ERR_IOERROR
ubt0: ubt_intr_read_callback:1032: interrupt transfer failed: USB_ERR_IOERROR
ugen1.19: <vendor 0x0a12 BT DONGLE10> at usbus1 (disconnected)
ubt0: at uhub1, port 9, addr 18 (disconnected)
ubt0: detached
ugen1.19: <vendor 0x0a12 BT DONGLE10> at usbus1
ubt0 on uhub1
ubt0: <vendor 0x0a12 BT DONGLE10, class 224/1, rev 2.00/88.91, addr 19> on usbus1
 
yeah, i missed it
you can leave the lines with bluetooth_device_authentication_enable and delete those with write_encryption_mode
now
hccontrol -n ubt0@hci inquiry

Nope. If I don't delete the lines with "write_encryption_mode *" it does not work.
 
/etc/rc.d/bluetooth fixes only this
ng_hci_process_command_complete: ubt0hci - HCI command failed, OGF=0x3, OCF=0x22, status=0x1
the inquiry timeout is probably other problem
 
These lines should be removed ?

Code:
${hccontrol} -n ${dev}hci write_class_of_device ${bluetooth_device_class} \
                > /dev/null 2>&1 || return 1
 
anyway,this is the error to fix,I think :

Code:
ubt0: ubt_bulk_read_callback:1131: bulk-in transfer failed: USB_ERR_IOERROR
ubt0: ubt_intr_read_callback:1032: interrupt transfer failed: USB_ERR_IOERROR
 
Back
Top