Jump to content

Banana Pi M2plus & inboard wifi [solved]


gaara

Recommended Posts

I'm out of ideas. FYI, baudrate can be set to 1500000 to get faster connection. It seems that there are some issues with setting baud rate in serial driver, so this speed is the only one I could find.

Link to comment
Share on other sites

I'm out of ideas. FYI, baudrate can be set to 1500000 to get faster connection. It seems that there are some issues with setting baud rate in serial driver, so this speed is the only one I could find.

 

fex for banana pi m2+ already set to 1500000 then "hciattach /dev/ttyS1 bcm43xx 1500000" should be OK

btw, I found patch in yocto linux, same like your direction to enable bluetooth in raspberry pi

https://lists.yoctoproject.org/pipermail/yocto/2016-April/029425.html

maybe Armbian can apply this patch also?

 
------------------------------------------------------------------------
[bt_para]
bt_used = 1
bt_uart_id = 1
bt_uart_baud = 1500000
bt_rst_n = port:PG12<1><default><default><0>
bt_wake = port:PG13<1><default><default><0>
bt_host_wake = port:PG11<0><default><default><0>
bt_host_wake_invert = 0
Link to comment
Share on other sites

 

fex for banana pi m2+ already set to 1500000 then "hciattach /dev/ttyS1 bcm43xx 1500000" should be OK

btw, I found patch in yocto linux, same like your direction to enable bluetooth in raspberry pi

https://lists.yoctoproject.org/pipermail/yocto/2016-April/029425.html

maybe Armbian can apply this patch also?

We solved this way for Cubietruck (with almost the same chip) and it's working fine:

https://github.com/igorpecovnik/lib/blob/master/scripts/brcm40183-patch

Link to comment
Share on other sites

i compile latest armbian 5.14 for banana pi m2+

and now wicd unable to get ip address via onboard wifi

previous armbian 5.12 working well

below wicd.log

anybody has idea why?

 

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

 2016/06/09 13:31:08 :: Connecting to wireless network TRENDnet

2016/06/09 13:31:08 :: attempting to set hostname with dhclient
2016/06/09 13:31:08 :: using dhcpcd or another supported client may work better
2016/06/09 13:31:11 :: attempting to set hostname with dhclient
2016/06/09 13:31:11 :: using dhcpcd or another supported client may work better
2016/06/09 13:31:12 :: Putting interface down
2016/06/09 13:31:12 :: Releasing DHCP leases...
2016/06/09 13:31:12 :: attempting to set hostname with dhclient
2016/06/09 13:31:12 :: using dhcpcd or another supported client may work better
2016/06/09 13:31:12 :: Setting false IP...
2016/06/09 13:31:13 :: Stopping wpa_supplicant
2016/06/09 13:31:13 :: Flushing the routing table...
2016/06/09 13:31:13 :: Putting interface up...
2016/06/09 13:31:15 :: Generating psk...
2016/06/09 13:31:15 :: Attempting to authenticate...
2016/06/09 13:31:29 :: Running DHCP with hostname bananapim2plus
2016/06/09 13:31:29 :: attempting to set hostname with dhclient
2016/06/09 13:31:29 :: using dhcpcd or another supported client may work better
2016/06/09 13:31:29 :: Internet Systems Consortium DHCP Client 4.3.1
2016/06/09 13:31:29 :: Copyright 2004-2014 Internet Systems Consortium.
2016/06/09 13:31:29 :: All rights reserved.
2016/06/09 13:31:29 :: For info, please visit https://www.isc.org/software/dhcp
2016/06/09 13:31:29 ::
2016/06/09 13:31:29 :: Listening on LPF/wlan0/94:a1:a2:ca:17:d8
2016/06/09 13:31:29 :: Sending on   LPF/wlan0/94:a1:a2:ca:17:d8
2016/06/09 13:31:29 :: Sending on   Socket/fallback
2016/06/09 13:31:29 :: DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interva 8
2016/06/09 13:31:37 :: DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interva 15
2016/06/09 13:31:52 :: DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interva 18
2016/06/09 13:32:10 :: DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interva 20
2016/06/09 13:32:30 :: No DHCPOFFERS received.
2016/06/09 13:32:30 :: No working leases in persistent database - sleeping.
2016/06/09 13:32:30 :: DHCP connection failed
2016/06/09 13:32:30 :: exiting connection thread
Link to comment
Share on other sites

 

