CB1-Kernel
CB1-Kernel copied to clipboard
issue: Default config causes system to lag and have wi-fi issues.
https://github.com/bigtreetech/CB1-Kernel/blob/kernel-5.16/userpatches/scripts/reconnect_wifi.sh
in this file, the script tries to constantly connect to a wifi network, by default this is set to a test network which doesn't exist, causing lagging and other issues specially in KlipperScreen.
perhaps the script could be set to check for a simple USE_WIFI variable, or only attempt and be ran if the SSID is set, otherwise exit on start.
Are you sure this is a bug and nor problem with configuration?
WIFI_SSID is loaded from cfg as shown below: ** head /boot/scripts/connect_wifi.sh **
#!/bin/bash
cfg_file=/boot/system.cfg
[...]
source $cfg_file
grep -e "^WIFI_SSID" ${cfg_file} > /dev/null
STATUS=$?
if [ ${STATUS} -eq 0 ]; then
Env_init
sleep 20
while [ 1 ]; do
if [[ $(is_network) == no ]]; then # 没有网络连接
echo -e $(date)" ==== No network connection..." >> $log_file
startWifi
sleep 6 # 更改间隔时间,因为有些服务启动较慢,试验后,改的间隔长一点有用
fi
sleep $check_interval
done
fi
And cfg file itself shoul have something like this: In file /boot/system.cfg ypu have declared variables
# wifi name
WIFI_SSID='my_wifi_name'
# wifi password
WIFI_PASSWD='Pa$$w0rd'
So if I understod correctly, when you have WIFI_SSID configured in system.cfg it will try to connect.
Then If you dont want this behaviour comment our SSID from file