Wi-FI performance/stability issues

Hello,

I have banana pi m2u and raspberry pi model 3b+ . Physically they located next to each other and connected to the same wifi network. Ping on rpi 3b+ is stable (1-7 ms), ping on bpi m2u is very unstable. I don’t use external antennas for both devices. What can I do to have the same wifi quality for bpi as I have for rpi?

BPI results:

pi@bpi-iot-ros-ai:~ $ date ; iwconfig wlan0 ; ping -c 10 192.168.3.1
Mon Jun 11 09:42:09 MSK 2018
wlan0     IEEE 802.11bgn  ESSID:"HUAWEI-DDKAK2"  
          Mode:Managed  Frequency:2.422 GHz  Access Point: 78:6A:89:5D:96:D0   
          Bit Rate=72 Mb/s   Tx-Power=31 dBm   
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Power Management:on
          Link Quality=58/70  Signal level=-52 dBm  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:4  Invalid misc:1   Missed beacon:0

PING 192.168.3.1 (192.168.3.1) 56(84) bytes of data.
64 bytes from 192.168.3.1: icmp_seq=1 ttl=64 time=2.18 ms
64 bytes from 192.168.3.1: icmp_seq=2 ttl=64 time=188 ms
64 bytes from 192.168.3.1: icmp_seq=3 ttl=64 time=108 ms
64 bytes from 192.168.3.1: icmp_seq=4 ttl=64 time=8.16 ms
64 bytes from 192.168.3.1: icmp_seq=5 ttl=64 time=7.01 ms
64 bytes from 192.168.3.1: icmp_seq=6 ttl=64 time=173 ms
64 bytes from 192.168.3.1: icmp_seq=7 ttl=64 time=94.8 ms
64 bytes from 192.168.3.1: icmp_seq=8 ttl=64 time=8.28 ms
64 bytes from 192.168.3.1: icmp_seq=9 ttl=64 time=1.94 ms
64 bytes from 192.168.3.1: icmp_seq=10 ttl=64 time=6.97 ms

--- 192.168.3.1 ping statistics ---
10 packets transmitted, 10 received, 0% packet loss, time 9014ms
rtt min/avg/max/mdev = 1.947/59.890/188.155/71.035 ms
pi@bpi-iot-ros-ai:~ $ uname -a 
Linux bpi-iot-ros-ai 3.10.107-BPI-M2U-Kernel #1 SMP Thu Aug 24 08:01:24 CST 2017 armv7l GNU/Linux
pi@bpi-iot-ros-ai:~ $ cat /etc/issue
Raspbian GNU/Linux 9 \n \l
=========================================

RPI results

pi@raspberrypi:~ $ date ; iwconfig wlan0 ; ping -c 10 192.168.3.1
Mon Jun 11 09:42:08 MSK 2018
wlan0     IEEE 802.11  ESSID:"HUAWEI-DDKAK2"  
          Mode:Managed  Frequency:2.422 GHz  Access Point: 78:6A:89:5D:96:D0   
          Bit Rate=48 Mb/s   Tx-Power=31 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:on
          Link Quality=65/70  Signal level=-45 dBm  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:1  Invalid misc:0   Missed beacon:0

PING 192.168.3.1 (192.168.3.1) 56(84) bytes of data.
64 bytes from 192.168.3.1: icmp_seq=1 ttl=64 time=1.24 ms
64 bytes from 192.168.3.1: icmp_seq=2 ttl=64 time=1.11 ms
64 bytes from 192.168.3.1: icmp_seq=3 ttl=64 time=1.06 ms
64 bytes from 192.168.3.1: icmp_seq=4 ttl=64 time=6.17 ms
64 bytes from 192.168.3.1: icmp_seq=5 ttl=64 time=2.60 ms
64 bytes from 192.168.3.1: icmp_seq=6 ttl=64 time=1.14 ms
64 bytes from 192.168.3.1: icmp_seq=7 ttl=64 time=1.97 ms
64 bytes from 192.168.3.1: icmp_seq=8 ttl=64 time=1.87 ms
64 bytes from 192.168.3.1: icmp_seq=9 ttl=64 time=1.17 ms
64 bytes from 192.168.3.1: icmp_seq=10 ttl=64 time=1.09 ms

--- 192.168.3.1 ping statistics ---
10 packets transmitted, 10 received, 0% packet loss, time 9012ms
rtt min/avg/max/mdev = 1.067/1.946/6.173/1.490 ms
pi@raspberrypi:~ $ uname -a
Linux raspberrypi 4.14.34-v7+ #1110 SMP Mon Apr 16 15:18:51 BST 2018 armv7l GNU/Linux
pi@raspberrypi:~ $ cat /etc/issue
Raspbian GNU/Linux 9 \n \l
=========================================

Without proper wifi antennas, you don’t get much reliablity. The BP m2u requires an external one, There isn’t any internal antenna on the board.