feat: M3 complete — WiFi, BT keyboard and mouse
Bluetooth (RTL8723D USB combo chip): - GPIO pin 357 (active low) enables WiFi/BT hardware via x6200_gpio_set() - bluez5_utils 5.64 (downgraded from 5.79 — HID input plugin broken in 5.79) - rtl8723d_config.bin added to overlay (missing from linux-firmware package) - S45wifi-bt: GPIO enable + modprobe btusb/uhid/hidp at boot - S85bt-keyboard: auto-connect loop with scan+connect every 20s WiFi (RTL8723DU): - out-of-tree lwfinger/rtw88 driver (RTW88_8723DU not in kernel 6.1 mainline) - linux-firmware RTL_RTW88 for rtw88/rtw8723d_fw.bin - regulatory.db for cfg80211 - wpa_supplicant with multi-network config in /etc/wpa_supplicant.conf - S46wifi: wpa_supplicant + udhcpc at boot Key findings: - RTL8723D USB WiFi (0bda:d723) requires out-of-tree rtw88 on kernel 6.1 - BT and WiFi share same USB device, both need GPIO 357 = 0 to power on - bluez5 5.79 HID input plugin not linked into bluetoothd (build system bug)
This commit is contained in:
44
br2_external/board/x6200/rootfs-overlay/etc/init.d/S46wifi
Executable file
44
br2_external/board/x6200/rootfs-overlay/etc/init.d/S46wifi
Executable file
@@ -0,0 +1,44 @@
|
||||
#!/bin/sh
|
||||
# S46wifi — ansluter till WiFi via wpa_supplicant
|
||||
#
|
||||
# Körs efter S45wifi-bt (GPIO aktivering av chipet).
|
||||
# Använder /etc/wpa_supplicant.conf för nätverkslista.
|
||||
|
||||
IFACE="wlan0"
|
||||
PIDFILE="/var/run/wpa_supplicant.pid"
|
||||
LOG="/var/log/wifi.log"
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo "Starting WiFi"
|
||||
ip link set "$IFACE" up
|
||||
sleep 2
|
||||
|
||||
wpa_supplicant -B \
|
||||
-i "$IFACE" \
|
||||
-c /etc/wpa_supplicant.conf \
|
||||
-P "$PIDFILE" \
|
||||
>> "$LOG" 2>&1
|
||||
|
||||
# Hämta IP via DHCP
|
||||
sleep 3
|
||||
dhclient "$IFACE" >> "$LOG" 2>&1 || \
|
||||
udhcpc -i "$IFACE" -b -p /var/run/udhcpc.pid >> "$LOG" 2>&1
|
||||
|
||||
echo "OK"
|
||||
;;
|
||||
stop)
|
||||
echo "Stopping WiFi"
|
||||
[ -f "$PIDFILE" ] && kill $(cat "$PIDFILE") 2>/dev/null
|
||||
rm -f "$PIDFILE"
|
||||
ip link set "$IFACE" down
|
||||
echo "OK"
|
||||
;;
|
||||
restart)
|
||||
$0 stop; sleep 1; $0 start
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart}" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
Reference in New Issue
Block a user