What do you have here:

/etc/wicd/manager-settings.conf

 

[settings]
wireless_interface = wlan0
backend = external
wired_interface = eth0
wpa_driver = wext
always_show_wired_interface = False
use_global_dns = False
global_dns_1 = None
global_dns_2 = None
global_dns_3 = None
global_dns_dom = None
global_search_dom = None
auto_reconnect = True
debug_mode = False
wired_connect_mode = 1
signal_display_type = 0
should_verify_ap = 1
dhcp_client = 0
link_detect_tool = 0
flush_tool = 0
sudo_app = 0
prefer_wired = False
show_never_connect = True
 
Link to comment
Share on other sites

Nice.

 

You built CLI image and built a desktop on your own? That would explain why this was not auto corrected by our scripts.

 

yes, but i don't understand why armbian build script doesn't correct this?

also it seems latest armbian 5.14 still doesn't solve bluetooth yet

hcitool can see BT controller, but blueman or bluetoothctl cannot

also trying to pair using "hcitool cc <btaddr>" is impossible 

same issue found also here

http://unix.stackexchange.com/questions/169931/bluetoothctl-no-default-controller-available

Link to comment
Share on other sites

Build script is doing adjustment in a build process, not after you install it. Our desktop with all fixes and add-on (mali, video acceleration) is only available inside our desktop image since we don't (yet) provide a packaged desktop. Once this is done as it must be done, proper upgrade from CLI will be possible.

 

Problem with Bluetooth is with loading firmware. I already tried to fix this but failed, but since this is very low priority I won't continue soon on this.

Link to comment
Share on other sites

I have a CSR usr Bluetooth dongle but it is not usable on my bpiM2+ with kernel 3.4.112-sun8i.

 

I can make bluetoothd reconize my TWO controlers ONLY so :

 

* copy firmware to /etc/firmware/ap6212/4343A0.hcd

* stop bluetooth (and unload btusb used by by CSR dongle)

* unblock rfkill

* init bcm43xx with hciattach (first try fail on timeout but seems to enable correct registration of CSR USB dongle)

* 2nd init with hciattach which load firmware

* bring up interfaces and reload btusb

 

something like this :

 

rmmod btusb

/etc/init.d/bluetooth stop

rfkill unblock all

hciattach -t 1 /dev/ttyS1 bcm43xx 115200

hciattach -t 5 /dev/ttyS1 bcm43xx 115200

hciconfig hci0 up

modprobe btusb

hciconfig hci1 up

 

If I dont do that, bluetoothd complains :

 

localhost bluetoothd[457]: Failed to read info for index 65535:

Invalid Index (0x11)

 

and I cannot even use CSR USB dongle.

Link to comment
Share on other sites

I have a CSR usr Bluetooth dongle but it is not usable on my bpiM2+ with kernel 3.4.112-sun8i.

 

I can make bluetoothd reconize my TWO controlers ONLY so :

 

* copy firmware to /etc/firmware/ap6212/4343A0.hcd

* stop bluetooth (and unload btusb used by by CSR dongle)

* unblock rfkill

* init bcm43xx with hciattach (first try fail on timeout but seems to enable correct registration of CSR USB dongle)

* 2nd init with hciattach which load firmware

* bring up interfaces and reload btusb

 

something like this :

 

rmmod btusb

/etc/init.d/bluetooth stop

rfkill unblock all

hciattach -t 1 /dev/ttyS1 bcm43xx 115200

hciattach -t 5 /dev/ttyS1 bcm43xx 115200

hciconfig hci0 up

modprobe btusb

hciconfig hci1 up

 

If I dont do that, bluetoothd complains :

 

localhost bluetoothd[457]: Failed to read info for index 65535:

Invalid Index (0x11)

 

and I cannot even use CSR USB dongle.

 

Can you pair successfully with any bluetooth client devices?

Link to comment
Share on other sites

@dony71

 

Yes, I can pair with clients.

 

But I cannot establish pan connection with internal controler (I can do it with external usb). Bluetooth report bnep protocol and nap profile via sdp, it register service locally, but bridging fail - it seems that in fact the creation of bnep interface silently fail.

 

