LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - ARM
User Name
Password
Slackware - ARM This forum is for the discussion of Slackware ARM.

Notices


Reply
  Search this Thread
Old 08-06-2019, 12:32 PM   #1
Exaga
Member
 
Registered: Nov 2012
Posts: 176

Rep: Reputation: 88
Lightbulb Slackware ARM Bluetooth on the RPi3 & 4


Quote:
Originally Posted by wowbaggerHU View Post
The Bluetooth hci0 interface is still absent however both on my PI3B+ and on my PI4.
Yes, I'm not surprised. I found some strange things on the Raspberry Pi 4. I noticed there was a module or three missing from the SARPi4 kernel. This caused Bluetooth not to initialise.

So, I rebuilt the RPi4 kernel/modules and included everything needed to run this Bluetooth shizzle. Installed the new stuff. Logged into the system and...

Code:
root@torq:~# hciconfig
hci0:   Type: Primary  Bus: SDIO
        BD Address: 00:00:00:00:00:00  ACL MTU: 0:0  SCO MTU: 0:0
        DOWN
        RX bytes:0 acl:0 sco:0 events:0 errors:0
        TX bytes:0 acl:0 sco:0 commands:0 errors:0
The BT hci0 interface was there but it was in a 'DOWN' state. NO WAY was this thing changing. No matter what I tried, I just couldn't get it up!

Code:
root@torq:~# hciconfig hci0 up
Can't init device hci0: Input/output error (5)
Oh, wait a minute! This BT interface is on the SDIO bus!?!? It needs to be on UART.

The problem appears to be that the 'btsdio' module is loading before the 'hci_uart' module. So the module that loads first 'becomes resident', if you get what I mean. With the 'btsdio' module active you aren't allowed to dethrone or oust it.

So, I solved this by removing the damned 'btsdio' module thing [temporarily] and...

Code:
root@torq:~# rmmod btsdio
root@torq:~# hciattach ttyS0 bcm43xx 921600
bcm43xx_init
Cannot open directory '/etc/firmware': No such file or directory
Patch not found, continue anyway
Set Controller UART speed to 921600 bit/s
Device setup complete
root@torq:~# hciconfig
hci0:   Type: Primary  Bus: UART
        BD Address: AA:AA:AA:AA:AA:AA  ACL MTU: 1021:8  SCO MTU: 64:1
        DOWN
        RX bytes:668 acl:0 sco:0 events:34 errors:0
        TX bytes:423 acl:0 sco:0 commands:34 errors:0

root@torq:~# hciconfig hci0 up
root@torq:~# hciconfig
hci0:   Type: Primary  Bus: UART
        BD Address: AA:AA:AA:AA:AA:AA  ACL MTU: 1021:8  SCO MTU: 64:1
        UP RUNNING
        RX bytes:1378 acl:0 sco:0 events:74 errors:0
        TX bytes:1186 acl:0 sco:0 commands:74 errors:0

root@torq:~# hcitool dev
Devices:
        hci0    AA:AA:AA:AA:AA:AA
root@torq:~#
Now the BT hci0 interface is up on UART bus. Time to test and see if we can see another BT device in our vicinity...

Code:
root@torq:~# hcitool -i hci0 scan
Scanning ...
        AB:CD:EF:12:34:56       iMob
root@torq:~#
That's a relief! It found 'iMob' which is my iPhone. So I should be able to connect to it...

Code:
root@torq:~# gatttool -b AB:CD:EF:12:34:56 -I
[AB:CD:EF:12:34:56][LE]> connect AB:CD:EF:12:34:56 
Attempting to connect to AB:CD:EF:12:34:56 
Error: connect error: Connection refused (111)
[AB:CD:EF:12:34:56][LE]> exit
root@torq:~#
Oh well, maybe I'll play with that some other time. Like never.

Now to see if there's any LE devices detected...

Code:
root@torq:~# hcitool lescan
LE Scan ...
09:EE:D4:A0:C3:44 (unknown)
3E:72:48:13:61:67 (unknown)
F3:33:BF:65:8B:DA (unknown)
F3:33:BF:65:8B:DA B4E5532D310C33AEE9
40:CB:C0:B6:64:EE (unknown)
40:CB:C0:B6:64:EE (unknown)
52:1C:28:E0:51:06 (unknown)
52:1C:28:E0:51:06 (unknown)
73:7A:E7:53:57:65 (unknown)
73:7A:E7:53:57:65 (unknown)
D0:03:4B:57:88:87 (unknown)
D0:03:4B:57:88:87 (unknown)
13:3E:65:51:B4:87 (unknown)
6D:88:34:44:4A:44 (unknown)
7E:6C:A4:10:12:AA (unknown)
21:7C:3A:DE:22:03 (unknown)
There looks to be plenty. So...

Code:
root@torq:~# hcitool leinfo F3:33:BF:65:8B:DA
Requesting information ...
Could not create connection: Connection timed out
root@torq:~#
OK. Apart from connecting to Bluetoothy things, everything seems to be working [after a fashion]. I haven't used the Bluetooth stuff on 'X' desktop, but that's what might be missing here.

These new SARPi4 image and packages with the added 'missing' kernel modules are available here: http://sarpi.fatdog.eu/index.php?p=downloads

I haven't checked the Raspberry Pi 3 BT shizzle yet but chances are it's in the same state as the RPi4 kernel was. I will make that the next job.

Last edited by Exaga; 08-08-2019 at 08:50 AM.
 
Old 08-06-2019, 12:50 PM   #2
Exaga
Member
 
Registered: Nov 2012
Posts: 176

Original Poster
Rep: Reputation: 88
Forgot to mention...

To enable Bluetooth at boot, add this to your /boot/config.txt file...

Code:
# Uncomment to enable Bluetooth LE
dtoverlay=pi3-miniuart-bt
enable_uart=1
I also tested by blacklisting the 'btsdio' module but it turned out to be quite detrimental to the system.

Any problems, please let me know.
 
Old 08-12-2019, 08:08 AM   #3
Exaga
Member
 
Registered: Nov 2012
Posts: 176

Original Poster
Rep: Reputation: 88
Red face

As far as the Raspberry Pi 3 and 4 Bluetooth goes...

On Slackware ARM -current the on-board wireless and Bluetooth adapters are working.

On Slackware ARM 14.2 the on-board wireless adapter is working but the Bluetooth adapter is failing to initialise. After ~3 days of playing with it and trying to find a solution, life really is too short.

Use/install Slackware ARM -current. Everybody should think about switching to it anyway. If not already using it.
 
  


Reply

Tags
arm, bluetooth, raspberrry pi, slackware


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] bluetooth dongle + bluetooth speaker but no sound on the bluetooth speaker vonbiber Slackware 4 05-11-2017 09:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - ARM

All times are GMT -5. The time now is 12:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration