How to use an external wifi/bluetooth dongle like AX900 brosTrend instead of internals ones and how configure it?

This is the actual configuration :
Code:
pc-hp@freebsd:~ $ sudo usbconfig | grep -B0 ugen5.2
ugen5.2: <Bluetooth 2.0 Interface [Broadcom BCM2045] HP, Inc> at usbus5, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (0mA)
pc-hp@freebsdp:~ $ pciconf -lv | grep -B3 network
bwn_pci0@pci0:2:0:0:    class=0x028000 rev=0x01 hdr=0x00 vendor=0x14e4 device=0x4315 subvendor=0x103c subdevice=0x137d
    vendor     = 'Broadcom Inc. and subsidiaries'
    device     = 'BCM4312 802.11b/g LP-PHY'
    class      = network
re0@pci0:3:0:0:class=0x020000 rev=0x02 hdr=0x00 vendor=0x10ec device=0x8168 subvendor=0x103c subdevice=0x3629
    vendor     = 'Realtek Semiconductor Co., Ltd.'
    device     = 'RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet Controller'
    class      = network
pc-hp@freebsd:~ $ dmesg -a | grep -B1 ubt0
ugen5.2: <Broadcom Corp HP Integrated Module> at usbus5
ubt0 on uhub7
ubt0: <Broadcom Corp HP Integrated Module, class 224/1, rev 2.00/1.00, addr 2> on usbus5
and when I plug in new device i can see it with:
Code:
pc-hp@freebsd:~ $ sudo usbconfig | grep -B0 ugen3.3
ugen3.3: <RTL8188GU 802.11n WLAN Adapter (Driver CDROM Mode) Realtek Semiconductor Corp.> at usbus3, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (500mA)
Look it is charged like Virtual CDROM and drives are just for windows 10/11
 
I don't know if I need to stop some services like bluetooth stack and virtual_oss ,sndio, and destroy wlandev bwn0 before to configure both services wifi/bluetooth again...

this my /etc/rc.conf:
Code:
hostname="freebsd"
keymap_default="it.kbd"
sshd_enable="YES"

sendmail_enable="NO"
sendmail_submit_enable="NO"
sendmail_outbound_enable="NO"
sendmail_msp_queue_enable="NO"

bwn0_enable="YES"
wlans_bwn0="wlan0"
ifconfig_wlan0="WPA DHCP"
create_args_wlan0="country IT regdomain ETSI"
ifconfig_wlan0_setup_dir="/usr/local/sbin/wpa_supplicant"
wpa_supplicant_config="/etc/wpa_supplicant.conf"
ifconfig_DEFAULT="DHCP inet6 accept_rtadv"

zfs_enable="YES"
zfs_default_dir="zroot/ROOT/default"
zfs_filesystem_grow="YES"

ntpd_enable="YES"
ntpd_sync_on_start="YES"
ntpd_config="/etc/ntp.conf"

powerd_enable="YES"
powerd_flags="-a hiadaptive"

moused_enable="YES"
dbus_enable="YES"
webcamd_enable="YES"
lightdm_enable="YES"
efreetd_enable="YES"
efreetd_cache_dir="/home/pc-hp/.cache/efreet/"

kld_list="linux linux64 vesa nvidia fusefs cuse alias_ftp"
fusefs_enable="YES"
alias_ftp_enable="YES"

syslogd_enable="YES"
syslogd_logfile="/var/log/syslog"
syslogd_flags="-ss

dumpdev="NO"
clear_tmp_enable="YES"

linux_enable="NO"
linux_mounts_enable="NO"
ubuntu_enable="YES"

cupsd_enable="YES"
devfs_system_ruleset="system"

ftpd_enable="YES"
ftpproxy_enable="YES"

pf_rules="/etc/pf.conf"
pf_enable="YES"
pf_flags=""
pflog_enable="YES"
pflog_logfile="/var/log/pflog"

tor_enable="YES"
privoxy_enable="YES"
snowflake_enable="YES"

apache24_enable="YES"
mariadb_enable="YES"
php_fpm_enable="YES"

bastille_enable="YES"
zfs_bastille_enable="YES"
bastille_list="reginacoeli"

jail_enable="YES"
jail_parallel_start="YES"
jail_launch_script_="/bin/sh -c ./deschie-jail.sh"
jail_flags="-f /etc/jail.conf /etc/jail.conf.d/deschie-jail.conf"
jails_list="deschie"

defaultrouter="192.168.1.1"
ifconfig_wlan0bridge_ipv6="inet6 auto_linklocal"
ifconfig_virbr0="addm wlan0 up"
ifconfig_tap0="up"
ifconfig_tap1="up"

cloned_interfaces="bridge0 lo1"
ifconfig_lo1_name="bastille0"
ifconfig_bridge0_name="re0bridge"
ifconfig_re0="DHCP"
ifconfig_re0_ipv6="inet6 accept_rtadv"
ifconfig_re0bridge="addm re0 up"
ifconfig_e0b_reginacoeli_name="vnet0"
ifconfig_vnet0="up"

devd_enable="YES"
autofs_enable="NO"

cron_enable="NO"
fcron_enable="YES"
seatd_enable="YES"

bridge_enable="YES"
cloned_interface="bridge1"
ifconfig_bridge1_name="virbr0"
ifconfig_wlan0bridge="addm wlan0 up"

rtsold_enable="YES"
natd_enable="YES"
natd_interface="re0"
natd_flags="-f /etc/natd.conf"

firewall_enable="YES"
ipfw_enable="YES"
firewall_script="/etc/ipfw.rules"
rtadvd_enable="YES"
rtadvd_interfaces="re0"

libvirtd_enable="NO"
dnsmasq_enable="NO"
aio_enable="NO"
qemu_guest_agent_enable="NO"

gateway_enable="YES"
ipv6_gateway_enable="YES"
firewall_type="open"
firewall_logging="YES"
firewall_nat_enable="YES"

sdpd_enable="YES"
local_unbound_enable="YES"

virtual_oss_enable="NO"
virtual_oss_configs="dsp"
#virtual_oss_dsp="/dev/sndstat -S -Q 0 -C 0 -c 2 -r 48000 -b 16 -s 24ms -P /dev>
#virtual_oss_dsp="/dev/sndstat -S -i 8 -x 85,3,20 -C 16 -c 8 -r 48000 -b 32 -s >
virtual_oss_dsp="/dev/sndstat -S -a o,-4 -C 2 -c 2 -r 44100 -b 16 -s 20ms -R /d>
#virtual_oss_dsp="/dev/sndstat -S -Q 0 -C 2 -c 2 -r 44100 -b 16 -s 24ms -R /dev>
sndiod_enable="YES"

ntpdate_enable="YES"
ntpdate_hosts="pool.ntp.org"
saned_enable="YES"

spamd_flags="-u spamd -H /var/spool/spamd"
spamd_enable="YES"
spotifyd_enable="YES"
webcamd_0_flags="-d ugen7.3"
samba_server_enable="YES"
mountd_enable="NO"
rpcbind_enable="YES"

bluetooth_enable="YES"
ubt0_enable="YES"
ubt0_flags="-d ugen5.2"
#ubt1_enable="YES"
#ubt1_flags="-d ugen3.3"
hcsecd_enable="YES"
hcsecd_flags="-f /etc/bluetooth/hcsecd.conf"
#bluetooth_config_dir="-f /etc/bluetooth/hosts"
smartd_enable="YES"
sndio_enable="NO"
 
sudo -s -H then :
# pkg ins usb_modeswitch-2.6.0_1
# usb_modeswitch -KW -v 0bda -p 1a2b
it gives that result:
Take all parameters from the command line


* usb_modeswitch: handle USB devices with multiple modes
* Version 2.6.0 (C) Josua Dietze 2017
* Based on libusb1/libusbx

! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor= 0x0bda
DefaultProduct= 0x1a2b

StandardEject=1

Look for default devices ...
found USB ID 0000:0000
found USB ID 0000:0000
found USB ID 0000:0000
found USB ID 0000:0000
found USB ID 0000:0000
found USB ID 0000:0000
found USB ID 0000:0000
found USB ID 0000:0000
found USB ID 1b3f:2008
found USB ID 5986:0137
found USB ID 1bcf:08a0
found USB ID 03f0:171d
found USB ID 0513:0318
found USB ID 0bda:1a2b
vendor ID matched
product ID matched
Found devices in default mode (1)
Access device 003 on bus 003
Get the current device configuration ...
Current configuration number is 1
Use interface number 0
with class 8
Use endpoints 0x05 (out) and 0x84 (in)

USB description data (for identification)
-------------------------
Manufacturer: Realtek
Product: DISK
Serial No.: not provided
-------------------------
Sending standard EJECT sequence
Looking for active drivers ...
OK, driver detached
Set up interface 0
Use endpoint 0x05 for message sending ...
Trying to send message 1 to endpoint 0x05 ...
LIBUSB_FUNCTION: libusb_bulk_transfer enter
LIBUSB_FUNCTION: libusb_submit_transfer enter
LIBUSB_FUNCTION: libusb_submit_transfer leave 0
LIBUSB_FUNCTION: libusb_handle_events_timeout_completed enter
LIBUSB_FUNCTION: libusb10_handle_events_sub enter
LIBUSB_FUNCTION: libusb_handle_events_timeout_completed exit
LIBUSB_FUNCTION: libusb_handle_events_timeout_completed enter
LIBUSB_FUNCTION: libusb10_handle_events_sub enter
LIBUSB_TRANSFER: sync I/O done
LIBUSB_FUNCTION: libusb_handle_events_timeout_completed exit
LIBUSB_FUNCTION: libusb_bulk_transfer leave
OK, message successfully sent
Read the response to message 1 (CSW) ...
LIBUSB_FUNCTION: libusb_bulk_transfer enter
LIBUSB_FUNCTION: libusb_submit_transfer enter
LIBUSB_FUNCTION: libusb_submit_transfer leave 0
LIBUSB_FUNCTION: libusb_handle_events_timeout_completed enter
LIBUSB_FUNCTION: libusb10_handle_events_sub enter
LIBUSB_TRANSFER: sync I/O done
LIBUSB_FUNCTION: libusb_handle_events_timeout_completed exit
LIBUSB_FUNCTION: libusb_bulk_transfer leave
Response successfully read (13 bytes), status 0
Trying to send message 2 to endpoint 0x05 ...
LIBUSB_FUNCTION: libusb_bulk_transfer enter
LIBUSB_FUNCTION: libusb_submit_transfer enter
LIBUSB_FUNCTION: libusb_submit_transfer leave 0
LIBUSB_FUNCTION: libusb_handle_events_timeout_completed enter
LIBUSB_FUNCTION: libusb10_handle_events_sub enter
LIBUSB_TRANSFER: sync I/O done
LIBUSB_FUNCTION: libusb_handle_events_timeout_completed exit
LIBUSB_FUNCTION: libusb_bulk_transfer leave
OK, message successfully sent
Read the response to message 2 (CSW) ...
LIBUSB_FUNCTION: libusb_bulk_transfer enter
LIBUSB_FUNCTION: libusb_submit_transfer enter
LIBUSB_FUNCTION: libusb_submit_transfer leave 0
LIBUSB_FUNCTION: libusb_handle_events_timeout_completed enter
LIBUSB_FUNCTION: libusb10_handle_events_sub enter
LIBUSB_TRANSFER: sync I/O done
LIBUSB_FUNCTION: libusb_handle_events_timeout_completed exit
LIBUSB_FUNCTION: libusb_bulk_transfer leave
Response successfully read (13 bytes), status 0
Trying to send message 3 to endpoint 0x05 ...
LIBUSB_FUNCTION: libusb_bulk_transfer enter
LIBUSB_FUNCTION: libusb_submit_transfer enter
LIBUSB_FUNCTION: libusb_submit_transfer leave 0
LIBUSB_FUNCTION: libusb_handle_events_timeout_completed enter
LIBUSB_FUNCTION: libusb10_handle_events_sub enter
LIBUSB_TRANSFER: sync I/O done
LIBUSB_FUNCTION: libusb_handle_events_timeout_completed exit
LIBUSB_FUNCTION: libusb_bulk_transfer leave
Sending the message returned error -99. Try to continue
Read the response to message 3 (CSW) ...
LIBUSB_FUNCTION: libusb_bulk_transfer enter
LIBUSB_FUNCTION: libusb_submit_transfer enter
LIBUSB_FUNCTION: libusb_submit_transfer leave 0
LIBUSB_FUNCTION: libusb_handle_events_timeout_completed enter
LIBUSB_FUNCTION: libusb10_handle_events_sub enter
LIBUSB_TRANSFER: sync I/O done
LIBUSB_FUNCTION: libusb_handle_events_timeout_completed exit
LIBUSB_FUNCTION: libusb_bulk_transfer leave
Response reading failed (error -99)
Device is gone, skip any further commands
# usbconfig
...ugen3.3: <802.11ax WLAN Adapter Realtek Semiconductor Corp.> at usbus3, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (500mA)

