Jump to content

Orange Pi Lite2 wireless support


junnikokuki

Recommended Posts

The build script will automatically update and pull the changes from github before the menu comes up. Simply run ./compile.sh

 

Edit: Nope....mainline kernel is still an issue

 

U-Boot SPL 2018.09-rc1-armbian (Sep 28 2018 - 18:39:47 +0200)
DRAM: 1024 MiB
Trying to boot from MMC1
NOTICE:  BL31: v1.5(debug):5069c1c
NOTICE:  BL31: Built : 14:47:15, Sep  9 2018
NOTICE:  BL31: Detected Allwinner H6 SoC (1728)
INFO:    ARM GICv2 driver initialized
NOTICE:  PMIC: Probing AXP805
NOTICE:  PMIC: AXP805 detected
INFO:    BL31: Platform setup done
INFO:    BL31: Initializing runtime services
INFO:    BL31: cortex_a53: CPU workaround for 855873 was applied
INFO:    BL31: Preparing for EL3 exit to normal world
INFO:    Entry point address = 0x4a000000
INFO:    SPSR = 0x3c9


U-Boot 2018.09-rc1-armbian (Sep 28 2018 - 18:39:47 +0200) Allwinner Technology

CPU:   Allwinner H6 (SUN50I)
Model: OrangePi One Plus
DRAM:  1 GiB
MMC:   SUNXI SD/MMC: 0
Loading Environment from FAT... Unable to use mmc 0:1... Failed (-5)
Using device 'sun50i_dw_hdmi', disp_uc_priv=0000000079f33320
sunxi_de3_init: device 'sunxi_de3' display won't probe (ret=-1)
Using device 'sun50i_dw_hdmi', disp_uc_priv=0000000079f33320
sunxi_de3_init: device 'sunxi_de3' display won't probe (ret=-1)
In:    serial
Out:   serial
Err:   serial
Net:   No ethernet found.
starting USB...
No controllers found
Hit any key to stop autoboot:  0
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot/boot.scr
3090 bytes read in 13 ms (231.4 KiB/s)
## Executing script at 4fc00000
U-boot loaded from SD
Boot script loaded from mmc
116 bytes read in 10 ms (10.7 KiB/s)
16689 bytes read in 30 ms (543 KiB/s)
** File not found /boot/dtb/allwinner/overlay/sun50i-h6-fixup.scr **
5026188 bytes read in 524 ms (9.1 MiB/s)
13844488 bytes read in 1412 ms (9.3 MiB/s)
## Loading init Ramdisk from Legacy Image at 4fe00000 ...
   Image Name:   uInitrd
   Image Type:   AArch64 Linux RAMDisk Image (gzip compressed)
   Data Size:    5026124 Bytes = 4.8 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 4fa00000
   Booting using the fdt blob at 0x4fa00000
   Loading Ramdisk to 49b34000, end 49fff14c ... OK
   reserving fdt memory region: addr=4fa00000 size=6a000
   Loading Device Tree to 0000000049ac7000, end 0000000049b33fff ... OK
Setting up simplefb
DE3 present but not probed

Starting kernel ...

