3

I'd been using Kali on my VM for quite a long time and few days ago I've decided to install it like my main OS.

Kali Linux installation process

During the installation it said this

The missing firmware files are: rtlwifi/rtl8723befw.bin and

The missing firmware files are: rtl_nic/rtl8106e-1.fw

I've finished the installation and went to my terminal to make apt-get update and apt-get upgrade. Everything went fine. Then I've decided to update my kernel before trying to find these missing files, so I went for apt-cache search linux-headers and installed my headers to the version "4.9.0-kali4-amd64", and after these I did apt-cache search linux-image to download the right image. So I've installed these two as well. Finished with this part.

Missing files

It hasn't taken too much time to find this link with all the firmware

https://packages.debian.org/jessie/firmware-realtek

So, I've installed that easily with: sudo dpkg -i DEB_FIRMWARE_PACKAGE and sudo apt-get install -f. And again, everything went fine with no errors or whatever.

Here goes the main problem

During the installation, kali asked me to use a wired or wireless connection and I've used my home Wifi, everything was cool. After the installation I've faced the problem that sometimes I've lots of packet loss (was fixed with right firmware). Also if I'm at least 2-3 meters away from my router - I can't connect to it. Connection time just runs out. (Brilliantly works with wired connection).

I didn't care about this 2-3m distance, but in few hours I went downtown and tried to connect to a public Wifi and I was shocked, because I can't connect to any Wifi networks except my home one.

Output of few commands

(Every output is done while using my home Wifi)

root@kali-Ansi17:~# ifconfig
eth0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
    ether fc:3f:db:5c:bc:a6  txqueuelen 1000  (Ethernet)
    RX packets 0  bytes 0 (0.0 B)
    RX errors 0  dropped 0  overruns 0  frame 0
    TX packets 0  bytes 0 (0.0 B)
    TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
    inet 127.0.0.1  netmask 255.0.0.0
    inet6 ::1  prefixlen 128  scopeid 0x10<host>
    loop  txqueuelen 1  (Local Loopback)
    RX packets 232  bytes 18828 (18.3 KiB)
    RX errors 0  dropped 0  overruns 0  frame 0
    TX packets 232  bytes 18828 (18.3 KiB)
    TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
    inet 192.168.0.26  netmask 255.255.255.0  broadcast 192.168.0.255
    inet6 fe80::aaa7:95ff:fecf:a879  prefixlen 64  scopeid 0x20<link>
    ether a8:a7:95:cf:a8:79  txqueuelen 1000  (Ethernet)
    RX packets 403073  bytes 512589056 (488.8 MiB)
    RX errors 0  dropped 0  overruns 0  frame 0
    TX packets 262552  bytes 30019878 (28.6 MiB)
    TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0


root@kali-Ansi17:~# iwconfig
wlan0     IEEE 802.11  ESSID:"DIR-300NRU"  
      Mode:Managed  Frequency:2.462 GHz  Access Point: 1C:7E:E5:D1:DE:3A   
      Bit Rate=54 Mb/s   Tx-Power=20 dBm   
      Retry short limit:7   RTS thr=2347 B   Fragment thr:off
      Encryption key:off
      Power Management:off
      Link Quality=46/70  Signal level=-64 dBm  
      Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
      Tx excessive retries:0  Invalid misc:3926   Missed beacon:0

lo        no wireless extensions.

eth0      no wireless extensions.

root@kali-Ansi17:~# iwconfig wlan0
wlan0     IEEE 802.11  ESSID:"DIR-300NRU"  
      Mode:Managed  Frequency:2.462 GHz  Access Point: 1C:7E:E5:D1:DE:3A   
      Bit Rate=54 Mb/s   Tx-Power=20 dBm   
      Retry short limit:7   RTS thr=2347 B   Fragment thr:off
      Encryption key:off
      Power Management:off
      Link Quality=54/70  Signal level=-56 dBm  
      Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
      Tx excessive retries:0  Invalid misc:5911   Missed beacon:0

Little more

root@kali-Ansi17:~# rfkill list
1: phy0: Wireless LAN
Soft blocked: no
Hard blocked: no
2: hci0: Bluetooth
Soft blocked: no
Hard blocked: no

root@kali-Ansi17:~# lspci | grep -i network
02:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8723BE PCIe Wireless Network Adapter

root@kali-Ansi17:~# lsb_release -a
No LSB modules are available.
Distributor ID: Kali
Description:    Kali GNU/Linux Rolling
Release:    kali-rolling
Codename:   kali-rolling

P.S. Also while system is running it says:

[12.655203] bluetooth hci0: firmware: failed to load rtl_bt/rtl8723b_config.bin (-2)

[12.655215] Bluetooth: hci0: Failed to load rtl_bt/8723b_config.bin

But it's about Bluetooth, so I don't really care. (Added this cos I've read that problems with Wifi can appear cos of the Bluetooth).

3

Remove the firmware-realtek package (the package belong to debian jessie)

Install the kernel headers , and the developpement tools:

apt install build-essential linux-headers-$(uname -r) git

Then install the driver:

git clone https://github.com/lwfinger/rtlwifi_new
cd rtlwifi_new
make
make install 

Load the module

modprobe rtl8723be

Troubleshooting

following the arch linux docs

Create a /etc/modprobe.d/rtl8723be.conf with the following content:

options rtl8723be fwlps=0

reboot your system:

If you have very poor signal maybe your device has only one antenna connected and auto mode does not work. You can force the antenna with ant_sel=1 or ant_sel=2 kernel option.

If it doesn't work properly , reload the driver with the ant_sel option:

rmmod rtl8723be
modprobe rtl8723be ant_sel=1

Again , If it doesn't work properly use ant_sel=2.

Update (from the comment) the wifi work fine with ant_sel=2 , you can add this option to your /etc/modprobe.d/rtl8723be.conf :

options rtl8723be fwlps=0 ant_sel=2
  • 2
    Yay. Thanks. I've accomplished all the steps till ant_sel options. Instead of it I went for sudo modprobe -r rtl8723be then sudo modprobe rtl8723be ant_sel=1 and iwlist scan | egrep -i 'ssid|level'. And again but with modprobe rtl8723be ant_sel=2. I had better connection with ant_sel=2, so I did this echo "options rtl8723be ant_sel=2" | sudo tee -a /etc/modprobe.d/rtl8723be.conf to run my Wifi with ant_sel=2. Now I've to go somewhere and check the Wifi, but I think it will work fine. Thank you so much!! – Ansi17 Jul 23 '17 at 16:32
  • 1
    Ditto, Yay, thanks @GAD3R Seems to have solved my similar problem also (using your suggested rtl8723be.conf). I'm using kernel 4.4.14 and the rtlwifi_new package remarks that their changes have been submitted to kernel maintainers, and should be in 4.7 and later. So most people probably aren't having this problem, but I don't know for sure. However, I can say first-hand that rtl8723be does seem to need some fixes on earlier kernel distributions. – John Forkosh Oct 19 '17 at 22:13
0

You can fix this problem by using these commands in terminal: First enter this command:

sudo modprobe rtl8723be -rv

Now enter this command:

sudo modprobe rtl8723be -v ant_sel=2

This method works fine in kali 2018.2. I'm using HP Notebook af006ax.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.