SoftAp0 is started by
#/etc/udev/rules.d/81-add-SoftAp0-interface.rules
SUBSYSTEM=="net", ACTION=="add", KERNEL=="wlan[0-9]", DRIVERS=="wl18xx_driver" \
RUN+="/sbin/iw dev %k interface add SoftAp0 type managed"
SUBSYSTEM=="net", ACTION=="add", KERNEL=="wlan[0-9]", DRIVERS=="brcmfmac" \
RUN+="/sbin/iw dev %k interface add SoftAp0 type __ap"
Then hostapd on SoftAp0 is started by:
#/etc/udev/rules.d/82-SoftAp0-start-hostpad.rules
SUBSYSTEM=="net", KERNEL=="SoftAp0", DRIVERS=="wl18xx_driver", TAG+="systemd", ENV{SYSTEMD_WANTS}="hostapd.service"
SUBSYSTEM=="net", KERNEL=="SoftAp0", DRIVERS=="brcmfmac", TAG+="systemd", ENV{SYSTEMD_WANTS}="hostapd.service"
and configured thru:
#/etc/hostapd/hostapd.conf
interface=SoftAp0
# a simply means 5GHz
# g simply means 2.4GHz band
hw_mode=g
# the channel to use
channel=1
# limit the frequencies used to those allowed in the country
#ieee80211d=1
# the country code
#country_code=US
# 802.11n support
ieee80211n=1
# QoS support, also required for full speed on 802.11n/ac/ax
wmm_enabled=1
ssid=BeagleBone-F366
# 1=wpa, 2=wep, 3=both
auth_algs=1
wpa=2
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
wpa_passphrase=BeagleBone
macaddr_acl=0
ignore_broadcast_ssid=0
logger_syslog=-1
logger_syslog_level=2
USB0 / USB1
is started by bb-usb-gadgets and configured via:
#/etc/systemd/network/usb0.network
[Match]
Name=usb0
[Link]
RequiredForOnline=no
[Network]
DHCP=no
Address=192.168.7.2/24
DHCPServer=on
[DHCPServer]
EmitDNS=no
EmitRouter=no
EmitTimezone=no
MaxLeaseTimeSec=20min
PoolSize=1
and
#/etc/systemd/network/usb1.network
[Match]
Name=usb1
[Link]
RequiredForOnline=no
[Network]
DHCP=no
Address=192.168.6.2/24
DHCPServer=on
[DHCPServer]
EmitDNS=no
EmitRouter=no
EmitTimezone=no
MaxLeaseTimeSec=20min
PoolSize=1
So other then the bb-usb-gadgets systemd file
#/lib/systemd/system/bb-usb-gadgets.service
[Unit]
Description=BeagleBoard.org USB gadgets
After=usb-gadget.target
ConditionFileIsExecutable=/usr/bin/bb-start-usb-gadgets
[Service]
Type=forking
ExecStartPre=/sbin/modprobe libcomposite
ExecStart=/usr/bin/bb-start-usb-gadgets
[Install]
WantedBy=multi-user.target
#/usr/bin/bb-start-usb-gadgets
#!/bin/bash
log="bb-usb-gadgets"
#Examples
#https://github.com/linux-usb-gadgets/libusbgx/tree/master/examples
#built_in="gadget-acm-ecm"
#built_in="gadget-ffs"
#built_in="gadget-hid"
#built_in="gadget-midi"
#built_in="gadget-ms"
#built_in="gadget-printer"
#built_in="gadget-rndis-os-desc"
#built_in="gadget-uac2"
#built_in="gadget-uvc"
#/usr/bin/gadget-export
#/usr/bin/gadget-import
#/usr/bin/gadget-vid-pid-remove
#/usr/bin/show-gadgets
#/usr/bin/show-udcs
#echo "${log} /usr/bin/$build_in"
#/usr/bin/$built_in
#Someday... (RNDIS os-desc broken...)
#echo "${log}: gt load --off bbb-acm-ncm-rndis.scheme g_multi"
#gt load --off bbb-acm-ncm-rndis.scheme g_multi
##update mac addresss...
#echo "${log}: gt enable g_multi"
#gt enable g_multi
#Working old..
#TODO: generate unique mac address...
echo "${log}: bb-start-acm-ncm-rndis-old-gadget"
/usr/bin/bb-start-acm-ncm-rndis-old-gadget
Regards,