Now I should create a rule to autoswitch at startup:
  • udev rules file: /usr/local/lib/udev/rules.d/40-usb_modeswitch.rules
  • Device-specific configuration file: /usr/local/share/usb_modeswitch/[vendor_id]:[product_id]

  • The configuration process involves:
    • Adding a rule to the udev rules file
    • Creating a device-specific configuration file with target information:

    • Configuration Steps:
    • Add to /usr/local/lib/udev/rules.d/40-usb_modeswitch.rules:

    • DefaultVendor= 0x0bda
      DefaultProduct= 0x1a2b


    • #802.11ax WLAN Adapter Realtek Semiconductor Corp.
      ATTR{idVendor}=="0bda", ATTR{idProduct}=="1a2b", RUN+="usb_modeswitch '/%k'"

    • Create /usr/local/share/usb_modeswitch/0bda:1a2b with:
  • # 802.11ax WLAN Adapter Realtek Semiconductor Corp.
    TargetVendor= 0x0bda
    TargetProduct=0x1a2b
    StandardEject=1

  • Deactivating USB Mode Switching​

    In some cases, you may need to disable the mode switching functionality:
    1. Edit the configuration file:

      sudo nano /usr/local/etc/usb_modeswitch.conf
    2. Change DisableSwitching=0 to DisableSwitching=1
    3. Reboot the system:

      sudo reboot
 
Last edited:
That's what I found in a post hope will be useful:
# dmesg -a | grep -i usb
...
ugen3.3: <Realtek DISK> at usbus3
umass0: <Realtek DISK, class 0/0, rev 2.00/0.00, addr 3> on usbus3
ugen3.3: <Realtek DISK> at usbus3 (disconnected)
ugen3.3: <Realtek 802.11ax WLAN Adapter> at usbus3
 
i have a similar dual thumb, wifi and bluetooth, but with a different chip, recognized as AIC 88M80, something.
i tried before, when i had installed Slackware 15 as my only OS to unlock and configure that thumb, but i was able to only unlock wi-fi part, not the bluetooth one, so, is now sort of a limbo, is not in disk mode, but not fully unlocked either...

i was able, at that time, to find a github link with some stuff about that... what describe the lad there is exactly the behavior of my thumb.

i was able, following things shown there to unlock wifi part... somehow, but bluetooth part, nope.

if i connect that thumb on my current FreeBSD (15.1) and check dmesg, i get that text, and... no clue of what to do next, to completely unlock that thing, and use both wifi and bluetooth thing.

Code:
ugen0.4: <AIC 88M80> at usbus0
umass2 on uhub0
umass2: <AIC 88M80, class 0/0, rev 2.00/10.01, addr 20> on usbus0
umass2:  SCSI over Bulk-Only; quirks = 0x0
umass2:9:2: Attached to scbus9
da2 at umass-sim2 bus 2 scbus9 target 0 lun 0
da2: <LGX WIFI6 2.30> Removable Direct Access SCSI-2 device
da2: Serial Number 12345FLAVX
da2: 40.000MB/s transfers
da2: 3MB (7944 512 byte sectors)
da2: quirks=0x2<NO_6_BYTE>
(da2:umass-sim2:2:0:0): CACHE PAGE TOO SHORT data len 11 desc len 8
(da2:umass-sim2:2:0:0): Mode page 8 missing, disabling SYNCHRONIZE CACHE
ugen0.4: <AIC 88M80> at usbus0 (disconnected)
umass2: at uhub0, port 3, addr 20 (disconnected)
da2 at umass-sim2 bus 2 scbus9 target 0 lun 0
da2: <LGX WIFI6 2.30>  s/n 12345FLAVX detached
(da2:umass-sim2:2:0:0): Periph destroyed
umass2: detached
ugen0.4: <Realte) eluetooth 5.4 Radio> at usbus0 -------

the last three messages appeared after i physically disconnected the AX900 thumb, and connected in same usb 3 port my realtek bluetooth thumb... but this realtek one is another story...

any idea, any thought about any missed package(s) to install next of what is already installed trying to solve that problem?

side note, i installed FreeBSD without any bluetooth thumb connected, so, bsdinstall had no idea about this, and i already have eth0 for lan/internet, so, no issue about wifi, but bluetooth. activating wifi on my desktop is a good thing, maybe, but is not really mandatory for me.
 
Back
Top