Power & Source of Big Ideas

Wifi Problem XR819

Moderators: chensy, FATechsupport

I have 4 Nanopi Duo. All devices have the same MAC address on the wifi interface: dc:44:6d:c0:ff:ee!

How can I change the address? I'm using the Ubuntu-distro.

Interactive working via ssh is a pain. The device is responding very slow, there are large latencies.
A small test with UDP Datagrams which are sent periodically (for example every 0.2 sec) shows, that the device receives them in chunks only every 1.84 sec!

Receiver on NanoPi:

Code: Select all

import socket
import time
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sock.bind(('',2222))
t0=time.time()
while True:                     
    m=sock.recvfrom(1024)
    t=time.time()
    print "%10.3f %5.3f %s" % (t,t-t0,m[0])
    t0=t


Transmitter external:

Code: Select all

import socket
import time
UDP_IP = "192.168.1.166"
UDP_PORT = 2222
sock = socket.socket(socket.AF_INET,socket.SOCK_DGRAM)
for cnt in range(100):                     
    sock.sendto("%5d" % cnt, (UDP_IP, UDP_PORT))
    cnt+=1
    time.sleep(0.2)
when not using the network manager = using /etc/network/interfaces
you can configure the ethernet address via this interfaces file
like eth0 in the following sample:

Code: Select all

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp
# clone mac address so we can get in net as instructed by IT
hwaddress ether XX:XX:XX:XX:XX:XX


https://askubuntu.com/questions/307717/networkmanager-problem-with-cloned-mac-address

see also
http://wiki.friendlyarm.com/wiki/index.php/Use_NetworkManager_to_configure_network_settings#1:_Setup_Static_IP_Manually
nanopihhh wrote:
I have 4 Nanopi Duo. All devices have the same MAC address on the wifi interface: dc:44:6d:c0:ff:ee!

How can I change the address? I'm using the Ubuntu-distro.

Interactive working via ssh is a pain. The device is responding very slow, there are large latencies.
A small test with UDP Datagrams which are sent periodically (for example every 0.2 sec) shows, that the device receives them in chunks only every 1.84 sec!

Receiver on NanoPi:

Code: Select all

import socket
import time
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sock.bind(('',2222))
t0=time.time()
while True:                     
    m=sock.recvfrom(1024)
    t=time.time()
    print "%10.3f %5.3f %s" % (t,t-t0,m[0])
    t0=t


Transmitter external:

Code: Select all

import socket
import time
UDP_IP = "192.168.1.166"
UDP_PORT = 2222
sock = socket.socket(socket.AF_INET,socket.SOCK_DGRAM)
for cnt in range(100):                     
    sock.sendto("%5d" % cnt, (UDP_IP, UDP_PORT))
    cnt+=1
    time.sleep(0.2)



XR819 is a big challenge in NanoPI Duo.
It can not authenticate to non-password APs. too !
I have found a solution. MAC address is contained in the device tree.

Decompile device tree:

Code: Select all

dtc -I dtb -O dts -o sun8i-h2-plus-nanopi-duo.dts sun8i-h2-plus-nanopi-duo.dtb

Modify mac address in line local-mac-address in section xr819wifi and compile device tree:

Code: Select all

dtc -I dts -O dtb -o sun8i-h2-plus-nanopi-duo-a.dtb sun8i-h2-plus-nanopi-duo.dts

Put it back into boot directory. Reboot.

Who is online

In total there are 3 users online :: 0 registered, 0 hidden and 3 guests (based on users active over the past 5 minutes)
Most users ever online was 5185 on Wed Jan 22, 2020 1:44 pm

Users browsing this forum: No registered users and 3 guests