Jerry Jyrer Posted July 31, 2019 Share Posted July 31, 2019 Anyone gets Nanopo M4 on-board bluetooth working. Any pointer would be appreciated. Here are what I did: - install Bluetooth component from armbian-config $ sudo service bluetooth status ● bluetooth.service - Bluetooth service Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled) Active: active (running) since Wed 2019-07-31 15:59:27 PDT; 9s ago Docs: man:bluetoothd(8) Main PID: 14661 (bluetoothd) Status: "Running" Tasks: 1 (limit: 4558) Memory: 2.1M CGroup: /system.slice/bluetooth.service └─14661 /usr/lib/bluetooth/bluetoothd Jul 31 15:59:27 nanopim4 systemd[1]: Starting Bluetooth service... Jul 31 15:59:27 nanopim4 bluetoothd[14661]: Bluetooth daemon 5.50 Jul 31 15:59:27 nanopim4 systemd[1]: Started Bluetooth service. Jul 31 15:59:27 nanopim4 bluetoothd[14661]: Starting SDP server Jul 31 15:59:27 nanopim4 bluetoothd[14661]: kernel lacks bnep-protocol support Jul 31 15:59:27 nanopim4 bluetoothd[14661]: System does not support network plugin Jul 31 15:59:27 nanopim4 bluetoothd[14661]: Bluetooth management interface 1.10 initialized $ sudo hcitool dev Devices: $ sudo rfkill list 0: bt_default: Bluetooth Soft blocked: no Hard blocked: no 1: phy0: Wireless LAN Soft blocked: no Hard blocked: no 2: brcmfmac-wifi: Wireless LAN Soft blocked: no Hard blocked: no $ uname -a Linux nanopim4 4.4.179-rk3399 #1 SMP Thu Jun 27 23:31:19 CEST 2019 aarch64 GNU/Linux $ cat /etc/os-release PRETTY_NAME="Debian GNU/Linux 10 (buster)" NAME="Debian GNU/Linux" VERSION_ID="10" VERSION="10 (buster)" VERSION_CODENAME=buster ID=debian HOME_URL="https://www.debian.org/" SUPPORT_URL="https://www.debian.org/support" BUG_REPORT_URL="https://bugs.debian.org/" Link to comment Share on other sites More sharing options...
0 Jerry Jyrer Posted July 31, 2019 Author Share Posted July 31, 2019 One more, in case it might help: $ sudo dmesg | grep blue [ 3.016666] of_get_named_gpiod_flags: parsed 'uart_rts_gpios' property of node '/wireless-bluetooth[0]' - status (0) [ 3.016670] [BT_RFKILL]: bluetooth_platdata_parse_dt: get property: uart_rts_gpios = 83. [ 3.016675] of_get_named_gpiod_flags: can't parse 'BT,power_gpio' property of node '/wireless-bluetooth[0]' [ 3.016686] of_get_named_gpiod_flags: parsed 'BT,reset_gpio' property of node '/wireless-bluetooth[0]' - status (0) [ 3.016689] [BT_RFKILL]: bluetooth_platdata_parse_dt: get property: BT,reset_gpio = 9. [ 3.016700] of_get_named_gpiod_flags: parsed 'BT,wake_gpio' property of node '/wireless-bluetooth[0]' - status (0) [ 3.016703] [BT_RFKILL]: bluetooth_platdata_parse_dt: get property: BT,wake_gpio = 90. [ 3.016713] of_get_named_gpiod_flags: parsed 'BT,wake_host_irq' property of node '/wireless-bluetooth[0]' - status (0) [ 3.016716] [BT_RFKILL]: bluetooth_platdata_parse_dt: get property: BT,wake_host_irq = 4. Link to comment Share on other sites More sharing options...
0 Igor Posted August 1, 2019 Share Posted August 1, 2019 I used (Bionic) image from the download section and I could navigate KODI via Bluetooth enabled mouse ... Which image did you used? Have you mage some upgrade from Stretch to Buster? Where is your armbianmonitor -u (which can perhaps tell more). Link to comment Share on other sites More sharing options...
0 Jerry Jyrer Posted August 1, 2019 Author Share Posted August 1, 2019 48 minutes ago, Igor said: I used (Bionic) image from the download section and I could navigate KODI via Bluetooth enabled mouse ... Which image did you used? Have you mage some upgrade from Stretch to Buster? Where is your armbianmonitor -u (which can perhaps tell more). I think I saw Buster available on the Download page but what I did was simply change /etc/apt/sources.list and apt update & upgrade. Something similar to: https://linuxconfig.org/how-to-upgrade-debian-9-stretch-to-debian-10-buster somehow armbianmonitor -u returned empty string for me. I did something similar here: http://sprunge.us/yK0GdC Thanks for your help. Link to comment Share on other sites More sharing options...
0 Igor Posted August 1, 2019 Share Posted August 1, 2019 1 hour ago, Jerry Jyrer said: was simply change /etc/apt/sources.list and apt update & upgrade. Simply implement this https://github.com/armbian/build/commit/1541de32b85fa81c82bb549b67a91746ae33230c#diff-fd85d58c8bb1c2923d75fd40b35d907f or start with a clean build if that will give you too much trouble. Link to comment Share on other sites More sharing options...
0 Jerry Jyrer Posted August 1, 2019 Author Share Posted August 1, 2019 10 hours ago, Igor said: Simply implement this https://github.com/armbian/build/commit/1541de32b85fa81c82bb549b67a91746ae33230c#diff-fd85d58c8bb1c2923d75fd40b35d907f or start with a clean build if that will give you too much trouble. Thanks Igor. Pretty newbie here. I changed to nightly firmware and upgrade there to $ uname -a Linux nanopim4 5.1.0-rk3399 #5.91.190708 SMP Tue Jul 9 07:58:42 CEST 2019 aarch64 GNU/Linux Things are still not working. Here is $ sudo armbianmonitor -u (it works now :)) http://ix.io/1Qi6 Thanks for your helps. Link to comment Share on other sites More sharing options...
0 Igor Posted August 1, 2019 Share Posted August 1, 2019 2 hours ago, Jerry Jyrer said: Pretty newbie here Use image from the download section and stay away from nightly / beta sections if you want that things works. Link to comment Share on other sites More sharing options...
0 Jerry Jyrer Posted August 1, 2019 Author Share Posted August 1, 2019 34 minutes ago, Igor said: Use image from the download section and stay away from nightly / beta sections if you want that things works. sir, yes sir. : ) I'll definitely try to flash the image from the download section to a new SDCard to just check if BT comes back to work and report here when I get a chance. By the way, do you have any suggestion for me to just update the core parts in my existing system with the image from the download section? I have things setup already and its kind of painful to re-config things from a fresh install. Link to comment Share on other sites More sharing options...
0 Igor Posted August 2, 2019 Share Posted August 2, 2019 6 hours ago, Jerry Jyrer said: to just update the core parts I already told you exactly what you have to do, but can't guide in case of troubles. Also you have to remain on stock/legacy kernel. With development kernels (5.1.y) you are on your own. This recipe might work or not. Link to comment Share on other sites More sharing options...
0 Jerry Jyrer Posted August 2, 2019 Author Share Posted August 2, 2019 I got the bluetooth working with a fresh install from the download section to a new microSDCard. I have rootfs installed in my external hdd. So, I did similar procedures in what nand-sata-install is doing except formatting the external hdd (rootfs). Basically, - setting the correct UUID and others in /boot/armbianEnv.txt $ mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr - setting the correct UUID and mount locations in /etc/fstab The system boots fine. Other things seem to be working okay. BUT the bluetooth is not working : ( Here is $ sudo armbianmonitor -u http://ix.io/1Qkq Helps are appreciated. Link to comment Share on other sites More sharing options...
0 Jerry Jyrer Posted August 2, 2019 Author Share Posted August 2, 2019 1 hour ago, Igor said: I already told you exactly what you have to do, but can't guide in case of troubles. Also you have to remain on stock/legacy kernel. With development kernels (5.1.y) you are on your own. This recipe might work or not. Thank you Igor. I finally got it work. Basically, follow your guidance: $vi /lib/systemd/system/ [Unit] Description=Bluetooth nanopi After=bluetooth.target [Service] Type=forking ExecStartPre=/bin/echo 1 > /sys/class/rfkill/rfkill0/state ExecStart=/usr/bin/hciattach /dev/ttyS0 bcm43xx 115200 > /dev/null TimeoutSec=0 RemainAfterExit=yes SysVStartPriority=99 [Install] WantedBy=multi-user.target $ sudo systemctl --no-reload enable nanopi-bluetooth.service $ sudo systemctl start nanopi-bluetooth.service BT is working now. : ) Trying to get my generic gamepad to work is another story : ( But at least, it's connected. 1 Link to comment Share on other sites More sharing options...
0 SergiiG Posted March 7, 2020 Share Posted March 7, 2020 Hello All, Just quick question, I hope some of your will be able to answer. I was running Armbian Bionic on legacy kernel for a year on my NanoPi M4 (verion 1) and was able to enable the nanopi-bluetooth.service.. Now I have upgraded to Buster server with kernel 5.4 - and cannot get Bluetooth working. I guess this is my mistake to go for server image, and maybe bluetooth is not included in this image by default. So my question is should I go back to legacy kernel, or desktop version with 5.4 kernel will be fine, and bluetooth will work with that image. I run my NanoPi M4 as headless server, but still need wifi and bluetooth - so that is why I went for Buster server. I do not really want to try all the images myself, because a lot of important services are running on my SBC so I want to make this last shot right now, and choose right here (with WiFi and Bluetooth working, without graphical interface): - go back to images based on legacy kernel - use desktop buster image on kernel 5.4 - stay on my current image of Buster server kernel 5.4 and add Bluetooth service myself (if someone can point me into solution). will appreciate any help here, thanks. Link to comment Share on other sites More sharing options...
Question
Jerry Jyrer
Anyone gets Nanopo M4 on-board bluetooth working. Any pointer would be appreciated.
Here are what I did:
- install Bluetooth component from armbian-config
$ sudo service bluetooth status
● bluetooth.service - Bluetooth service
Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2019-07-31 15:59:27 PDT; 9s ago
Docs: man:bluetoothd(8)
Main PID: 14661 (bluetoothd)
Status: "Running"
Tasks: 1 (limit: 4558)
Memory: 2.1M
CGroup: /system.slice/bluetooth.service
└─14661 /usr/lib/bluetooth/bluetoothd
Jul 31 15:59:27 nanopim4 systemd[1]: Starting Bluetooth service...
Jul 31 15:59:27 nanopim4 bluetoothd[14661]: Bluetooth daemon 5.50
Jul 31 15:59:27 nanopim4 systemd[1]: Started Bluetooth service.
Jul 31 15:59:27 nanopim4 bluetoothd[14661]: Starting SDP server
Jul 31 15:59:27 nanopim4 bluetoothd[14661]: kernel lacks bnep-protocol support
Jul 31 15:59:27 nanopim4 bluetoothd[14661]: System does not support network plugin
Jul 31 15:59:27 nanopim4 bluetoothd[14661]: Bluetooth management interface 1.10 initialized
$ sudo hcitool dev
Devices:
$ sudo rfkill list
0: bt_default: Bluetooth
Soft blocked: no
Hard blocked: no
1: phy0: Wireless LAN
Soft blocked: no
Hard blocked: no
2: brcmfmac-wifi: Wireless LAN
Soft blocked: no
Hard blocked: no
$ uname -a
Linux nanopim4 4.4.179-rk3399 #1 SMP Thu Jun 27 23:31:19 CEST 2019 aarch64 GNU/Linux
$ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 10 (buster)"
NAME="Debian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
Link to comment
Share on other sites
11 answers to this question
Recommended Posts