N.B. I have done a lot of thing : recompiled bluez, removed systemd, but I think bnep creation is a bug (one more) in bluez or configuration problem. And I always have to do hciattach 2 times before it download firmware.

Link to comment
Share on other sites

And I always have to do hciattach 2 times before it download firmware.

 

Before hciattach run this:

echo " " > /dev/ttyS1

This will correctly set RTS line, I believe and following hciattach won't fail anymore.

Link to comment
Share on other sites

"This will correctly set RTS line, I believe and following hciattach won't fail anymore."

 

The echo command blocked when I tried yesterday. All the same, it can certainly be fix by workaround, patch for bcm43xx or uboot init params.

 

But I am stuck on bnep problem : the kernel seems to create a bad bnep interface that cannot be bridged nor configured (that is while the pan link is dropped immediately). Is there firmware patchs available ?

Link to comment
Share on other sites

@dony71

 

Yes, I can pair with clients.

 

But I cannot establish pan connection with internal controler (I can do it with external usb). Bluetooth report bnep protocol and nap profile via sdp, it register service locally, but bridging fail - it seems that in fact the creation of bnep interface silently fail.

 

N.B. I have done a lot of thing : recompiled bluez, removed systemd, but I think bnep creation is a bug (one more) in bluez or configuration problem. And I always have to do hciattach 2 times before it download firmware.

 

how do you pair?

i try to use bluetoothctl, but when i do pair, get authentication failure

on my iphone, there is pop up message "pairing unsuccessful. pairing took too long.

make sure bananapim2plus is turned on, in range, and is ready to pair"

 

======================================

pi@bananapim2plus:~$ sudo bluetoothctl
[NEW] Controller 43:43:A0:12:1F:AC bananapim2plus [default]
[NEW] Device F8:27:93:1D:AB:E3 iPhone (5S)
[bluetooth]# pair F8:27:93:1D:AB:E3
Attempting to pair with F8:27:93:1D:AB:E3
[CHG] Device F8:27:93:1D:AB:E3 Connected: yes
Failed to pair: org.bluez.Error.AuthenticationFailed
[CHG] Device F8:27:93:1D:AB:E3 Connected: no
Link to comment
Share on other sites

Some progress in bluetooth now can be seen by bluetoothctl and blueman

also I can pair bluetooth mouse

install blueman >>> sudo apt-get install blueman

add user in bluetooth group >>> sudo usermod -a -G bluetooth $USER

enable hid input device module by adding "hidp" in /etc/modules-load.d/modules.conf

init bluetooth start up in boot by adding this below in /etc/rc.local

 

/etc/init.d/bluetooth stop
rfkill unblock all

echo " " > /dev/ttyS1
hciattach -t 5 /dev/ttyS1 bcm43xx 1500000
hciconfig hci0 up

/etc/init.d/bluetooth start

 

still issue, cannot pair any devices which needs authentication key such as bluetooth keyboard, bluetooth PAN

somehow bluetooth controller timeout authentication key very fast within a second 

Link to comment
Share on other sites

Hi everyone,

 

I have just installed the latest Armbian, to a brand new Banana Pi M2+ (bought from Conrad in Europe), using the "nand-sata-install" script and performed the update/upgrade commands, but I can't get the WiFi to work,  doing a ifconfig only show eth0 and lo but no wlan0, I know the WiFi is disabled by default but I thought it only needed the "ifconfig wlan0 up" command which gives me "No such device".

 

We were trying with a friend who is more in to software development than me, like for 3 hours yesterday to make it work, tried the "modprobe bcmdhd" and got "Module bcmdhd not found", tried the git download and replacement of the ap6212 folder in the /firmware/ folder but no luck.

 

Also, when it booted today I got 

mmc1: card 0001 removed

mmc1: queuing unknown CIS tuple 0x80 (2 bytes)

mmc1: queuing unknown CIS tuple 0x80 (3 bytes)

mmc1: queuing unknown CIS tuple 0x80 (3 bytes)

mmc1: queuing unknown CIS tuple 0x80 (7 bytes)

mmc1: new high speed SDIO card at address 0001

bcmsdh_sdmmc: probe of mmc1:0001:2 failed with error -12

 

