Jump to content

data

Members
  • Posts

    94
  • Joined

  • Last visited

Posts posted by data

  1. When trying to upgrade, I get the following error:

     

    root@orangepilite2:~# apt upgrade
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Calculating upgrade... Done
    The following packages will be upgraded:
      armbian-firmware
    1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
    Need to get 0 B/5,755 kB of archives.
    After this operation, 0 B of additional disk space will be used.
    Do you want to continue? [Y/n] 
    (Reading database ... 38292 files and directories currently installed.)
    Preparing to unpack .../armbian-firmware_5.74.190202_all.deb ...
    Unpacking armbian-firmware (5.74.190202) over (5.72.190122) ...
    dpkg: error processing archive /var/cache/apt/archives/armbian-firmware_5.74.190202_all.deb (--unpack):
     trying to overwrite '/lib/firmware/regulatory.db', which is also in package wireless-regdb 2018.05.09-0ubuntu1~18.04.1
    dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
    Errors were encountered while processing:
     /var/cache/apt/archives/armbian-firmware_5.74.190202_all.deb
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    root@orangepilite2:~# 

    So it seems there is a duplicate regulatory.db - in the firmware as well as in wireless-regdb

     

     

  2. From what I understand is, that you have to attach the hciadapter to the uart, e.g.

    $ hciattach /dev/ttyXXX any

    But since the corresponding UART is not yet defined in the .dts (see above) it is not recognized by the kernel.

    So first you have to add the uart settings to the .dts

     

     

  3. Ok, here's something:

    I mounted the boot partition from the BETA Ubuntu Image ( OrangePi_Lite2_Ubuntu16.04_Server_BETA ) from http://orangepi.org/
     

    $ fdisk -l OrangePi_Lite2_Ubuntu16.04_Server_BETA.img
    Medium OrangePi_Lite2_Ubuntu16.04_Server_BETA.img: 1,4 GiB, 1468006400 Bytes, 2867200 Sektoren
    Einheiten: sectors von 1 * 512 = 512 Bytes
    Sektorengröße (logisch/physisch): 512 Bytes / 512 Bytes
    I/O Größe (minimal/optimal): 512 Bytes / 512 Bytes
    Typ der Medienbezeichnung: dos
    Medienkennung: 0xdecd62b7
    
    Gerät                                       Boot  Start    Ende Sektoren Größe Id Typ
    OrangePi_Lite2_Ubuntu16.04_Server_BETA.img1       40960  143359   102400   50M  c W95 FAT32 (LBA)
    OrangePi_Lite2_Ubuntu16.04_Server_BETA.img2      143360 2457599  2314240  1,1G 83 Linux
    
    $ mount -o loop,offset=20971520 OrangePi_Lite2_Ubuntu16.04_Server_BETA.img /mnt/tmp

    found a .dtb in the orangepi folder called OrangePiH6.dtb and decompiled it with:

    dtc -I dtb -O dts OrangePiH6.dtb

    I have attached the .dtb as well as the .dts

    Here are the relevant entries for uart1:

     

                            uart1@0 {
                                    linux,phandle = <0xe8>;
                                    phandle = <0xe8>;
                                    allwinner,pins = "PG6", "PG7", "PG8", "PG9";
                                    allwinner,function = "uart1";
                                    allwinner,pname = "uart1_tx", "uart1_rx", "uart1_rts", "uart1_cts";
                                    allwinner,muxsel = <0x2>;
                                    allwinner,pull = <0x1>;
                                    allwinner,drive = <0xffffffff>;
                                    allwinner,data = <0xffffffff>;
                            };
    
                            uart1@1 {
                                    linux,phandle = <0xe9>;
                                    phandle = <0xe9>;
                                    allwinner,pins = "PG6", "PG7", "PG8", "PG9";
                                    allwinner,function = "uart1";
                                    allwinner,pname = "uart1_tx", "uart1_rx", "uart1_rts", "uart1_cts";
                                    allwinner,muxsel = <0x7>;
                                    allwinner,pull = <0x1>;
                                    allwinner,drive = <0xffffffff>;
                                    allwinner,data = <0xffffffff>;
                            };
    

     

    Then, there is another uart specified, which is probably related to bluetooth:

     

                    uart@05000400 {
                            compatible = "allwinner,sun50i-uart";
                            device_type = "uart1";
                            reg = <0x0 0x5000400 0x0 0x400>;
                            interrupts = <0x0 0x1 0x4>;
                            clocks = <0x1f>;
                            pinctrl-names = "default", "sleep";
                            uart1_port = <0x1>;
                            uart1_type = <0x4>;
                            status = "okay";
                            pinctrl-0 = <0xe8>;
                            uart1_bt = <0x1>;
                            pinctrl-1 = <0xe9>;
                    };

     

    Finally, there are two entries at the bottom of the dts which look like they are relevant for bluetooth:

     

            bt {
                    compatible = "allwinner,sunxi-bt";
                    clocks = <0xd7>;
                    bt_power = "vcc-wifi";
                    bt_io_regulator = "vcc-wifi-io";
                    status = "okay";
                    device_type = "bt";
                    bt_rst_n = <0xd8 0xc 0x4 0x1 0xffffffff 0xffffffff 0x0>;
            };
    
            btlpm {
                    compatible = "allwinner,sunxi-btlpm";
                    uart_index = <0x1>;
                    status = "okay";
                    device_type = "btlpm";
                    bt_hostwake_enable = <0x1>;
                    bt_wake = <0xd8 0xc 0x2 0x1 0xffffffff 0xffffffff 0x1>;
                    bt_hostwake = <0xd8 0xc 0x1 0x0 0xffffffff 0xffffffff 0x0>;
            };

     

     

    Is this sufficient to create an updated sun50i-h6-orangepi-lite2.dts?

     

     

     

     

    OrangePiH6.dtb

    OrangePiH6.dts

  4. So what is the proper way to do it?

     

    - decompile the sun50i-h6-orangepi-lite2.dtb, modify the dts and create a new dtb via armbian-add-overlay <overlay_file.dts>

    or

    - create an overlay with just the uart1 relevant details?

     

     

  5. Thank you for your reply.

     

    Your firmware is included and it gets loaded at boot, bringing WiFi to life. So I don't need any additional firmware for bluetooth?

     

     

    How do I proceed then? Use hciattach to the UART, to make the device visible?

     

     

     

     

     

     

     

     

  6. Is there any other firmware for the AP6255 available, besides the one made available for Khadas VIM at
    https://github.com/khadas/android_hardware_amlogic_wifi/tree/Vim/bcm_ampak/config/6255/BT

    or the one for the Raspberry Pi 3+ available e.g. at

    https://github.com/OpenELEC/misc-firmware/blob/master/firmware/brcm/BCM43430A1.hcd

    which uses also the same chipset?

     

    I am trying to make Bluetooth working on an Orange Pi Lite2. So far I had no success loading the firmware by issuing

     

    root@orangepilite2:~# brcm_patchram_plus --patchram /lib/firmware/brcm/BCM43430A1.hcd --enable_hci --bd_addr 11:22:33:44:55:66 --no2bytes --tosleep 1000 /dev/ttyS1

    root@orangepilite2:~# brcm_patchram_plus --patchram /lib/firmware/brcm/BCM4345C0.hcd  --enable_hci --bd_addr 11:22:33:44:55:66 --no2bytes --tosleep 1000 /dev/ttyS1

     

    Any suggestions?

     

×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines