Off-Topic > Off-Topic - Tiny Core Lounge
[Solved] TCL laptop sometimes cannot connect to TCL wireless router
GNUser:
Both my laptop and wireless router are powered by TCL. Things usually work perfectly, except that once in a while the laptop cannot connect to the wireless network.
This is what I see in my laptop's terminal while wpa_supplicant struggles to authenticate:
--- Code: ---Successfully initialized wpa_supplicant
udhcpc: started, v1.31.1
udhcpc: sending discover
wlan0: SME: Trying to authenticate with 00:c0:ca:82:e6:49 (SSID='bibliotheca_alexandrina' freq=2462 MHz)
wlan0: Trying to associate with 00:c0:ca:82:e6:49 (SSID='bibliotheca_alexandrina' freq=2462 MHz)
wlan0: CTRL-EVENT-ASSOC-REJECT bssid=00:c0:ca:82:e6:49 status_code=17
wlan0: SME: Deauth request to the driver failed
udhcpc: sending discover
wlan0: SME: Trying to authenticate with 00:c0:ca:82:e6:49 (SSID='bibliotheca_alexandrina' freq=2462 MHz)
wlan0: Trying to associate with 00:c0:ca:82:e6:49 (SSID='bibliotheca_alexandrina' freq=2462 MHz)
wlan0: CTRL-EVENT-ASSOC-REJECT bssid=00:c0:ca:82:e6:49 status_code=17
wlan0: SME: Deauth request to the driver failed
udhcpc: sending discover
wlan0: CTRL-EVENT-REGDOM-CHANGE init=BEACON_HINT type=UNKNOWN
wlan0: SME: Trying to authenticate with 00:c0:ca:82:e6:49 (SSID='bibliotheca_alexandrina' freq=2462 MHz)
wlan0: Trying to associate with 00:c0:ca:82:e6:49 (SSID='bibliotheca_alexandrina' freq=2462 MHz)
wlan0: CTRL-EVENT-ASSOC-REJECT bssid=00:c0:ca:82:e6:49 status_code=17
wlan0: SME: Deauth request to the driver failed
wlan0: SME: Trying to authenticate with 00:c0:ca:82:e6:49 (SSID='bibliotheca_alexandrina' freq=2462 MHz)
wlan0: Trying to associate with 00:c0:ca:82:e6:49 (SSID='bibliotheca_alexandrina' freq=2462 MHz)
wlan0: CTRL-EVENT-ASSOC-REJECT bssid=00:c0:ca:82:e6:49 status_code=17
wlan0: SME: Deauth request to the driver failed
wlan0: CTRL-EVENT-SSID-TEMP-DISABLED id=0 ssid="bibliotheca_alexandrina" auth_failures=1 duration=10 reason=CONN_FAILED
wlan0: CTRL-EVENT-SSID-REENABLED id=0 ssid="bibliotheca_alexandrina"
wlan0: SME: Trying to authenticate with 00:c0:ca:82:e6:49 (SSID='bibliotheca_alexandrina' freq=2462 MHz)
wlan0: Trying to associate with 00:c0:ca:82:e6:49 (SSID='bibliotheca_alexandrina' freq=2462 MHz)
wlan0: CTRL-EVENT-ASSOC-REJECT bssid=00:c0:ca:82:e6:49 status_code=17
wlan0: SME: Deauth request to the driver failed
wlan0: CTRL-EVENT-SSID-TEMP-DISABLED id=0 ssid="bibliotheca_alexandrina" auth_failures=2 duration=23 reason=CONN_FAILED
^C
nl80211: deinit ifname=wlan0 disabled_11b_rates=0
bruno@box:~$ wlan0: CTRL-EVENT-TERMINATING
--- End code ---
Here is the script that runs in my "router" (actually an old netbook) to create the wireless hotspot:
--- Code: ---#!/bin/sh
wan_if=eth0
lan_if=wlan1
ssid=bibliotheca_alexandrina
password=foobarbaz
roku_mac=[redacted]
printer_mac=[redacted]
ip_stem=192.168.10
channel=11
main()
{
setup_nat
setup_dnsmasq
setup_hostapd
}
setup_nat() # nat is more robust than bridge
{
echo 1 >/proc/sys/net/ipv4/conf/$wan_if/forwarding
echo 1 >/proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o $wan_if -j MASQUERADE
iptables -A FORWARD -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -i $lan_if -o $wan_if -j ACCEPT
}
setup_dnsmasq()
{
# for tiny core (persistent lease file across boots):
touch /opt/dnsmasq.leases; mkdir -p /var/lib/misc
ln -s /opt/dnsmasq.leases /var/lib/misc/dnsmasq.leases
ifconfig $lan_if $ip_stem.1
echo "listen-address=$ip_stem.1
dhcp-range=$ip_stem.100,$ip_stem.200,255.255.255.0,24h
dhcp-option-force=option:router,$ip_stem.1
dhcp-option-force=option:dns-server,192.168.10.1
dhcp-host=$roku_mac,192.168.10.60
dhcp-host=$printer_mac,192.168.10.7,infinite
dhcp-option-force=option:mtu,1500" >/tmp/dnsmasq.conf
dnsmasq -C /tmp/dnsmasq.conf
}
setup_hostapd()
{
echo "beacon_int=100
ssid=$ssid
interface=$lan_if
driver=nl80211
channel=$channel
ignore_broadcast_ssid=0
ap_isolate=0
hw_mode=g
wpa=3 # wpa=0 means no password
wpa_passphrase=$password
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP CCMP
rsn_pairwise=CCMP
# for 802.11n support:
ieee80211n=1
wmm_enabled=1
ht_capab=[HT20][SHORT-GI-20]
" >/tmp/hostapd.conf
hostapd /tmp/hostapd.conf
}
main
--- End code ---
Any ideas why the laptop cannot connect to the wireless hotspot?
P.S. In all seriousness, the problem tends to occur when my in-laws visit and are connected to my hotspot with their Windows laptops. This brings the total number of devices on my wireless network from baseline of 6 up to 8. Since both dnsmasq and hostapd default to a limit of 150 clients, the explanation cannot be that there are too many wireless clients. Networking is not my forte and I'm at a loss. Any help, even if wild guesses, would be welcome.
jazzbiker:
Hi, GNUser!
My home network looks just like Yours. Internet is PPPoE connected to Asus EEE 901 (natine WiFi adapter, RTLxxx, if I am not mistaken). Devices are laptop (Atheros chip), Orange Pi and a couple of Android smarts. So EEE was holding wireless network with the help of internal antenna, and is placed badly, from the point of view of signal strength distribution - i.e. one of rooms has very low signal. And I had problems like Yours, i.e. if number of nodes increase, some of them are dropping out of connection. I haven't logged the events. I've choosed the right place for antenna, which eliminated field shadows, bought external USB Wifi adapter (Atheros chip, they are the best for open source), and connected external antenna to my EEE router. And since then problems are gone.
Of course trouble was like Yours, but this method is not guarantee, You know. But why not to try?
Cheers )
curaga:
The client log says it's a server/AP-side thing, so you should look in that log. It's possible your server wifi chip can't handle that many clients, or maybe something in the config.
GNUser:
Thank you both!
jazzbiker - our setups are quite similar! My netbook/router is an EEE and I also use an external Atheros wifi adapter, this one:
https://www.thinkpenguin.com/gnu-linux/penguin-wireless-n-usb-adapter-w-external-antenna-gnu-linux-tpe-n150usbl
Which adapter do you use? My setup is in the center of the house with strong signal everywhere, so signal strength is not the issue.
curaga - I hadn't considered a hardware limitation, but that might just be the problem. Any idea how to check how many clients the server's wifi (Atheros) chip can handle?
curaga:
I'd look up manufacturer spec sheets or the driver source.
Navigation
[0] Message Index
[#] Next page
Go to full version