1 1
jscax

Bluetooth on Orange PiZero Plus

Recommended Posts

5 hours ago, martinayotte said:

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

 

I would use it for a temperature + humidity sensor

Share this post


Link to post
Share on other sites
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+?

Share this post


Link to post
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.

 

Share this post


Link to post
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
}

Share this post


Link to post
Share on other sites
40 minutes ago, data said:

Is the according uart declared in current builds

UARTs in most of AllWinner SoC boards are enabled using DT overlays ...

You need to add to /boot/armbianEnv.txt line like "overlays=uart1 uart2 uart3" and reboot.

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
1 1