[    0.880733] Internal error: Oops: 96000004 [#1] SMP
[    0.885616] Modules linked in:
[    0.888674] CPU: 3 PID: 36 Comm: kworker/3:1 Not tainted 4.18.10-sunxi64 #1
[    0.895628] Hardware name: Orange Pi One+ (DT)
[    0.900079] Workqueue: events deferred_probe_work_func
[    0.905215] pstate: 80000005 (Nzcv daif -PAN -UAO)
[    0.910005] pc : sun8i_dwmac_probe+0x164/0x518
[    0.914446] lr : sun8i_dwmac_probe+0x20c/0x518
[    0.918885] sp : ffff00000907bb30
[    0.922196] x29: ffff00000907bb30 x28: 0000000000000000
[    0.927506] x27: 0000000000000000 x26: ffff000008b7d790
[    0.932817] x25: ffff800037fe4558 x24: ffff800036ac4010
[    0.938127] x23: ffff800036ac4000 x22: ffff800034e5d018
[    0.943437] x21: ffff8000352fbe98 x20: ffff000008bcf000
[    0.948746] x19: ffff000008d08000 x18: 0000000000008000
[    0.954056] x17: ffff0000089f8c98 x16: ffff0000089f8c98
[    0.959366] x15: ffff800037fdf600 x14: ffff000008c0d000
[    0.964675] x13: 00000000000000e0 x12: 0000000000000030
[    0.969985] x11: 0101010101010101 x10: 7f7f7f7f7f7f7f7f
[    0.975295] x9 : 6061686d68656d68 x8 : ffff00000907b808
[    0.980604] x7 : 0000000000000000 x6 : 0000000000000003
[    0.985914] x5 : 0000000000000002 x4 : 0000000000000003
[    0.991223] x3 : 0000000000000000 x2 : ffff00000907bba0
[    0.996533] x1 : ffff800034e5d400 x0 : ffff800036ac4010
[    1.001844] Process kworker/3:1 (pid: 36, stack limit = 0x(____ptrval____))
[    1.008799] Call trace:
[    1.011247]  sun8i_dwmac_probe+0x164/0x518
[    1.015343]  platform_drv_probe+0x50/0xa0
[    1.019352]  driver_probe_device+0x21c/0x2f8
[    1.023621]  __device_attach_driver+0x98/0xf0
[    1.027979]  bus_for_each_drv+0x64/0xc8
[    1.031814]  __device_attach+0xd8/0x130
[    1.035648]  device_initial_probe+0x10/0x18
[    1.039829]  bus_probe_device+0x90/0x98
[    1.043664]  deferred_probe_work_func+0x9c/0x140
[    1.048283]  process_one_work+0x1e8/0x338
[    1.052292]  worker_thread+0x240/0x478
[    1.056041]  kthread+0x128/0x130
[    1.059270]  ret_from_fork+0x10/0x18
[    1.062847] Code: f94012a3 9101c3a2 aa1803e0 f9400463 (a9401464)
[    1.068937] ---[ end trace bd9dc8f0489fd612 ]---
[    1.121726] mmc0: host does not support reading read-only switch, assuming write-enable
[    1.133153] mmc0: new high speed SDHC card at address 0001
[    1.139547] mmcblk0: mmc0:0001 00000 14.6 GiB
[    1.146240]  mmcblk0: p1

 

Link to comment
Share on other sites

I just tried to build a full bionic image, but it exits complaining about i2c:

 

[ o.k. ] Looking for user patches in [ userpatches/atf/atf-sunxi64 ]
[ warn ] * [l][c] enable-additional-regulators.patch [ failed ]
[ warn ] * [l][c] set-rsb-to-nonsec.patch [ failed ]
make: *** No rule to make target 'drivers/allwinner/i2c/sunxi_i2c.c', needed by 'build/sun50i_h6/debug/bl31/sunxi_i2c.o'.  Stop.
make: *** Waiting for unfinished jobs....
[ error ] ERROR in function compile_atf [ compilation.sh:66 ]
[ error ] ATF compilation failed 
[ o.k. ] Process terminated 

 

Link to comment
Share on other sites

Good catch ! On my side, even if compile failed almost the same way, since it was building successfully on Sept 7h, I still have the resulting binary in build/sun50i_h6/debug/bl31.bin, so it continued silently to build u-boot ...

@Igor , @Icenowy , maybe some additionnal glue ;) is missing here since this commit : https://github.com/Icenowy/arm-trusted-firmware/commit/5686b2eca292c9e96c1f18c5b81848053a782ed2

 

Link to comment
Share on other sites

43 minutes ago, martinayotte said:

Good catch ! On my side, even if compile failed almost the same way, since it was building successfully on Sept 7h, I still have the resulting binary in build/sun50i_h6/debug/bl31.bin, so it continued silently to build u-boot ...

@Igor , @Icenowy , maybe some additionnal glue ;) is missing here since this commit : https://github.com/Icenowy/arm-trusted-firmware/commit/5686b2eca292c9e96c1f18c5b81848053a782ed2

 

You can drop my branch now and use ARM-Software upstream, the power down function is already merged.

Link to comment
Share on other sites

It finished:

[ o.k. ] Writing U-boot bootloader [ /dev/loop0 ]
[ o.k. ] Done building [ /home/data/build/output/images/Armbian_5.61_Orangepilite2_Ubuntu_bionic_dev_4.18.10.img ]
[ o.k. ] Runtime [ 16 min ]

 

Too bad I have to go now :( Will report later

Link to comment
Share on other sites

@martinayotte

 

Ok, new image is up and running:

 

AP6255 Wifi works, however somewhat flaky. Ping times are normal for Wifi, but when I type it takes some time to show the characters.

 

USB3 Ethernet is not being recognized in dmesg nor does it show up in lsusb

 

USB Wifi can scan, however it does not let me connect, complaining about a wrong WPA2 Password.

 

 

update:

just switched to the nightly built via armbian-config. Update to 4.18.11 went successful

USB Wifi works now, USB3 Ethernet still not recognized

Link to comment
Share on other sites

I have tested the image https://dl.armbian.com/orangepilite2/nightly/Armbian_5.61.180929_Orangepilite2_Ubuntu_bionic_dev_4.18.11.7z

 

the WiFi-AP6255(5G) works well, but the iperf3 test result is not very good, and the ftp speed is the same as  the iperf3 bench.

the ftp speed never reaches 10MB/s, while the stock image can run up to 20MB/s (5G, link speed is 433mbps).

 

NuHoOPw.png

3DptzmH.png

 

----------------------------------

and the USB3.0 port does not work , even in usb2.0 mode( the stock image works in usb2.0 mode)

it can't see any devices.

root@orangepilite2:/media/root# lsusb -t
/:  Bus 05.Port 1: Dev 1, Class=root_hub, Driver=musb-hdrc/1p, 480M
/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=ohci-platform/1p, 12M
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=ehci-platform/1p, 480M
    |__ Port 1: Dev 3, If 0, Class=Hub, Driver=hub/4p, 480M
        |__ Port 1: Dev 4, If 0, Class=Vendor Specific Class, Driver=r8152, 480M
        |__ Port 4: Dev 7, If 0, Class=Mass Storage, Driver=usb-storage, 480M
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ohci-platform/1p, 12M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-platform/1p, 480M

-----------------

and also "reboot" command does not work properly, it does poweroff but don't perform a reset

I have to reconnect the powercable 

Link to comment
Share on other sites

The ping response time was so too long

64 bytes from orangepilite2.lan (fd91:420d:3a09::106): icmp_seq=58 ttl=64 time=64.8 ms
64 bytes from orangepilite2.lan (fd91:420d:3a09::106): icmp_seq=59 ttl=64 time=411 ms
64 bytes from orangepilite2.lan (fd91:420d:3a09::106): icmp_seq=60 ttl=64 time=1254 ms
I set power save off

iw dev wlan0 set power_save off
64 bytes from orangepilite2.lan (fd91:420d:3a09::106): icmp_seq=71 ttl=64 time=1.40 ms
64 bytes from orangepilite2.lan (fd91:420d:3a09::106): icmp_seq=72 ttl=64 time=1.20 ms

 

Link to comment
Share on other sites

Just in case anyone cares:

Turning off power save by  iw dev wlan0 set power_save off   is not permanent. It is enabled again after a reboot.

So, to permanently disable powersave for wifi, I did the following:

 

1.  modify /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf

 

[connection]
# Values are 0 (use default), 1 (ignore/don't touch), 2 (disable) or 3 (enable).
wifi.powersave = 2

2. created a new udev-rule: /etc/udev/rules.d/10-ap6255-wifi.rules

KERNEL=="wlan*", ACTION=="add", RUN+="/sbin/iwconfig wlan0 power off"

 

Link to comment
Share on other sites

@data tnx

 

I made an image and WiFi seems to work just fine (with disabled power management of course):

wlan0     IEEE 802.11  ESSID:"XXX"  
          Mode:Managed  Frequency:5.18 GHz  Access Point: 00:XX:XX:XX:XX:XX   
          Bit Rate=135 Mb/s   Tx-Power=31 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality=69/70  Signal level=-41 dBm  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

 

Spoiler

[ ID] Interval           Transfer     Bandwidth       Retr  Cwnd
[  4]   0.00-1.00   sec  8.79 MBytes  73.7 Mbits/sec    0    116 KBytes       
[  4]   1.00-2.00   sec  8.45 MBytes  70.9 Mbits/sec    0    127 KBytes       
[  4]   2.00-3.00   sec  8.51 MBytes  71.4 Mbits/sec    0    140 KBytes       
[  4]   3.00-4.00   sec  8.45 MBytes  70.9 Mbits/sec    0    140 KBytes       
[  4]   4.00-5.00   sec  8.51 MBytes  71.4 Mbits/sec    0    140 KBytes       
[  4]   5.00-6.00   sec  8.45 MBytes  70.9 Mbits/sec    0    140 KBytes       
[  4]   6.00-7.00   sec  8.70 MBytes  73.0 Mbits/sec    0    171 KBytes       
[  4]   7.00-8.00   sec  8.58 MBytes  71.9 Mbits/sec    0    171 KBytes       
[  4]   8.00-9.00   sec  8.64 MBytes  72.5 Mbits/sec    0    171 KBytes       
[  4]   9.00-10.00  sec  8.51 MBytes  71.4 Mbits/sec    0    171 KBytes       

 

 

 

Link to comment
Share on other sites

Since Wifi is working fine now, I tried installing bluetooth.

There are two scripts in /etc/init.d: ap6212-bluetooth and brcm40183-patch

but I am not sure if they are relevant for the lite2?!

 

What is the correct bluetooth firmware for the lite2?

 

I also tried to load the firmware file BCM4345C0.hcd according to https://forum.khadas.com/t/add-bluetooth-support-for-ubuntu/593

but without success.

 

Link to comment
Share on other sites

@data Any idee what went wrong

 

output/debug/install.log

 

Unpacking linux-bionic-root-dev-orangepilite2 (5.62) ...
dpkg: error processing archive /root/linux-bionic-root-dev-orangepilite2_5.62_arm64.deb (--install):
trying to overwrite '/etc/NetworkManager/conf.d/default-wifi-powersave-on.conf', which is also in package network-manager 1.10.6-2ubuntu1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)

 

Link to comment
Share on other sites

@igor 

init ramdisk builds

but Power Management is still on

benno@orangepilite2:~$ iwconfig
wlan0     IEEE 802.11  ESSID:"OpenWrt_5"   
         Mode:Managed  Frequency:5.22 GHz  Access Point: 14:CC:20:F1:6D:48    
         Bit Rate=390 Mb/s   Tx-Power=31 dBm    
         Retry short limit:7   RTS thr:off   Fragment thr:off
         Power Management:on
         Link Quality=47/70  Signal level=-63 dBm   
         Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
         Tx excessive retries:0  Invalid misc:0   Missed beacon:0

lo        no wireless extensions.

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines