Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue: Default config causes system to lag and have wi-fi issues. #10

Open
AmyTheCute opened this issue Jun 5, 2023 · 1 comment
Open

Comments

@AmyTheCute
Copy link

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.

@urbinek
Copy link

urbinek commented Sep 9, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants