Jump to content

hcitool dev finds no bluetooth divice since newest version


David Str

Recommended Posts

Hi,

I am using  ARMBIAN 5.25 stable Ubuntu 16.04.2 LTS 3.4.113-sun8i on my Nanopi neo air.

 

uname -a says

Linux nanopiair 3.4.113-sun8i #10 SMP PREEMPT Thu Feb 23 19:55:00 CET 2017 armv7l armv7l armv7l GNU/Linux
 

I think, since I made the last apt-get upgrade and rebooted, my bluetooth stopped working.

 

lsmod gives:

lsmod
Module                  Size  Used by
bmp085                  3487  0
pcf8591                 3363  0
snd_usb_audio          80352  0
snd_hwdep               5562  1 snd_usb_audio
snd_usbmidi_lib        17545  1 snd_usb_audio
snd_rawmidi            17134  1 snd_usbmidi_lib
gspca_ov534             9254  0
gspca_main             19688  1 gspca_ov534
g_serial               27617  2
dhd                   666855  0
hidp                   12949  0
rfcomm                 32879  0
hci_uart               20384  0
bluetooth             174097  5 hidp,hci_uart,rfcomm
btrfs                 712409  0
 
on another neo air with older system
Linux nanopiair 3.4.113-sun8i #28 SMP PREEMPT Thu Feb 2 02:01:28 CET 2017 armv7l armv7l armv7l GNU/Linux
 
lsmode it said:
Module                  Size  Used by
bnep                    9617  2
bmp085                  3487  0
pcf8591                 3363  0
g_serial               27617  2
dhd                   666855  0
hidp                   12949  0
rfcomm                 32879  0
hci_uart               20384  1
bluetooth             174097  25 bnep,hidp,hci_uart,rfcomm
btrfs                 712409  0
 
I also tried to install a nightly build Armbian_5.26.170227_Nanopiair_Ubuntu_xenial_dev_4.10.0
but there was no bluetooth on this build as well.
 
Any Ideas, what I can do to get my hci0 device back?
 
Thank you very much and best regards,
David

 

Link to comment
Share on other sites

3.4.113-sun8i #10 SMP PREEMPT Thu Feb 23 19:55:00 CET 2017 armv7l armv7l armv7l GNU/Linux

 

Well, is that an officially stable version or a nightly build ?

 

With bluetooth, you always may have to correct a number of things. Check that you have the hciattach process, no power block and no interface down :

 

# ps -ef | grep hciattach

# rfkill list

# hciconfig hci0

Link to comment
Share on other sites

Hi,

maybe it was not a stable release, I am not too sure about that. But everything worked just fine until the latest apt-get upgrade..

 

Here are the results from your commands

ps -ef | grep hciattach
root      2132  2002  0 09:25 pts/0    00:00:00 grep --color=auto hciattach
 

 rfkill list
0: sunxi-bt: 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
 

hciconfig hci0
Can't get device info: No such device
 

I have now reverted everything to the release "Armbian_5.25_Nanopiair_Ubuntu_xenial_default_3.4.113.img" which is working. Unfortunately, I now cannot update any software anymore... ;-)

 

Thanks again and best regards,

David

 

Link to comment
Share on other sites

I don't work much with BT and my positive experiences with Bluetooth are only on modern or mainline kernel(s). I could connect keyboard, mouse and headset over Bluetooth, transfer files from and to mobile ... on desktop. On Odroid XU4 and via Exagear x86 emulator I even managed to establish a Skype call. This particular emulator is crashing on Allwinner boards but BT is operational. On NanopiAir, rather try modern / development image / kernel: https://www.armbian.com/nanopi-neo-air/#nightly You have more chances for BT there  ... but this kernel is development and automated nightly build. Remember that.

 

On kernel 3.4.x ... you might need to fix more things.

Link to comment
Share on other sites

Well, in previous working release, you had a "ap6212-bluetooth.service" which started your missing "hciattach" process through systemd.

What is missing or bugged in you system is what is (or was in previous version) in script :

 

/etc/init.d/ap6212-bluetooth

 

You can see that you need to do something like :

        rfkill unblock all
        echo "0" > /sys/class/rfkill/rfkill0/state
        echo "1" > /sys/class/rfkill/rfkill0/state
        echo " " > /dev/$PORT
        hciattach /dev/ttyS3 bcm43xx 1500000 flow bdaddr   42:29:B1:55:01:01
        hciconfig hci0 up

 

(Here, hciattach params are a bit altered to increase serial interface speed and change MAC to enable bnep)

 

If the script exists, try to start it (and always check hci0 is up after bluetoothd start).

 

But it is also possible that the firmware download fails (/etc/firmware/ap6212/4343A0.hcd) or that the uboot config for ttyS3 in script.bin is bad ...

 

 

 

Link to comment
Share on other sites

Hi,

thanks very much for your help!

 

I tried the latest nightly today.

 

When I execute

root@nanopiair:~# /etc/init.d/ap6212-bluetooth start

 

I get this answer

 

[....] Starting ap6212-bluetooth (via systemctl): ap6212-bluetooth.serviceJob for ap6212-bluetooth.service failed because the control process exited with error code. See "systemctl status ap6212-bluetooth.service" and "journalctl -xe" for details.
 failed!

 

When I check the given sources:

 

> systemctl status ap6212-bluetooth.service
 ap6212-bluetooth.service - LSB: Patch firmware for ap6212 adapter
   Loaded: loaded (/etc/init.d/ap6212-bluetooth; bad; vendor preset: enabled)
   Active: failed (Result: exit-code) since Fri 2017-04-14 04:57:00 UTC; 23s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 1522 ExecStart=/etc/init.d/ap6212-bluetooth start (code=exited, statu

Apr 14 04:56:49 nanopiair systemd[1]: Starting LSB: Patch firmware for ap6212 ad
Apr 14 04:57:00 nanopiair ap6212-bluetooth[1522]: Initialization timed out.
Apr 14 04:57:00 nanopiair ap6212-bluetooth[1522]: bcm43xx_init
Apr 14 04:57:00 nanopiair ap6212-bluetooth[1522]: Can't get device info: No such
Apr 14 04:57:00 nanopiair systemd[1]: ap6212-bluetooth.service: Control process
Apr 14 04:57:00 nanopiair systemd[1]: Failed to start LSB: Patch firmware for ap
Apr 14 04:57:00 nanopiair systemd[1]: ap6212-bluetooth.service: Unit entered fai
Apr 14 04:57:00 nanopiair systemd[1]: ap6212-bluetooth.service: Failed with resu

 

and

 

root@nanopiair:~# journalctl -xe
Apr 14 04:57:57 nanopiair sh[475]: DHCPDISCOVER on eth0 to 255.255.255.255 port
Apr 14 04:57:57 nanopiair ntpd[854]: error resolving pool ntp.ubuntu.com: Name o
Apr 14 04:58:04 nanopiair dhclient[506]: No DHCPOFFERS received.
Apr 14 04:58:04 nanopiair dhclient[506]: No working leases in persistent databas
Apr 14 04:58:04 nanopiair sh[475]: No DHCPOFFERS received.
Apr 14 04:58:04 nanopiair sh[475]: No working leases in persistent database - sl
Apr 14 04:58:04 nanopiair systemd[1]: Reloading OpenBSD Secure Shell server.
-- Subject: Unit ssh.service has begun reloading its configuration
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit ssh.service has begun reloading its configuration
Apr 14 04:58:04 nanopiair sshd[1236]: Received SIGHUP; restarting.
Apr 14 04:58:04 nanopiair systemd[1]: Reloaded OpenBSD Secure Shell server.
-- Subject: Unit ssh.service has finished reloading its configuration
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit ssh.service has finished reloading its configuration
--
-- The result is done.
Apr 14 04:58:04 nanopiair sshd[1236]: Server listening on 0.0.0.0 port 22.
Apr 14 04:58:04 nanopiair sshd[1236]: Server listening on :: port 22.
 

 

 

Do you have any Idea what is going on?

 

When I try your commands, the first ones will just return, but

 

>  echo " " > /dev/$PORT
-bash: /dev/: Is a directory

 

Also, if $PORT might be ttys3 then

 >echo " " > /dev/ttys3
-bash: /dev/ttys3: Input/output error
 

and finally 

> hciattach /dev/ttyS3 bcm43xx 1500000 flow bdaddr   42:29:B1:55
bcm43xx_init
Initialization timed out.
root@nanopiair:~# hciconfig hci0 up
Can't get device i
 

So, I still cannot get bluethooth running. I do not understand why it was no problem with hte older build?

It still works, when I use the SD-Card with that build, but that is apparently no solution for the future.

 

Also, is it only me experiencing this? I would have thought that many buy the AIR for its wireless capabilities?!

 

Anyways, any help greatly appreciated, I am sorry, that I do not understand the UNIX boot procedure enough to make something from your hints...

 

Best,

David

Link to comment
Share on other sites

Hi,

BTW:

When I inspect the bootprocess via serial console I also see the error messages:

 

[FAILED] Failed to start LSB: Patch firmware for ap6212 adapter.
See 'systemctl status ap6212-bluetooth.service' for details.
 

So, I have to patch the kernel? How in the world could I do this and why is this necessary (the adapter is the standnard on this machine...)

 

 

Thanks again & best,

David

Link to comment
Share on other sites

Hi guys,

latest breakthrough:

I just run the script with "status" on th working nanopi, it said -with plenty of other informations- something like

 hciattach /dev/ttyS3 bcm43xx 115200 flow bdaddr 43:29:B1:55:01:01

 

When execute this line on the not working system... everything is all right...

So it seemed to have something to do with the MAC ADRESS.. but why... and still how do I fix this permanentely?

 

Thanks and best regards,

David

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