Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

How to add bluetooth reset gpio control to rfkill?

Featured Replies

Try to use a DTS file to add  bluetooth reset gpio control to rfkill, but `rfkill list` doesn't show "sunxi-bt".

/dts-v1/;
/plugin/;

/ {
    compatible = "allwinner,sun8i-h3";

    fragment@0 {
        target = <&pio>;
        __overlay__ {
            bt_pwr_pin: bt_pwr_pin@0 {
                pins = "PG13";
                function = "gpio_out";
            };
        };
    };

    fragment@1 {
        target-path = "/";
        __overlay__ {
            rfkill_bt {
                compatible = "rfkill-gpio";
                pinctrl-names = "default";
                pinctrl-0 = <&bt_pwr_pin>;
                reset-gpios = <&pio 6 13 1>;
                clocks = <&osc32k>;
                clock-frequency = <32768>;
                rfkill-name = "sunxi-bt";
                rfkill-type = "bluetooth";
            };
        };
    };
};

 

Background:

Try to enable bluetooth on Nanopi Neo Air. After a lot of search, get bluetooth work finally. A few details are:

 

1. enable UART3 and its CTS & DTS. In /boot/armbianEnv.txt, add something like:

 


param_uart3_rtscts=1
overlays=uart3

 

2. control bluetooth reset pin PG13

3. enable RTC LOSC output

 

I use a script to test:

#!/bin/sh

# sudo apt install sunxi-tools devmem2

echo 'Enable 32K RTC LOSC output'
devmem2 0x1f00060 b 1 
echo 'reset bt'
sunxi-pio -m PG13=0 
sleep 1
sunxi-pio -m PG13=1
sleep 1
echo 'attach'
hciattach /dev/ttyS3 bcm43xx 1500000 flow bdaddr 11:22:33:44:55:66
echo 'config'
#hciconfig hci0 up

 

To setup RTC LOSC and PG13, we can also use the above DTS file.

 

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.