This is repeated 3-4 times and then it continues to initialize the Bluetooth and the asks for login, yesterday when I was rebooting it, it flashed the beginning of the boot sequence then the HDMI goes black and after a minute I get the login prompt, I had noticed this once before but I thought it had something to do with the microSD.

 

Checking around the interwebs for the probe thing I found others having similar problems with WiFi on other boards and kernels, and that it has something to do with a wake up call send using a gpio pin.

 

Is it possible that my WiFi chip is bad, should I return it and get a new one or am I missing something that is written in the bottom of someones shoe?

 

(PS. Writing things about the bluetooth in a thread that was meant for the WiFi doesn't help much in case the answer is written somewhere here.)

 

Thanks

 

 

 

 

I have also checked the WL_HOST_WAKE pin which is an output pin and I get 3.08V from it, I do have a logic analyzer if you have any suggestion about probing the chip for a particular signal.

 

 

After another half day of fiddling and trying to connect the dots from various sources I made it work by using the BPi-tools to update the firmware, it now seems to work. I'm making a new thread

 for Igor to see and update the Armbian build or guide.

 

Link to comment
Share on other sites

I bought a BananaPi M2+ a few days ago and was unable to get the Wifi to work,

 

$ ifconfig

was showing only the eth0 and lo.

 

While searching through logs and forums and performing various driver replacements, someone had a similar problem after updating the firmware of another board and someone else when he assigned GPIO pins, I found the BPi forum post about updating the firmwares of the board using BPi-Tools and I installed a fresh image, performed apt-get update/upgrade and updated the firmware using BPi-Tools, after a reboot wlan0 appeared and I was able to connect to my network without any problem.

 

I recommend this info is added to the guide and maybe even having the tool included in Armbian or adding the firmware update procedure to the first time boot script.

 

The WiFi/BT chip on my board is AP6212 rev. 1648 (which is written on the last line), the board itself is rev. 1.1 and 25.2 (the first number is written just under the BPi M2 Plus text under the H3 chip and the second number just over the LAN port)

 

The Kernel/Firmware update tool can be found here

BPi Firmware update tool

 

Hope this helps anyone with the same problem, the problem also existed in the Raspbian Jessie/Lite, Ubuntu Desktop images provided by Sinevoip in the M2+ downloads page.

Edited by zador.blood.stained
Merged here
Link to comment
Share on other sites

Anybody can guide me how to enable wifi in AP mode?

I already follow https://docs.armbian.com/User-Guide_Advanced-Features/#how-to-set-wireless-access-point

Also add op_mode=2 in /etc/network/interfaces (see attached file)

However when I run "hostapd /etc/hostapd.conf", it shows message below and AP not running
Anything I'm missing?

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

root@RetrOrangePi:/etc# hostapd /etc/hostapd.conf
Configuration file: /etc/hostapd.conf
nl80211: Could not re-add multicast membership for vendor events: -2 (No such file or directory)
Using interface wlan1 with hwaddr 94:a1:a2:ca:17:d8 and ssid "BPi-M2P"
wlan1: interface state UNINITIALIZED->ENABLED
wlan1: AP-ENABLED
 

hostapd.conf

interfaces

Link to comment
Share on other sites

16 minutes ago, dony71 said:

Anything I'm missing?


If you have more or less default /etc/networkl/interfaces, you need to alter your network configuration, from this to this and reboot.

Those days I am working on some configuration and all this will be possible to enable with a wizard.

 

Link to comment
Share on other sites

3 minutes ago, Igor said:


If you have more or less default /etc/networkl/interfaces, you need to alter your network configuration, from this to this and reboot.

Those days I am working on some configuration and all this will be possible to enable with a wizard.

 

 

just attach my interfaces file
seems already follow your recommendation

Link to comment
Share on other sites

8 minutes ago, Igor said:

op_mode=2 does not go to the interfaces but elsewhere. The rest is o.k. and you need to reboot after those changes.

 

i put in /etc/modules-load.d/module.conf
bcmdhd op_mode=2

but still same failure

 

then i do "modprobe bcmdhd op_mode=2"

root@RetrOrangePi:/etc/modules-load.d# modprobe bcmdhd op_mode=2
modprobe: FATAL: Module bcmdhd not found.

 

but wifi is working fine in client mode, so bcmdhd should be already loaded
 

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