Success with BrosTrend USB WiFi dongle - somewhere to document the process?

Hi @devraghu

I have re-run these steps from a fresh card and confirmed that they are working for me. Any issues, then we can attempt fixing together.

  1. Flashed new SD card with arm335x-debian-11.7-iot-armhf-2023-09-02-4gb.img.xz

  2. Enable USB Internet Sharing on your host PC or Mac so that the Beagle can reach the internet with a DNS server IP defined in /etc/resolv.conf. eg nameserver 1.1.1.1

  3. Install packages, switch to root user and download Brostrend installer into /tmp. Make sure backticks enclose uname-r and not apostrophe chars.

sudo apt update
sudo apt install linux-headers-`uname -r`
sudo apt install dkms
sudo su -
cd /tmp
wget [linux.brostrend.com/install](http://linux.brostrend.com/install)
chmod +x install
  1. Insert WiFi dongle into your Beagle’s USB host socket (I’m using the TechLab cape so no soldering needed in my case).

  2. Run the installer. The device type should be auto-recognised, if not select option (e). Installing involves compiling kernel so give it 10 minutes or so to complete.

root@BeagleBone:/tmp# ./install

Switching the adapter from storage to WLAN mode
Package manager is: apt-get
Installing prerequisites
Hit:1 http://deb.debian.org/debian bullseye InRelease
Get:2 http://deb.debian.org/debian bullseye-updates InRelease [44.1 kB]        
Get:3 http://security.debian.org/debian-security bullseye-security InRelease [48.4 kB]
Hit:4 http://repos.rcn-ee.com/debian bullseye InRelease                        
Fetched 92.4 kB in 5s (17.5 kB/s)                                              
Reading package lists... Done
Downloading the aic8800 driver
2024-01-04 21:03:14 URL:https://linux.brostrend.com/aic8800-dkms.deb [535400/535400] -> "aic8800-dkms.deb" [1]
Installing and compiling the driver
dpkg-query: no packages found matching aic8800-dkms
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'aic8800-dkms' instead of './aic8800-dkms.deb'
The following NEW packages will be installed:
  aic8800-dkms
0 upgraded, 1 newly installed, 0 to remove and 61 not upgraded.
Need to get 0 B/535 kB of archives.
After this operation, 2275 kB of additional disk space will be used.
Get:1 /tmp/tmp.z7FNjRrYGE/aic8800-dkms.deb aic8800-dkms all 1.0.3-0b1 [535 kB]
Selecting previously unselected package aic8800-dkms.
(Reading database ... 90416 files and directories currently installed.)
Preparing to unpack .../aic8800-dkms.deb ...
Unpacking aic8800-dkms (1.0.3-0b1) ...
Setting up aic8800-dkms (1.0.3-0b1) ...
Loading new aic8800-1.0.3 DKMS files...
Building for 5.10.168-ti-r71
Building initial module for 5.10.168-ti-r71
Done.

aic8800_fdrv.ko.xz:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/5.10.168-ti-r71/updates/dkms/

aic_load_fw.ko.xz:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/5.10.168-ti-r71/updates/dkms/

depmod.............

DKMS: install completed.

=====================================================
 The driver was successfully installed!
 We'd appreciate an Amazon product review:
 https://www.amazon.com/review/create-review/listing
  1. Assuming the install script reports success, the WiFi dongle is now in WiFi mode (having switch from its initial state of Mass Storage Device).

  2. Configure WiFi SSID, password, auth type and country. For me in the UK I had to set to country=GB and my auth is WPK. The file to change is below.

debian@BeagleBone:~$ cat /etc/wpa_supplicant/wpa_supplicant-wlan0.conf

ctrl_interface=DIR=/run/wpa_supplicant GROUP=netdev
update_config=1
p2p_disabled=1
country=GB
network={
     ssid="<your-ssid>"
     psk="<your-password>"
     proto=WPA
}
  1. Reboot and reconnect to the beagle using your usb internet sharing connection: (wifi will be disabled after reboot)
sudo reboot
  1. Run this command to manually enable the WiFi mode.
sudo usb_modeswitch -KW -v a69c -p 5721
  1. Check that wlan0 has an IP address assigned
debian@BeagleBone:~$ ip addr

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: usb0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 1c:63:49:f1:b6:fc brd ff:ff:ff:ff:ff:ff
    inet 192.168.7.2/24 brd 192.168.7.255 scope global usb0
       valid_lft forever preferred_lft forever
    inet6 fe80::1e63:49ff:fef1:b6fc/64 scope link 
       valid_lft forever preferred_lft forever
3: usb1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 1c:63:49:f1:b6:fe brd ff:ff:ff:ff:ff:ff
    inet 192.168.2.2/24 brd 192.168.2.255 scope global usb1
       valid_lft forever preferred_lft forever
    inet6 fe80::1e63:49ff:fef1:b6fe/64 scope link 
       valid_lft forever preferred_lft forever
4: can0: <NOARP,ECHO> mtu 16 qdisc noop state DOWN group default qlen 10
    link/can 
5: can1: <NOARP,ECHO> mtu 16 qdisc noop state DOWN group default qlen 10
    link/can 
6: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 74:19:f8:10:ff:b5 brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.67/24 brd 192.168.0.255 scope global dynamic wlan0
       valid_lft 86291sec preferred_lft 86291sec
    inet6 fe80::7619:f8ff:fe10:ffb5/64 scope link 
       valid_lft forever preferred_lft forever
  1. Disable internet sharing on your host PC/Mac/Linux and any network entry that mentions beagle. Don’t disconnect the beagle from power or reboot as WiFi will be disabled at startup.

  2. Reconnect to debian@beaglebone.local with SSH, this should now be using the Beagle’s WiFi connection.

  3. Check outgoing internet connection is working

debian@BeagleBone:~$ ping -c1 1.1.1.1

PING 1.1.1.1 (1.1.1.1) 56(84) bytes of data.
64 bytes from 1.1.1.1: icmp_seq=1 ttl=57 time=13.8 ms
--- 1.1.1.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 13.817/13.817/13.817/0.000 ms

debian@BeagleBone:~$ ping -c1 google.com
PING google.com (142.250.187.238) 56(84) bytes of data.
64 bytes from lhr25s34-in-f14.1e100.net (142.250.187.238): icmp_seq=1 ttl=117 time=21.5 ms
--- google.com ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 21.547/21.547/21.547/0.000 ms

The next steps are auto-enabling WiFi at boot.

  1. Add an entry near top of this file after the line starting SUBSYSTEM!=“usb"
sudo vi /lib/udev/rules.d/40-usb_modeswitch.rules

# Brostrend AX5L Wi-Fi adapter
ATTR{idVendor}==“a69c”, ATTR{manufacturer}==“5721”, RUN+=“usb_modeswitch ‘/%k’”
  1. create this file
sudo vi /usr/share/usb_modeswitch/a69c:5721

# Brostrend AX5L Wi-Fi adapter
TargetVendor=0xA69C
TargetProductList=“5721”
StardardEject=1
  1. Reboot and your WiFi should be automatically enabled on each boot and connect to your gateway by DHCP.

  2. Set the static DHCP IP address on your router if you don’t want to use beaglebone.local to access the Beagle and therefore need a fixed IP address.