SOLVED wifi connects sometime but most of the time it doesnt.

price1221

Active Member
Joined
Jun 13, 2021
Messages
106
Reaction score
26
Credits
771
Im using "RTL8723BE" PCIe Wireless Network Adapter in Kali if i connect to my router sometimes its get connected and works fine. But most of the time it connects but I cant ping my router and dont get internet then if i disconnect from the router then it doesnt connect back and says auth failed. I have check when my machine cant ping my router that my other devices WiFi internet works so its not routers problem.
 


"RTL8723BE"
Ah yes another known problematic realteck chipset.....
I don't know if it will work in Kali
 
"when I type make command according to website https://techcatalystblog.wordpress.com/2016/07/12/rtl8723be-wifi-fix-for-linux/ I get the following error

Ah yes another known problematic realteck chipset.....
I don't know if it will work in Kali
┌──(rootlocalhost)-[/home/kali/github/rtlwifi_new]
└─# make
make -C /lib/modules/5.10.0-kali8-amd64/build M=/home/kali/github/rtlwifi_new modules
make[1]: Entering directory '/usr/src/linux-headers-5.10.0-kali8-amd64'
CC [M] /home/kali/github/rtlwifi_new/btcoexist/halbtc8723b2ant.o
In file included from /home/kali/github/rtlwifi_new/btcoexist/halbt_precomp.h:25,
from /home/kali/github/rtlwifi_new/btcoexist/halbtc8723b2ant.c:37:
/home/kali/github/rtlwifi_new/btcoexist/../wifi.h:1328:40: error: ‘IEEE80211_NUM_BANDS’ undeclared here (not in a function); did you mean ‘IEEE80211_NUM_ACS’?
1328 | struct ieee80211_supported_band bands[IEEE80211_NUM_BANDS];
| ^~~~~~~~~~~~~~~~~~~
| IEEE80211_NUM_ACS
/home/kali/github/rtlwifi_new/btcoexist/../wifi.h:1497:2: error: unknown type name ‘__kernel_time_t’
1497 | __kernel_time_t last_suspend_sec;
| ^~~~~~~~~~~~~~~
make[4]: *** [/usr/src/linux-headers-5.10.0-kali8-common/scripts/Makefile.build:284: /home/kali/github/rtlwifi_new/btcoexist/halbtc8723b2ant.o] Error 1
make[3]: *** [/usr/src/linux-headers-5.10.0-kali8-common/scripts/Makefile.build:501: /home/kali/github/rtlwifi_new/btcoexist] Error 2
make[2]: *** [/usr/src/linux-headers-5.10.0-kali8-common/Makefile:1845: /home/kali/github/rtlwifi_new] Error 2
make[1]: *** [/usr/src/linux-headers-5.10.0-kali8-common/Makefile:185: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.10.0-kali8-amd64'
make: *** [Makefile:53: all] Error 2
 
Have you tried
Code:
sudo apt-get install firmware-realtek
 
I found similar question + answer on Kali Linux forum:
 
I found similar question + answer on Kali Linux forum:
So on your link its saying me to clone and make install
" git clone https://github.com/lwfinger/rtl8723be "
but in there is no makefile
 
The correct drivers are already there if you have installed firmware-realtek - please do not use the old driver references they don't work and are not supported anymore - most likely it may be looking at the wrong antenna some models only have one antenna some have two so the driver might be having a problem picking which one. Try
Code:
modinfo rtl8723be
to see if it is showing
if it is showing then try
First, run the command:
Code:
sudo modprobe rtl8723be ant_sel=1
and if your wifi doesn't work then, try:
Code:
sudo modprobe -r rtl8723be
and then
Code:
sudo modprobe rtl8723be ant_sel=2
and if either one of these works for you
 
Last edited by a moderator:
sudo modorobe -r rtl8723be

Your Lordship, just corrected a typo in the above, changed it to modprobe.

To the OP, just a tip and question:

"wifi connects sometime but most of the time it doesnt."

Does it still connect from time to time?

If so, you should have installed Timeshift and taken a full snapshot (including Home), when it is working.

Then when things go wrong, or if you add/change your setup and you lose the wifi, you can rollback your system to a working state.

Cheers

Wizard
 
Your Lordship, just corrected a typo in the above, changed it to modprobe.

To the OP, just a tip and question:

"wifi connects sometime but most of the time it doesnt."

Does it still connect from time to time?

If so, you should have installed Timeshift and taken a full snapshot (including Home), when it is working.

Then when things go wrong, or if you add/change your setup and you lose the wifi, you can rollback your system to a working state.

Cheers

Wizard
must have fat-fingered it brain thinks one thing fingers do another ;)
 
The correct drivers are already there if you have installed firmware-realtek - please do not use the old driver references they don't work and are not supported anymore - most likely it may be looking at the wrong antenna some models only have one antenna some have two so the driver might be having a problem picking which one. Try
Code:
modinfo rtl8723be
to see if it is showing
if it is showing then try
First, run the command:
Code:
sudo modprobe rtl8723be ant_sel=1
and if your wifi doesn't work then, try:
Code:
sudo modorobe -r rtl8723be
and then
Code:
sudo modprobe rtl8723be ant_sel=2
and if either one of these works for you

thanks man commands worked for me, do i have to everytime give those commands when my wifi doesnt work?
Your Lordship, just corrected a typo in the above, changed it to modprobe.

To the OP, just a tip and question:

"wifi connects sometime but most of the time it doesnt."

Does it still connect from time to time?

If so, you should have installed Timeshift and taken a full snapshot (including Home), when it is working.

Then when things go wrong, or if you add/change your setup and you lose the wifi, you can rollback your system to a working state.

Cheers

Wizard

Thanks for your reply but I personally don't this is a good or permanent solution but that's just me. By removing and installing driver via modprobe worked for me but then again when my wifi adapter stops working I have to remove and install driver.
 
That was not a permanent solution just a test to find out which antenna worked better if indeed you have two antennas - did both command work? if one does not then you only have one antenna if both work then you have two - once you set it to one or the other as discussed above - leave it that way for a while and see if you get kicked off or not - once you find out which works better then we have to make that one permanent

To make permanent run
Code:
sudo tee /etc/modprobe.d/rtl8723be.conf <<< "options rtl8723be ant_sel=1"
or
Code:
sudo tee /etc/modprobe.d/rtl8723be.conf <<< "options rtl8723be ant_sel=2"

depending on which antenna is better if you only have one antenna this will not work
 
Last edited by a moderator:
That was not a permanent solution just a test to find out which antenna worked better if indeed you have two antennas - did both command work? if one does not then you only have one antenna if both work then you have two - once you set it to one or the other as discussed above - leave it that way for a while and see if you get kicked off or not - once you find out which works better then we have to make that one permanent

To make permanent run
Code:
sudo tee /etc/modprobe.d/rtl8723be.conf <<< "options rtl8723be ant_sel=1"
or
Code:
sudo tee /etc/modprobe.d/rtl8723be.conf <<< "options rtl8723be ant_sel=2"

depending on which antenna is better if you only have one antenna this will not work

hey so your commands works when im not able to connect to my wifi But then after sometimes it automatically again losts internet and if i ping i get """ping: sendmsg: No buffer space available"""
 
hey so your commands works when im not able to connect to my wifi But then after sometimes it automatically again losts internet and if i ping i get """ping: sendmsg: No buffer space available"""
It means you reached a maximum value for a system parameter. Also this message could be caused by a faulty network equipment somewhere on the local network, not necessarily on your computer or something is overflowing the buffer. - I would try and disable the 5GHz side in your router and see if that makes a difference
 

Members online


Latest posts

Top