Jump to content

Bluetooth on Orange PiZero Plus


jscax

Recommended Posts

On 10/5/2018 at 3:39 PM, martinayotte said:

Since most people doesn't care about Bluetooth, no developer took time to add it in device-tree ...

 

Pardon my huge ignorance.

I think I'm not understanding the whole context Armbian vs OrangePI.

 

OrangePI is selling PiZero Plus with bluetooth hardware built-in but is not delivering the driver to make it works, correct?

 

This:

https://github.com/orangepi-xunlong/OrangePiH5_kernel/tree/master/drivers/bluetooth 

is not something useful, correct?

 

I'd like to have BT working.

I bought OPI0+ for BT feature which I was missing on OPI0 and I did not consider that it shouldn't work.

Can you please point me the direction to have BT working on OPI0+?

Link to comment
Share on other sites

On 11/12/2018 at 10:54 AM, jscax said:

Pardon my huge ignorance.

I think I'm not understanding the whole context Armbian vs OrangePI.

 

OrangePI is selling PiZero Plus with bluetooth hardware built-in but is not delivering the driver to make it works, correct?

 

This:

https://github.com/orangepi-xunlong/OrangePiH5_kernel/tree/master/drivers/bluetooth 

is not something useful, correct?

 

I'd like to have BT working.

I bought OPI0+ for BT feature which I was missing on OPI0 and I did not consider that it shouldn't work.

Can you please point me the direction to have BT working on OPI0+?

 


(1) You can reduce your ignorance about "Armbian vs Orangepi" by spending time reading both websites and doing some google searches.

 

(2) Where does it say that Orange Pi Zero Plus has this bluetooth feature you bought it for ?
https://www.aliexpress.com/store/product/Orange-Pi-Zero-Plus-H5-Chip-Quad-Core-Open-source-Cortex-A53-512MB-development-board-beyond/1553371_32828347476.html

(3) How much have you invested in Armbian so far ?
Instead of demanding support here because you paid a few dollars to Someone Else for this bluetooth feature of yours, you should be grateful that you can use Armbian for free.

 

Link to comment
Share on other sites

install dev2mem and adjust and make  /etc/init.d/ap6212-bluetooth look like this

 

comment out the copy firmware and adjust  the rest

 

works for me can change with kernel updates

 

# copy firmware

#if [ -f "/lib/firmware/ap6212/bcm43438a0.hcd" ] && [ ! -f /etc/firmware/ap6212/4343A0.hcd ]; then
#        mkdir -p /etc/firmware/ap6212
#        cp /lib/firmware/ap6212/bcm43438a0.hcd /etc/firmware/ap6212/4343A0.hcd
#fi


#if [ -f "/lib/firmware/ap6212/bcm43438a1.hcd" ] && [ ! -f /etc/firmware/ap6212/BCM43430A1.hcd ]; then
#        mkdir -p /etc/firmware/ap6212
#        cp /lib/firmware/ap6212/bcm43438a1.hcd /etc/firmware/ap6212/BCM43430A1.hcd
#fi

. /lib/lsb/init-functions

do_start () {

if [ ! -z $(hciconfig | /bin/grep UART | /usr/bin/cut -d: -f1) ]
then
    echo "ap6212 BT device allready initialized"
    hcitool dev
 else
        # Select MAC address
    if [ -z "$MAC_ADDR" ]; then
       MAC_OPTIONS="11:22:33:44:55:66"
    else
       MAC_OPTIONS="$MAC_ADDR"
    fi
    # Select tty port
    if [ -z "$PORT" ]; then
       log_warning_msg "No PORT set in /etc/default/ap6212, will use ttyS1"
       PORT="ttyS1"
    fi

        # Start patching
        rfkill unblock all
        echo "0" > /sys/class/rfkill/rfkill0/state
        echo "1" > /sys/class/rfkill/rfkill0/state
        #on orangepi win following command never ends on first try... force to run with a timeout...
        timeout 5s echo " " > /dev/$PORT
        #if [ $? != 0 ]; then
        #        #timed out... retry
        #        echo " " > /dev/$PORT
        #fi
        devmem2 0x1f00060 b 1
        echo 10 > /sys/class/gpio/export
        echo out > /sys/class/gpio/gpio10/direction
        echo 0 > /sys/class/gpio/gpio10/value
        echo 1 > /sys/class/gpio/gpio10/value
        sleep 0.1
        hciattach /dev/$PORT bcm43xx 115200 flow bdaddr $MAC_OPTIONS
        hciconfig hci0 up
fi
}

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